@streamflow/distributor 7.0.0-alpha.16 → 7.0.0-alpha.17
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/solana/{client.js → clients/BaseDistributorClient.js} +65 -62
- package/dist/cjs/solana/clients/SolanaAlignedDistributorClient.js +98 -0
- package/dist/cjs/solana/clients/SolanaDistributorClient.js +17 -0
- package/dist/cjs/solana/clients/index.js +10 -0
- package/dist/cjs/solana/constants.js +4 -1
- package/dist/cjs/solana/descriptor/aligned_distributor.js +2 -0
- package/dist/cjs/solana/descriptor/idl/aligned_distributor.json +1242 -0
- package/dist/cjs/solana/index.js +2 -6
- package/dist/cjs/solana/utils.js +14 -6
- package/dist/esm/solana/clients/BaseDistributorClient.d.ts +38 -0
- package/dist/esm/solana/{client.js → clients/BaseDistributorClient.js} +65 -62
- package/dist/esm/solana/clients/SolanaAlignedDistributorClient.d.ts +12 -0
- package/dist/esm/solana/clients/SolanaAlignedDistributorClient.js +93 -0
- package/dist/esm/solana/clients/SolanaDistributorClient.d.ts +8 -0
- package/dist/esm/solana/clients/SolanaDistributorClient.js +11 -0
- package/dist/esm/solana/clients/index.d.ts +2 -0
- package/dist/esm/solana/clients/index.js +2 -0
- package/dist/esm/solana/constants.d.ts +4 -0
- package/dist/esm/solana/constants.js +3 -0
- package/dist/esm/solana/descriptor/aligned_distributor.d.ts +918 -0
- package/dist/esm/solana/descriptor/aligned_distributor.js +1 -0
- package/dist/esm/solana/descriptor/idl/aligned_distributor.json +1242 -0
- package/dist/esm/solana/index.d.ts +1 -1
- package/dist/esm/solana/index.js +1 -1
- package/dist/esm/solana/types.d.ts +40 -0
- package/dist/esm/solana/utils.d.ts +2 -0
- package/dist/esm/solana/utils.js +8 -2
- package/package.json +5 -4
- package/dist/esm/solana/client.d.ts +0 -38
|
@@ -0,0 +1,918 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Program IDL in camelCase format in order to be used in JS/TS.
|
|
3
|
+
*
|
|
4
|
+
* Note that this is only a type helper and is not the actual IDL. The original
|
|
5
|
+
* IDL can be found at `target/idl/aligned_distributor.json`.
|
|
6
|
+
*/
|
|
7
|
+
export type AlignedDistributor = {
|
|
8
|
+
address: "aMERKpFAWoChCi5oZwPvgsSCoGpZKBiU7fi76bdZjt2";
|
|
9
|
+
metadata: {
|
|
10
|
+
name: "alignedDistributor";
|
|
11
|
+
version: "1.2.0";
|
|
12
|
+
spec: "0.1.0";
|
|
13
|
+
description: "Proxy for merkle distributor that updates Vesting duration according to token market performance.";
|
|
14
|
+
};
|
|
15
|
+
instructions: [
|
|
16
|
+
{
|
|
17
|
+
name: "changeOracle";
|
|
18
|
+
discriminator: [177, 227, 230, 103, 13, 72, 141, 248];
|
|
19
|
+
accounts: [
|
|
20
|
+
{
|
|
21
|
+
name: "alignedDistributor";
|
|
22
|
+
docs: ["The [MerkleDistributor]."];
|
|
23
|
+
writable: true;
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "admin";
|
|
27
|
+
docs: ["Admin signer"];
|
|
28
|
+
writable: true;
|
|
29
|
+
signer: true;
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "newPriceOracle";
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
args: [
|
|
36
|
+
{
|
|
37
|
+
name: "ix";
|
|
38
|
+
type: {
|
|
39
|
+
defined: {
|
|
40
|
+
name: "changeOracleParams";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "clawback";
|
|
48
|
+
discriminator: [111, 92, 142, 79, 33, 234, 82, 27];
|
|
49
|
+
accounts: [
|
|
50
|
+
{
|
|
51
|
+
name: "alignedDistributor";
|
|
52
|
+
docs: ["The [AlignedDistributor]."];
|
|
53
|
+
writable: true;
|
|
54
|
+
pda: {
|
|
55
|
+
seeds: [
|
|
56
|
+
{
|
|
57
|
+
kind: "const";
|
|
58
|
+
value: [97, 108, 105, 103, 110, 101, 100, 45, 100, 105, 115, 116, 114, 105, 98, 117, 116, 111, 114];
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
kind: "account";
|
|
62
|
+
path: "distributor";
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "distributor";
|
|
69
|
+
docs: ["The [MerkleDistributor]."];
|
|
70
|
+
writable: true;
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "from";
|
|
74
|
+
docs: ["Distributor ATA containing the tokens to distribute."];
|
|
75
|
+
writable: true;
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "to";
|
|
79
|
+
docs: ["The Clawback token account."];
|
|
80
|
+
writable: true;
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "admin";
|
|
84
|
+
docs: ["Only Admin can trigger the clawback of funds"];
|
|
85
|
+
writable: true;
|
|
86
|
+
signer: true;
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "mint";
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "distributorProgram";
|
|
93
|
+
address: "MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N";
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "systemProgram";
|
|
97
|
+
docs: ["The [System] program."];
|
|
98
|
+
address: "11111111111111111111111111111111";
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "tokenProgram";
|
|
102
|
+
docs: ["SPL [Token] program."];
|
|
103
|
+
}
|
|
104
|
+
];
|
|
105
|
+
args: [];
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "createTestOracle";
|
|
109
|
+
discriminator: [183, 110, 4, 11, 131, 220, 84, 12];
|
|
110
|
+
accounts: [
|
|
111
|
+
{
|
|
112
|
+
name: "creator";
|
|
113
|
+
writable: true;
|
|
114
|
+
signer: true;
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "mint";
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "testOracle";
|
|
121
|
+
writable: true;
|
|
122
|
+
pda: {
|
|
123
|
+
seeds: [
|
|
124
|
+
{
|
|
125
|
+
kind: "const";
|
|
126
|
+
value: [116, 101, 115, 116, 45, 111, 114, 97, 99, 108, 101];
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
kind: "account";
|
|
130
|
+
path: "mint";
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
kind: "account";
|
|
134
|
+
path: "creator";
|
|
135
|
+
}
|
|
136
|
+
];
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "systemProgram";
|
|
141
|
+
address: "11111111111111111111111111111111";
|
|
142
|
+
}
|
|
143
|
+
];
|
|
144
|
+
args: [
|
|
145
|
+
{
|
|
146
|
+
name: "ix";
|
|
147
|
+
type: {
|
|
148
|
+
defined: {
|
|
149
|
+
name: "createTestOracleParams";
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
];
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: "newDistributor";
|
|
157
|
+
discriminator: [32, 139, 112, 171, 0, 2, 225, 155];
|
|
158
|
+
accounts: [
|
|
159
|
+
{
|
|
160
|
+
name: "alignedDistributor";
|
|
161
|
+
writable: true;
|
|
162
|
+
pda: {
|
|
163
|
+
seeds: [
|
|
164
|
+
{
|
|
165
|
+
kind: "const";
|
|
166
|
+
value: [97, 108, 105, 103, 110, 101, 100, 45, 100, 105, 115, 116, 114, 105, 98, 117, 116, 111, 114];
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
kind: "account";
|
|
170
|
+
path: "distributor";
|
|
171
|
+
}
|
|
172
|
+
];
|
|
173
|
+
};
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "priceOracle";
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: "withdrawor";
|
|
180
|
+
writable: true;
|
|
181
|
+
address: "wdrwhnCv4pzW8beKsbPa4S2UDZrXenjg16KJdKSpb5u";
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: "clawbackReceiver";
|
|
185
|
+
docs: ["Clawback receiver token account"];
|
|
186
|
+
writable: true;
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: "mint";
|
|
190
|
+
docs: ["The mint to distribute."];
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: "distributor";
|
|
194
|
+
writable: true;
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
name: "tokenVault";
|
|
198
|
+
writable: true;
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
name: "admin";
|
|
202
|
+
docs: [
|
|
203
|
+
"Original Admin wallet, responsible for creating the distributor and paying for the transaction.",
|
|
204
|
+
"Also has the authority to set the clawback receiver and change itself."
|
|
205
|
+
];
|
|
206
|
+
writable: true;
|
|
207
|
+
signer: true;
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: "distributorProgram";
|
|
211
|
+
docs: ["MerkleDistributor program"];
|
|
212
|
+
address: "MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N";
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: "systemProgram";
|
|
216
|
+
docs: ["The [System] program."];
|
|
217
|
+
address: "11111111111111111111111111111111";
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: "associatedTokenProgram";
|
|
221
|
+
docs: ["The [Associated Token] program."];
|
|
222
|
+
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: "tokenProgram";
|
|
226
|
+
docs: ["The [Token] program."];
|
|
227
|
+
}
|
|
228
|
+
];
|
|
229
|
+
args: [
|
|
230
|
+
{
|
|
231
|
+
name: "ix";
|
|
232
|
+
type: {
|
|
233
|
+
defined: {
|
|
234
|
+
name: "newDistributorIx";
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
];
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: "setAdmin";
|
|
242
|
+
discriminator: [251, 163, 0, 52, 91, 194, 187, 92];
|
|
243
|
+
accounts: [
|
|
244
|
+
{
|
|
245
|
+
name: "alignedDistributor";
|
|
246
|
+
docs: ["The [MerkleDistributor]."];
|
|
247
|
+
writable: true;
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: "admin";
|
|
251
|
+
docs: ["Admin signer"];
|
|
252
|
+
writable: true;
|
|
253
|
+
signer: true;
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
name: "newAdmin";
|
|
257
|
+
docs: ["New admin account"];
|
|
258
|
+
writable: true;
|
|
259
|
+
}
|
|
260
|
+
];
|
|
261
|
+
args: [];
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
name: "setTestOracleAuthority";
|
|
265
|
+
discriminator: [26, 66, 233, 99, 38, 118, 181, 247];
|
|
266
|
+
accounts: [
|
|
267
|
+
{
|
|
268
|
+
name: "authority";
|
|
269
|
+
writable: true;
|
|
270
|
+
signer: true;
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
name: "testOracle";
|
|
274
|
+
writable: true;
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: "newAuthority";
|
|
278
|
+
}
|
|
279
|
+
];
|
|
280
|
+
args: [];
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
name: "updateDuration";
|
|
284
|
+
discriminator: [69, 126, 172, 250, 164, 14, 10, 161];
|
|
285
|
+
accounts: [
|
|
286
|
+
{
|
|
287
|
+
name: "authority";
|
|
288
|
+
docs: ["Wallet authorised to call this method"];
|
|
289
|
+
writable: true;
|
|
290
|
+
signer: true;
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
name: "alignedDistributor";
|
|
294
|
+
docs: ["The account holding the proxy parameters."];
|
|
295
|
+
writable: true;
|
|
296
|
+
pda: {
|
|
297
|
+
seeds: [
|
|
298
|
+
{
|
|
299
|
+
kind: "const";
|
|
300
|
+
value: [97, 108, 105, 103, 110, 101, 100, 45, 100, 105, 115, 116, 114, 105, 98, 117, 116, 111, 114];
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
kind: "account";
|
|
304
|
+
path: "distributor";
|
|
305
|
+
}
|
|
306
|
+
];
|
|
307
|
+
};
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
name: "distributor";
|
|
311
|
+
docs: ["The account holding the vesting parameters."];
|
|
312
|
+
writable: true;
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
name: "priceOracle";
|
|
316
|
+
relations: ["alignedDistributor"];
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
name: "distributorProgram";
|
|
320
|
+
docs: ["MerkleDistributor program"];
|
|
321
|
+
address: "MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N";
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
name: "systemProgram";
|
|
325
|
+
address: "11111111111111111111111111111111";
|
|
326
|
+
}
|
|
327
|
+
];
|
|
328
|
+
args: [];
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: "updateTestOracle";
|
|
332
|
+
discriminator: [158, 147, 215, 74, 34, 123, 80, 76];
|
|
333
|
+
accounts: [
|
|
334
|
+
{
|
|
335
|
+
name: "authority";
|
|
336
|
+
writable: true;
|
|
337
|
+
signer: true;
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
name: "testOracle";
|
|
341
|
+
writable: true;
|
|
342
|
+
}
|
|
343
|
+
];
|
|
344
|
+
args: [
|
|
345
|
+
{
|
|
346
|
+
name: "ix";
|
|
347
|
+
type: {
|
|
348
|
+
defined: {
|
|
349
|
+
name: "updateTestOracleParams";
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
];
|
|
354
|
+
}
|
|
355
|
+
];
|
|
356
|
+
accounts: [
|
|
357
|
+
{
|
|
358
|
+
name: "alignedDistributor";
|
|
359
|
+
discriminator: [128, 76, 80, 203, 248, 175, 3, 43];
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
name: "merkleDistributor";
|
|
363
|
+
discriminator: [77, 119, 139, 70, 84, 247, 12, 26];
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
name: "testOracle";
|
|
367
|
+
discriminator: [198, 49, 63, 134, 232, 251, 168, 28];
|
|
368
|
+
}
|
|
369
|
+
];
|
|
370
|
+
errors: [
|
|
371
|
+
{
|
|
372
|
+
code: 6000;
|
|
373
|
+
name: "unauthorized";
|
|
374
|
+
msg: "Account is not authorized to execute this instruction";
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
code: 6001;
|
|
378
|
+
name: "arithmeticError";
|
|
379
|
+
msg: "Arithmetic error";
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
code: 6002;
|
|
383
|
+
name: "noLockedAmount";
|
|
384
|
+
msg: "Provided Distributor has no locked amount";
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
code: 6003;
|
|
388
|
+
name: "invalidUpdatePeriod";
|
|
389
|
+
msg: "Provided is invalid, should be equal or more than 30 seconds and unlock_period";
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
code: 6004;
|
|
393
|
+
name: "invalidTickSize";
|
|
394
|
+
msg: "Provided percentage tick size is invalid";
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
code: 6005;
|
|
398
|
+
name: "invalidPercentageBoundaries";
|
|
399
|
+
msg: "Provided percentage bounds are invalid";
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
code: 6006;
|
|
403
|
+
name: "invalidPriceBoundaries";
|
|
404
|
+
msg: "Provided price bounds are invalid";
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
code: 6007;
|
|
408
|
+
name: "unsupportedOracle";
|
|
409
|
+
msg: "Unsupported price oracle";
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
code: 6008;
|
|
413
|
+
name: "invalidOracleAccount";
|
|
414
|
+
msg: "Invalid oracle account";
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
code: 6009;
|
|
418
|
+
name: "invalidOraclePrice";
|
|
419
|
+
msg: "Invalid oracle price";
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
code: 6010;
|
|
423
|
+
name: "durationAlreadyUpdated";
|
|
424
|
+
msg: "Duration has been already updated in this period";
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
code: 6011;
|
|
428
|
+
name: "vestingAlreadyFinished";
|
|
429
|
+
msg: "Vesting already finished";
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
code: 6012;
|
|
433
|
+
name: "sameAdmin";
|
|
434
|
+
msg: "New and old admin are identical";
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
code: 6013;
|
|
438
|
+
name: "invalidMint";
|
|
439
|
+
msg: "Invalid Mint";
|
|
440
|
+
}
|
|
441
|
+
];
|
|
442
|
+
types: [
|
|
443
|
+
{
|
|
444
|
+
name: "alignedDistributor";
|
|
445
|
+
docs: ["State for the account which distributes tokens."];
|
|
446
|
+
type: {
|
|
447
|
+
kind: "struct";
|
|
448
|
+
fields: [
|
|
449
|
+
{
|
|
450
|
+
name: "bump";
|
|
451
|
+
docs: ["Bump seed."];
|
|
452
|
+
type: "u8";
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
name: "distributor";
|
|
456
|
+
docs: ["[Mint] of the token to be distributed."];
|
|
457
|
+
type: "pubkey";
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
name: "admin";
|
|
461
|
+
docs: ["Admin wallet"];
|
|
462
|
+
type: "pubkey";
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
name: "priceOracleType";
|
|
466
|
+
docs: ["Type of the Oracle used to derive Token Price"];
|
|
467
|
+
type: {
|
|
468
|
+
defined: {
|
|
469
|
+
name: "oracleType";
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
name: "priceOracle";
|
|
475
|
+
docs: ["Address of the Price Oracle"];
|
|
476
|
+
type: "pubkey";
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
name: "updatePeriod";
|
|
480
|
+
docs: ["Period of updates, can be different from unlock period if needed"];
|
|
481
|
+
type: "u64";
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
name: "minPrice";
|
|
485
|
+
docs: ["Min price boundary"];
|
|
486
|
+
type: "u64";
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
name: "maxPrice";
|
|
490
|
+
docs: ["Max price boundary"];
|
|
491
|
+
type: "u64";
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
name: "minPercentage";
|
|
495
|
+
docs: ["Min percentage boundary, can be 0 that equals 1 Raw Token"];
|
|
496
|
+
type: "u64";
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
name: "maxPercentage";
|
|
500
|
+
docs: ["Max percentage boundary"];
|
|
501
|
+
type: "u64";
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
name: "tickSize";
|
|
505
|
+
docs: ["Ticket size for percentage boundaries"];
|
|
506
|
+
type: "u64";
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
name: "startTs";
|
|
510
|
+
docs: ["Copy start ts from the Distributor to be used in the worker"];
|
|
511
|
+
type: "u64";
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
name: "endTs";
|
|
515
|
+
docs: ["Copy end ts from the Distributor to be used in the worker"];
|
|
516
|
+
type: "u64";
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
name: "lastDurationUpdateTs";
|
|
520
|
+
docs: [
|
|
521
|
+
"Copy last_duration_update_ts from Distributor for our worker to be able to fetch it in one call with the proxy"
|
|
522
|
+
];
|
|
523
|
+
type: "u64";
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
name: "lastPrice";
|
|
527
|
+
docs: ["Price used on last amount calculation"];
|
|
528
|
+
type: "u64";
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
name: "initialDuration";
|
|
532
|
+
docs: ["Initial Airdrop Vesting duration"];
|
|
533
|
+
type: "u64";
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
name: "initialPrice";
|
|
537
|
+
docs: ["Initial token price at the time of Contract creation"];
|
|
538
|
+
type: "u64";
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
name: "distributorClawedBack";
|
|
542
|
+
docs: ["Whether distributor was clawed backed"];
|
|
543
|
+
type: "bool";
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
name: "buffer1";
|
|
547
|
+
docs: ["Buffer for additional fields"];
|
|
548
|
+
type: {
|
|
549
|
+
array: ["u8", 32];
|
|
550
|
+
};
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
name: "buffer2";
|
|
554
|
+
docs: ["Buffer for additional fields"];
|
|
555
|
+
type: {
|
|
556
|
+
array: ["u8", 32];
|
|
557
|
+
};
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
name: "buffer3";
|
|
561
|
+
docs: ["Buffer for additional fields"];
|
|
562
|
+
type: {
|
|
563
|
+
array: ["u8", 32];
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
];
|
|
567
|
+
};
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
name: "changeOracleParams";
|
|
571
|
+
type: {
|
|
572
|
+
kind: "struct";
|
|
573
|
+
fields: [
|
|
574
|
+
{
|
|
575
|
+
name: "oracleType";
|
|
576
|
+
type: {
|
|
577
|
+
defined: {
|
|
578
|
+
name: "oracleType";
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
];
|
|
583
|
+
};
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
name: "createTestOracleParams";
|
|
587
|
+
type: {
|
|
588
|
+
kind: "struct";
|
|
589
|
+
fields: [
|
|
590
|
+
{
|
|
591
|
+
name: "price";
|
|
592
|
+
type: "u64";
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
name: "expo";
|
|
596
|
+
type: "i32";
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
name: "conf";
|
|
600
|
+
type: "u64";
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
name: "publishTime";
|
|
604
|
+
type: "i64";
|
|
605
|
+
}
|
|
606
|
+
];
|
|
607
|
+
};
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
name: "merkleDistributor";
|
|
611
|
+
docs: ["State for the account which distributes tokens."];
|
|
612
|
+
type: {
|
|
613
|
+
kind: "struct";
|
|
614
|
+
fields: [
|
|
615
|
+
{
|
|
616
|
+
name: "bump";
|
|
617
|
+
docs: ["Bump seed."];
|
|
618
|
+
type: "u8";
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
name: "version";
|
|
622
|
+
docs: ["Version of the airdrop"];
|
|
623
|
+
type: "u64";
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
name: "root";
|
|
627
|
+
docs: ["The 256-bit merkle root."];
|
|
628
|
+
type: {
|
|
629
|
+
array: ["u8", 32];
|
|
630
|
+
};
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
name: "mint";
|
|
634
|
+
docs: ["[Mint] of the token to be distributed."];
|
|
635
|
+
type: "pubkey";
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
name: "tokenVault";
|
|
639
|
+
docs: ["Token Address of the vault"];
|
|
640
|
+
type: "pubkey";
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
name: "maxTotalClaim";
|
|
644
|
+
docs: ["Maximum number of tokens that can ever be claimed from this [MerkleDistributor]."];
|
|
645
|
+
type: "u64";
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
name: "maxNumNodes";
|
|
649
|
+
docs: ["Maximum number of nodes in [MerkleDistributor]."];
|
|
650
|
+
type: "u64";
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
name: "unlockPeriod";
|
|
654
|
+
docs: ["Time step (period) in seconds per which the unlock occurs"];
|
|
655
|
+
type: "u64";
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
name: "totalAmountClaimed";
|
|
659
|
+
docs: ["Total amount of tokens that have been claimed."];
|
|
660
|
+
type: "u64";
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
name: "numNodesClaimed";
|
|
664
|
+
docs: ["Number of nodes that have been claimed."];
|
|
665
|
+
type: "u64";
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
name: "startTs";
|
|
669
|
+
docs: ["Lockup time start (Unix Timestamp)"];
|
|
670
|
+
type: "u64";
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
name: "endTs";
|
|
674
|
+
docs: ["Lockup time end (Unix Timestamp)"];
|
|
675
|
+
type: "u64";
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
name: "clawbackStartTs";
|
|
679
|
+
docs: ["Clawback start (Unix Timestamp)"];
|
|
680
|
+
type: "u64";
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
name: "clawbackReceiver";
|
|
684
|
+
docs: ["Clawback receiver"];
|
|
685
|
+
type: "pubkey";
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
name: "admin";
|
|
689
|
+
docs: ["Admin wallet"];
|
|
690
|
+
type: "pubkey";
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
name: "clawedBack";
|
|
694
|
+
docs: ["Whether or not the distributor has been clawed back"];
|
|
695
|
+
type: "bool";
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
name: "claimsClosable";
|
|
699
|
+
docs: ["Whether claims are closable by the admin or not"];
|
|
700
|
+
type: "bool";
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
name: "canUpdateDuration";
|
|
704
|
+
docs: ["Whether admin can update vesting duration"];
|
|
705
|
+
type: "bool";
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
name: "totalAmountUnlocked";
|
|
709
|
+
docs: ["Total amount of funds unlocked (cliff/instant)"];
|
|
710
|
+
type: "u64";
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
name: "totalAmountLocked";
|
|
714
|
+
docs: ["Total amount of funds locked (vested)"];
|
|
715
|
+
type: "u64";
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
name: "lastDurationUpdateTs";
|
|
719
|
+
docs: ["Timestamp when update was last called"];
|
|
720
|
+
type: "u64";
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
name: "totalClaimablePreUpdate";
|
|
724
|
+
docs: [
|
|
725
|
+
"Total amount of locked amount claimable as of last duration update, ever increasing total, accumulates with each update"
|
|
726
|
+
];
|
|
727
|
+
type: "u64";
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
name: "clawedBackTs";
|
|
731
|
+
docs: ["Timestamp when funds were clawed back"];
|
|
732
|
+
type: "u64";
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
name: "buffer2";
|
|
736
|
+
docs: ["Buffer for additional fields"];
|
|
737
|
+
type: {
|
|
738
|
+
array: ["u8", 23];
|
|
739
|
+
};
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
name: "buffer3";
|
|
743
|
+
docs: ["Buffer for additional fields"];
|
|
744
|
+
type: {
|
|
745
|
+
array: ["u8", 32];
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
];
|
|
749
|
+
};
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
name: "newDistributorIx";
|
|
753
|
+
type: {
|
|
754
|
+
kind: "struct";
|
|
755
|
+
fields: [
|
|
756
|
+
{
|
|
757
|
+
name: "version";
|
|
758
|
+
type: "u64";
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
name: "root";
|
|
762
|
+
type: {
|
|
763
|
+
array: ["u8", 32];
|
|
764
|
+
};
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
name: "maxTotalClaim";
|
|
768
|
+
type: "u64";
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
name: "maxNumNodes";
|
|
772
|
+
type: "u64";
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
name: "unlockPeriod";
|
|
776
|
+
type: "u64";
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
name: "startVestingTs";
|
|
780
|
+
type: "u64";
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
name: "endVestingTs";
|
|
784
|
+
type: "u64";
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
name: "clawbackStartTs";
|
|
788
|
+
type: "u64";
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
name: "claimsClosable";
|
|
792
|
+
type: "bool";
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
name: "totalAmountUnlocked";
|
|
796
|
+
type: "u64";
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
name: "totalAmountLocked";
|
|
800
|
+
type: "u64";
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
name: "updatePeriod";
|
|
804
|
+
type: "u64";
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
name: "oracleType";
|
|
808
|
+
type: {
|
|
809
|
+
defined: {
|
|
810
|
+
name: "oracleType";
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
name: "minPrice";
|
|
816
|
+
type: "u64";
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
name: "maxPrice";
|
|
820
|
+
type: "u64";
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
name: "minPercentage";
|
|
824
|
+
type: "u64";
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
name: "maxPercentage";
|
|
828
|
+
type: "u64";
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
name: "tickSize";
|
|
832
|
+
type: "u64";
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
name: "skipInitial";
|
|
836
|
+
type: "bool";
|
|
837
|
+
}
|
|
838
|
+
];
|
|
839
|
+
};
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
name: "oracleType";
|
|
843
|
+
type: {
|
|
844
|
+
kind: "enum";
|
|
845
|
+
variants: [
|
|
846
|
+
{
|
|
847
|
+
name: "none";
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
name: "test";
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
name: "pyth";
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
name: "switchboard";
|
|
857
|
+
}
|
|
858
|
+
];
|
|
859
|
+
};
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
name: "testOracle";
|
|
863
|
+
type: {
|
|
864
|
+
kind: "struct";
|
|
865
|
+
fields: [
|
|
866
|
+
{
|
|
867
|
+
name: "price";
|
|
868
|
+
type: "u64";
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
name: "expo";
|
|
872
|
+
type: "i32";
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
name: "conf";
|
|
876
|
+
type: "u64";
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
name: "publishTime";
|
|
880
|
+
type: "i64";
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
name: "creator";
|
|
884
|
+
type: "pubkey";
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
name: "authority";
|
|
888
|
+
type: "pubkey";
|
|
889
|
+
}
|
|
890
|
+
];
|
|
891
|
+
};
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
name: "updateTestOracleParams";
|
|
895
|
+
type: {
|
|
896
|
+
kind: "struct";
|
|
897
|
+
fields: [
|
|
898
|
+
{
|
|
899
|
+
name: "price";
|
|
900
|
+
type: "u64";
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
name: "expo";
|
|
904
|
+
type: "i32";
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
name: "conf";
|
|
908
|
+
type: "u64";
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
name: "publishTime";
|
|
912
|
+
type: "i64";
|
|
913
|
+
}
|
|
914
|
+
];
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
];
|
|
918
|
+
};
|