torchsdk 1.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/LICENSE +21 -0
- package/dist/constants.d.ts +49 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +126 -0
- package/dist/constants.js.map +1 -0
- package/dist/gateway.d.ts +17 -0
- package/dist/gateway.d.ts.map +1 -0
- package/dist/gateway.js +40 -0
- package/dist/gateway.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/program.d.ts +182 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +208 -0
- package/dist/program.js.map +1 -0
- package/dist/quotes.d.ts +16 -0
- package/dist/quotes.d.ts.map +1 -0
- package/dist/quotes.js +78 -0
- package/dist/quotes.js.map +1 -0
- package/dist/said.d.ts +27 -0
- package/dist/said.d.ts.map +1 -0
- package/dist/said.js +89 -0
- package/dist/said.js.map +1 -0
- package/dist/tokens.d.ts +44 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +537 -0
- package/dist/tokens.js.map +1 -0
- package/dist/torch_market.json +3172 -0
- package/dist/transactions.d.ts +93 -0
- package/dist/transactions.d.ts.map +1 -0
- package/dist/transactions.js +550 -0
- package/dist/transactions.js.map +1 -0
- package/dist/types.d.ts +194 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/package.json +34 -0
- package/readme.md +142 -0
|
@@ -0,0 +1,3172 @@
|
|
|
1
|
+
{
|
|
2
|
+
"address": "8hbUkonssSEEtkqzwM7ZcZrD9evacM92TcWSooVF4BeT",
|
|
3
|
+
"metadata": {
|
|
4
|
+
"name": "torch_market",
|
|
5
|
+
"version": "2.4.1",
|
|
6
|
+
"spec": "0.1.0",
|
|
7
|
+
"description": "torch.market"
|
|
8
|
+
},
|
|
9
|
+
"instructions": [
|
|
10
|
+
{
|
|
11
|
+
"name": "advance_epoch",
|
|
12
|
+
"docs": ["Advance the epoch for reward distribution."],
|
|
13
|
+
"discriminator": [93, 138, 234, 218, 241, 230, 132, 38],
|
|
14
|
+
"accounts": [
|
|
15
|
+
{
|
|
16
|
+
"name": "payer",
|
|
17
|
+
"writable": true,
|
|
18
|
+
"signer": true
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "platform_treasury",
|
|
22
|
+
"writable": true,
|
|
23
|
+
"pda": {
|
|
24
|
+
"seeds": [
|
|
25
|
+
{
|
|
26
|
+
"kind": "const",
|
|
27
|
+
"value": [
|
|
28
|
+
112, 108, 97, 116, 102, 111, 114, 109, 95, 116, 114, 101, 97, 115, 117, 114, 121
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"args": []
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "advance_protocol_epoch",
|
|
39
|
+
"docs": [
|
|
40
|
+
"[V11] Advance the protocol treasury epoch.",
|
|
41
|
+
"Permissionless crank - calculates distributable amount above reserve floor."
|
|
42
|
+
],
|
|
43
|
+
"discriminator": [215, 39, 184, 104, 13, 104, 63, 21],
|
|
44
|
+
"accounts": [
|
|
45
|
+
{
|
|
46
|
+
"name": "payer",
|
|
47
|
+
"writable": true,
|
|
48
|
+
"signer": true
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "protocol_treasury",
|
|
52
|
+
"writable": true,
|
|
53
|
+
"pda": {
|
|
54
|
+
"seeds": [
|
|
55
|
+
{
|
|
56
|
+
"kind": "const",
|
|
57
|
+
"value": [
|
|
58
|
+
112, 114, 111, 116, 111, 99, 111, 108, 95, 116, 114, 101, 97, 115, 117, 114, 121,
|
|
59
|
+
95, 118, 49, 49
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"args": []
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "borrow",
|
|
70
|
+
"docs": [
|
|
71
|
+
"[V2.4] Borrow SOL from treasury using tokens as collateral.",
|
|
72
|
+
"Lock tokens in collateral vault, receive SOL up to 50% of collateral value."
|
|
73
|
+
],
|
|
74
|
+
"discriminator": [228, 253, 131, 202, 207, 116, 89, 18],
|
|
75
|
+
"accounts": [
|
|
76
|
+
{
|
|
77
|
+
"name": "borrower",
|
|
78
|
+
"writable": true,
|
|
79
|
+
"signer": true
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "mint"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "bonding_curve",
|
|
86
|
+
"pda": {
|
|
87
|
+
"seeds": [
|
|
88
|
+
{
|
|
89
|
+
"kind": "const",
|
|
90
|
+
"value": [98, 111, 110, 100, 105, 110, 103, 95, 99, 117, 114, 118, 101]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"kind": "account",
|
|
94
|
+
"path": "mint"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "treasury",
|
|
101
|
+
"writable": true,
|
|
102
|
+
"pda": {
|
|
103
|
+
"seeds": [
|
|
104
|
+
{
|
|
105
|
+
"kind": "const",
|
|
106
|
+
"value": [116, 114, 101, 97, 115, 117, 114, 121]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"kind": "account",
|
|
110
|
+
"path": "mint"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "collateral_vault",
|
|
117
|
+
"docs": [
|
|
118
|
+
"Collateral vault - holds locked tokens. Created on first borrow for this token."
|
|
119
|
+
],
|
|
120
|
+
"writable": true,
|
|
121
|
+
"pda": {
|
|
122
|
+
"seeds": [
|
|
123
|
+
{
|
|
124
|
+
"kind": "const",
|
|
125
|
+
"value": [99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 95, 118, 97, 117, 108, 116]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"kind": "account",
|
|
129
|
+
"path": "mint"
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "borrower_token_account",
|
|
136
|
+
"docs": ["Borrower's token account (source of collateral)"],
|
|
137
|
+
"writable": true,
|
|
138
|
+
"pda": {
|
|
139
|
+
"seeds": [
|
|
140
|
+
{
|
|
141
|
+
"kind": "account",
|
|
142
|
+
"path": "borrower"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"kind": "account",
|
|
146
|
+
"path": "token_program"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"kind": "account",
|
|
150
|
+
"path": "mint"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"program": {
|
|
154
|
+
"kind": "const",
|
|
155
|
+
"value": [
|
|
156
|
+
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
|
|
157
|
+
153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "loan_position",
|
|
164
|
+
"docs": ["Loan position PDA - created on first borrow"],
|
|
165
|
+
"writable": true,
|
|
166
|
+
"pda": {
|
|
167
|
+
"seeds": [
|
|
168
|
+
{
|
|
169
|
+
"kind": "const",
|
|
170
|
+
"value": [108, 111, 97, 110]
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"kind": "account",
|
|
174
|
+
"path": "mint"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"kind": "account",
|
|
178
|
+
"path": "borrower"
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "pool_state",
|
|
185
|
+
"docs": ["Raydium pool state for price calculation"]
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "token_vault_0",
|
|
189
|
+
"docs": ["Pool token vault 0 (for reading reserves)"]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "token_vault_1",
|
|
193
|
+
"docs": ["Pool token vault 1 (for reading reserves)"]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "token_program"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "system_program",
|
|
200
|
+
"address": "11111111111111111111111111111111"
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"args": [
|
|
204
|
+
{
|
|
205
|
+
"name": "args",
|
|
206
|
+
"type": {
|
|
207
|
+
"defined": {
|
|
208
|
+
"name": "BorrowArgs"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "buy",
|
|
216
|
+
"docs": ["Buy tokens from the bonding curve."],
|
|
217
|
+
"discriminator": [102, 6, 61, 18, 1, 218, 235, 234],
|
|
218
|
+
"accounts": [
|
|
219
|
+
{
|
|
220
|
+
"name": "buyer",
|
|
221
|
+
"writable": true,
|
|
222
|
+
"signer": true
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"name": "global_config",
|
|
226
|
+
"pda": {
|
|
227
|
+
"seeds": [
|
|
228
|
+
{
|
|
229
|
+
"kind": "const",
|
|
230
|
+
"value": [103, 108, 111, 98, 97, 108, 95, 99, 111, 110, 102, 105, 103]
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"name": "dev_wallet",
|
|
237
|
+
"writable": true
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "mint",
|
|
241
|
+
"writable": true
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "bonding_curve",
|
|
245
|
+
"writable": true,
|
|
246
|
+
"pda": {
|
|
247
|
+
"seeds": [
|
|
248
|
+
{
|
|
249
|
+
"kind": "const",
|
|
250
|
+
"value": [98, 111, 110, 100, 105, 110, 103, 95, 99, 117, 114, 118, 101]
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"kind": "account",
|
|
254
|
+
"path": "mint"
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "token_vault",
|
|
261
|
+
"writable": true,
|
|
262
|
+
"pda": {
|
|
263
|
+
"seeds": [
|
|
264
|
+
{
|
|
265
|
+
"kind": "account",
|
|
266
|
+
"path": "bonding_curve"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"kind": "account",
|
|
270
|
+
"path": "token_program"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"kind": "account",
|
|
274
|
+
"path": "mint"
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
"program": {
|
|
278
|
+
"kind": "const",
|
|
279
|
+
"value": [
|
|
280
|
+
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
|
|
281
|
+
153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "token_treasury",
|
|
288
|
+
"docs": ["Per-token treasury for buybacks [V2]"],
|
|
289
|
+
"writable": true,
|
|
290
|
+
"pda": {
|
|
291
|
+
"seeds": [
|
|
292
|
+
{
|
|
293
|
+
"kind": "const",
|
|
294
|
+
"value": [116, 114, 101, 97, 115, 117, 114, 121]
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"kind": "account",
|
|
298
|
+
"path": "mint"
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "treasury_token_account",
|
|
305
|
+
"docs": ["[V13] Treasury's token account - holds vote vault tokens during bonding"],
|
|
306
|
+
"writable": true,
|
|
307
|
+
"pda": {
|
|
308
|
+
"seeds": [
|
|
309
|
+
{
|
|
310
|
+
"kind": "account",
|
|
311
|
+
"path": "token_treasury"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"kind": "account",
|
|
315
|
+
"path": "token_program"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"kind": "account",
|
|
319
|
+
"path": "mint"
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"program": {
|
|
323
|
+
"kind": "const",
|
|
324
|
+
"value": [
|
|
325
|
+
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
|
|
326
|
+
153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
|
|
327
|
+
]
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"name": "buyer_token_account",
|
|
333
|
+
"writable": true,
|
|
334
|
+
"pda": {
|
|
335
|
+
"seeds": [
|
|
336
|
+
{
|
|
337
|
+
"kind": "account",
|
|
338
|
+
"path": "buyer"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"kind": "account",
|
|
342
|
+
"path": "token_program"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"kind": "account",
|
|
346
|
+
"path": "mint"
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
"program": {
|
|
350
|
+
"kind": "const",
|
|
351
|
+
"value": [
|
|
352
|
+
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
|
|
353
|
+
153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
|
|
354
|
+
]
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"name": "user_position",
|
|
360
|
+
"writable": true,
|
|
361
|
+
"pda": {
|
|
362
|
+
"seeds": [
|
|
363
|
+
{
|
|
364
|
+
"kind": "const",
|
|
365
|
+
"value": [117, 115, 101, 114, 95, 112, 111, 115, 105, 116, 105, 111, 110]
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"kind": "account",
|
|
369
|
+
"path": "bonding_curve"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"kind": "account",
|
|
373
|
+
"path": "buyer"
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"name": "user_stats",
|
|
380
|
+
"docs": [
|
|
381
|
+
"[V4] Optional: User stats for volume tracking (platform rewards)",
|
|
382
|
+
"If platform_treasury is not initialized, these can be omitted"
|
|
383
|
+
],
|
|
384
|
+
"writable": true,
|
|
385
|
+
"optional": true,
|
|
386
|
+
"pda": {
|
|
387
|
+
"seeds": [
|
|
388
|
+
{
|
|
389
|
+
"kind": "const",
|
|
390
|
+
"value": [117, 115, 101, 114, 95, 115, 116, 97, 116, 115]
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"kind": "account",
|
|
394
|
+
"path": "buyer"
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"name": "platform_treasury",
|
|
401
|
+
"docs": ["[V4] Optional: Platform treasury for volume tracking"],
|
|
402
|
+
"writable": true,
|
|
403
|
+
"optional": true,
|
|
404
|
+
"pda": {
|
|
405
|
+
"seeds": [
|
|
406
|
+
{
|
|
407
|
+
"kind": "const",
|
|
408
|
+
"value": [
|
|
409
|
+
112, 108, 97, 116, 102, 111, 114, 109, 95, 116, 114, 101, 97, 115, 117, 114, 121
|
|
410
|
+
]
|
|
411
|
+
}
|
|
412
|
+
]
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"name": "protocol_treasury",
|
|
417
|
+
"docs": ["[V13] Protocol treasury receives protocol fees (0.75% after dev split)"],
|
|
418
|
+
"writable": true,
|
|
419
|
+
"pda": {
|
|
420
|
+
"seeds": [
|
|
421
|
+
{
|
|
422
|
+
"kind": "const",
|
|
423
|
+
"value": [
|
|
424
|
+
112, 114, 111, 116, 111, 99, 111, 108, 95, 116, 114, 101, 97, 115, 117, 114, 121,
|
|
425
|
+
95, 118, 49, 49
|
|
426
|
+
]
|
|
427
|
+
}
|
|
428
|
+
]
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"name": "token_program"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"name": "associated_token_program",
|
|
436
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"name": "system_program",
|
|
440
|
+
"address": "11111111111111111111111111111111"
|
|
441
|
+
}
|
|
442
|
+
],
|
|
443
|
+
"args": [
|
|
444
|
+
{
|
|
445
|
+
"name": "args",
|
|
446
|
+
"type": {
|
|
447
|
+
"defined": {
|
|
448
|
+
"name": "BuyArgs"
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"name": "buyback",
|
|
456
|
+
"docs": ["[V2] Execute a buyback using treasury SOL (pre-migration, on bonding curve)."],
|
|
457
|
+
"discriminator": [106, 117, 64, 30, 56, 69, 7, 45],
|
|
458
|
+
"accounts": [
|
|
459
|
+
{
|
|
460
|
+
"name": "payer",
|
|
461
|
+
"docs": ["Anyone can trigger a buyback (permissionless)"],
|
|
462
|
+
"writable": true,
|
|
463
|
+
"signer": true
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"name": "mint",
|
|
467
|
+
"writable": true
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"name": "bonding_curve",
|
|
471
|
+
"writable": true,
|
|
472
|
+
"pda": {
|
|
473
|
+
"seeds": [
|
|
474
|
+
{
|
|
475
|
+
"kind": "const",
|
|
476
|
+
"value": [98, 111, 110, 100, 105, 110, 103, 95, 99, 117, 114, 118, 101]
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"kind": "account",
|
|
480
|
+
"path": "mint"
|
|
481
|
+
}
|
|
482
|
+
]
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"name": "token_vault",
|
|
487
|
+
"writable": true,
|
|
488
|
+
"pda": {
|
|
489
|
+
"seeds": [
|
|
490
|
+
{
|
|
491
|
+
"kind": "account",
|
|
492
|
+
"path": "bonding_curve"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"kind": "account",
|
|
496
|
+
"path": "token_program"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"kind": "account",
|
|
500
|
+
"path": "mint"
|
|
501
|
+
}
|
|
502
|
+
],
|
|
503
|
+
"program": {
|
|
504
|
+
"kind": "const",
|
|
505
|
+
"value": [
|
|
506
|
+
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
|
|
507
|
+
153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
|
|
508
|
+
]
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"name": "token_treasury",
|
|
514
|
+
"docs": ["Per-token treasury with SOL for buybacks"],
|
|
515
|
+
"writable": true,
|
|
516
|
+
"pda": {
|
|
517
|
+
"seeds": [
|
|
518
|
+
{
|
|
519
|
+
"kind": "const",
|
|
520
|
+
"value": [116, 114, 101, 97, 115, 117, 114, 121]
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"kind": "account",
|
|
524
|
+
"path": "mint"
|
|
525
|
+
}
|
|
526
|
+
]
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
"name": "token_program"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"name": "system_program",
|
|
534
|
+
"address": "11111111111111111111111111111111"
|
|
535
|
+
}
|
|
536
|
+
],
|
|
537
|
+
"args": []
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"name": "claim_epoch_rewards",
|
|
541
|
+
"docs": ["Claim epoch rewards based on trading volume."],
|
|
542
|
+
"discriminator": [89, 111, 14, 42, 237, 224, 162, 36],
|
|
543
|
+
"accounts": [
|
|
544
|
+
{
|
|
545
|
+
"name": "user",
|
|
546
|
+
"writable": true,
|
|
547
|
+
"signer": true
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"name": "user_stats",
|
|
551
|
+
"writable": true,
|
|
552
|
+
"pda": {
|
|
553
|
+
"seeds": [
|
|
554
|
+
{
|
|
555
|
+
"kind": "const",
|
|
556
|
+
"value": [117, 115, 101, 114, 95, 115, 116, 97, 116, 115]
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"kind": "account",
|
|
560
|
+
"path": "user"
|
|
561
|
+
}
|
|
562
|
+
]
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"name": "platform_treasury",
|
|
567
|
+
"writable": true,
|
|
568
|
+
"pda": {
|
|
569
|
+
"seeds": [
|
|
570
|
+
{
|
|
571
|
+
"kind": "const",
|
|
572
|
+
"value": [
|
|
573
|
+
112, 108, 97, 116, 102, 111, 114, 109, 95, 116, 114, 101, 97, 115, 117, 114, 121
|
|
574
|
+
]
|
|
575
|
+
}
|
|
576
|
+
]
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"name": "system_program",
|
|
581
|
+
"address": "11111111111111111111111111111111"
|
|
582
|
+
}
|
|
583
|
+
],
|
|
584
|
+
"args": []
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"name": "claim_protocol_rewards",
|
|
588
|
+
"docs": [
|
|
589
|
+
"[V11] Claim protocol rewards.",
|
|
590
|
+
"Users with >= 10 SOL volume in previous epoch can claim proportional share."
|
|
591
|
+
],
|
|
592
|
+
"discriminator": [2, 233, 14, 94, 175, 187, 253, 163],
|
|
593
|
+
"accounts": [
|
|
594
|
+
{
|
|
595
|
+
"name": "user",
|
|
596
|
+
"writable": true,
|
|
597
|
+
"signer": true
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"name": "user_stats",
|
|
601
|
+
"writable": true,
|
|
602
|
+
"pda": {
|
|
603
|
+
"seeds": [
|
|
604
|
+
{
|
|
605
|
+
"kind": "const",
|
|
606
|
+
"value": [117, 115, 101, 114, 95, 115, 116, 97, 116, 115]
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"kind": "account",
|
|
610
|
+
"path": "user"
|
|
611
|
+
}
|
|
612
|
+
]
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"name": "protocol_treasury",
|
|
617
|
+
"writable": true,
|
|
618
|
+
"pda": {
|
|
619
|
+
"seeds": [
|
|
620
|
+
{
|
|
621
|
+
"kind": "const",
|
|
622
|
+
"value": [
|
|
623
|
+
112, 114, 111, 116, 111, 99, 111, 108, 95, 116, 114, 101, 97, 115, 117, 114, 121,
|
|
624
|
+
95, 118, 49, 49
|
|
625
|
+
]
|
|
626
|
+
}
|
|
627
|
+
]
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"name": "system_program",
|
|
632
|
+
"address": "11111111111111111111111111111111"
|
|
633
|
+
}
|
|
634
|
+
],
|
|
635
|
+
"args": []
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"name": "contribute_revival",
|
|
639
|
+
"docs": [
|
|
640
|
+
"[V12] Contribute SOL to revive a reclaimed token.",
|
|
641
|
+
"When contributions reach 30 SOL, the token is automatically revived."
|
|
642
|
+
],
|
|
643
|
+
"discriminator": [105, 16, 174, 226, 236, 231, 13, 250],
|
|
644
|
+
"accounts": [
|
|
645
|
+
{
|
|
646
|
+
"name": "contributor",
|
|
647
|
+
"writable": true,
|
|
648
|
+
"signer": true
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"name": "mint",
|
|
652
|
+
"docs": ["The mint of the reclaimed token"]
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
"name": "bonding_curve",
|
|
656
|
+
"docs": ["Bonding curve - must be reclaimed to accept revival contributions"],
|
|
657
|
+
"writable": true,
|
|
658
|
+
"pda": {
|
|
659
|
+
"seeds": [
|
|
660
|
+
{
|
|
661
|
+
"kind": "const",
|
|
662
|
+
"value": [98, 111, 110, 100, 105, 110, 103, 95, 99, 117, 114, 118, 101]
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"kind": "account",
|
|
666
|
+
"path": "mint"
|
|
667
|
+
}
|
|
668
|
+
]
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"name": "system_program",
|
|
673
|
+
"address": "11111111111111111111111111111111"
|
|
674
|
+
}
|
|
675
|
+
],
|
|
676
|
+
"args": [
|
|
677
|
+
{
|
|
678
|
+
"name": "sol_amount",
|
|
679
|
+
"type": "u64"
|
|
680
|
+
}
|
|
681
|
+
]
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
"name": "create_token",
|
|
685
|
+
"docs": ["[V3] Create a new Token-2022 token with transfer fee extension."],
|
|
686
|
+
"discriminator": [84, 52, 204, 228, 24, 140, 234, 75],
|
|
687
|
+
"accounts": [
|
|
688
|
+
{
|
|
689
|
+
"name": "creator",
|
|
690
|
+
"writable": true,
|
|
691
|
+
"signer": true
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"name": "global_config",
|
|
695
|
+
"pda": {
|
|
696
|
+
"seeds": [
|
|
697
|
+
{
|
|
698
|
+
"kind": "const",
|
|
699
|
+
"value": [103, 108, 111, 98, 97, 108, 95, 99, 111, 110, 102, 105, 103]
|
|
700
|
+
}
|
|
701
|
+
]
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
"name": "mint",
|
|
706
|
+
"writable": true,
|
|
707
|
+
"signer": true
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"name": "bonding_curve",
|
|
711
|
+
"writable": true,
|
|
712
|
+
"pda": {
|
|
713
|
+
"seeds": [
|
|
714
|
+
{
|
|
715
|
+
"kind": "const",
|
|
716
|
+
"value": [98, 111, 110, 100, 105, 110, 103, 95, 99, 117, 114, 118, 101]
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"kind": "account",
|
|
720
|
+
"path": "mint"
|
|
721
|
+
}
|
|
722
|
+
]
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"name": "token_vault",
|
|
727
|
+
"writable": true
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
"name": "treasury",
|
|
731
|
+
"writable": true,
|
|
732
|
+
"pda": {
|
|
733
|
+
"seeds": [
|
|
734
|
+
{
|
|
735
|
+
"kind": "const",
|
|
736
|
+
"value": [116, 114, 101, 97, 115, 117, 114, 121]
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"kind": "account",
|
|
740
|
+
"path": "mint"
|
|
741
|
+
}
|
|
742
|
+
]
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"name": "treasury_token_account",
|
|
747
|
+
"docs": ["then buyback tokens post-migration. Created via CPI."],
|
|
748
|
+
"writable": true
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"name": "token_2022_program"
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"name": "associated_token_program",
|
|
755
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
"name": "system_program",
|
|
759
|
+
"address": "11111111111111111111111111111111"
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"name": "rent",
|
|
763
|
+
"address": "SysvarRent111111111111111111111111111111111"
|
|
764
|
+
}
|
|
765
|
+
],
|
|
766
|
+
"args": [
|
|
767
|
+
{
|
|
768
|
+
"name": "args",
|
|
769
|
+
"type": {
|
|
770
|
+
"defined": {
|
|
771
|
+
"name": "CreateTokenArgs"
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
]
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"name": "execute_auto_buyback",
|
|
779
|
+
"docs": [
|
|
780
|
+
"[V9] Execute automatic treasury buyback on Raydium DEX.",
|
|
781
|
+
"Monitors pool ratio and triggers buyback when price drops below threshold.",
|
|
782
|
+
"Permissionless - anyone can call (keeper/crank)."
|
|
783
|
+
],
|
|
784
|
+
"discriminator": [191, 2, 228, 246, 241, 139, 119, 21],
|
|
785
|
+
"accounts": [
|
|
786
|
+
{
|
|
787
|
+
"name": "payer",
|
|
788
|
+
"docs": ["Anyone can trigger buyback (permissionless)"],
|
|
789
|
+
"writable": true,
|
|
790
|
+
"signer": true
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
"name": "mint",
|
|
794
|
+
"docs": ["Token mint (mutable for burning)"],
|
|
795
|
+
"writable": true
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"name": "bonding_curve",
|
|
799
|
+
"docs": ["Bonding curve (must be migrated)"],
|
|
800
|
+
"pda": {
|
|
801
|
+
"seeds": [
|
|
802
|
+
{
|
|
803
|
+
"kind": "const",
|
|
804
|
+
"value": [98, 111, 110, 100, 105, 110, 103, 95, 99, 117, 114, 118, 101]
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
"kind": "account",
|
|
808
|
+
"path": "mint"
|
|
809
|
+
}
|
|
810
|
+
]
|
|
811
|
+
}
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"name": "treasury",
|
|
815
|
+
"docs": ["Token treasury (has SOL for buybacks)"],
|
|
816
|
+
"writable": true,
|
|
817
|
+
"pda": {
|
|
818
|
+
"seeds": [
|
|
819
|
+
{
|
|
820
|
+
"kind": "const",
|
|
821
|
+
"value": [116, 114, 101, 97, 115, 117, 114, 121]
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"kind": "account",
|
|
825
|
+
"path": "mint"
|
|
826
|
+
}
|
|
827
|
+
]
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"name": "treasury_wsol",
|
|
832
|
+
"docs": ["Treasury's WSOL account for swapping"],
|
|
833
|
+
"writable": true
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"name": "treasury_token",
|
|
837
|
+
"docs": ["Treasury's token account for receiving bought tokens"],
|
|
838
|
+
"writable": true,
|
|
839
|
+
"pda": {
|
|
840
|
+
"seeds": [
|
|
841
|
+
{
|
|
842
|
+
"kind": "account",
|
|
843
|
+
"path": "treasury"
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"kind": "account",
|
|
847
|
+
"path": "token_2022_program"
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"kind": "account",
|
|
851
|
+
"path": "mint"
|
|
852
|
+
}
|
|
853
|
+
],
|
|
854
|
+
"program": {
|
|
855
|
+
"kind": "const",
|
|
856
|
+
"value": [
|
|
857
|
+
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
|
|
858
|
+
153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
|
|
859
|
+
]
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
"name": "raydium_program",
|
|
865
|
+
"address": "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
"name": "raydium_authority"
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
"name": "amm_config",
|
|
872
|
+
"docs": ["Raydium AMM config"]
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"name": "pool_state",
|
|
876
|
+
"docs": ["Raydium pool state"],
|
|
877
|
+
"writable": true
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
"name": "input_vault",
|
|
881
|
+
"docs": ["Pool's input vault (WSOL vault)"],
|
|
882
|
+
"writable": true
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
"name": "output_vault",
|
|
886
|
+
"docs": ["Pool's output vault (token vault)"],
|
|
887
|
+
"writable": true
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
"name": "wsol_mint",
|
|
891
|
+
"docs": ["WSOL mint"],
|
|
892
|
+
"address": "So11111111111111111111111111111111111111112"
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"name": "observation_state",
|
|
896
|
+
"docs": ["Raydium observation state"],
|
|
897
|
+
"writable": true
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"name": "token_program"
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
"name": "token_2022_program"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"name": "system_program",
|
|
907
|
+
"address": "11111111111111111111111111111111"
|
|
908
|
+
}
|
|
909
|
+
],
|
|
910
|
+
"args": [
|
|
911
|
+
{
|
|
912
|
+
"name": "minimum_amount_out",
|
|
913
|
+
"type": "u64"
|
|
914
|
+
}
|
|
915
|
+
]
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"name": "harvest_fees",
|
|
919
|
+
"docs": ["[V3] Harvest accumulated transfer fees."],
|
|
920
|
+
"discriminator": [90, 149, 158, 241, 163, 186, 155, 202],
|
|
921
|
+
"accounts": [
|
|
922
|
+
{
|
|
923
|
+
"name": "payer",
|
|
924
|
+
"docs": ["Anyone can harvest fees (permissionless)"],
|
|
925
|
+
"writable": true,
|
|
926
|
+
"signer": true
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
"name": "mint",
|
|
930
|
+
"writable": true
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
"name": "bonding_curve",
|
|
934
|
+
"pda": {
|
|
935
|
+
"seeds": [
|
|
936
|
+
{
|
|
937
|
+
"kind": "const",
|
|
938
|
+
"value": [98, 111, 110, 100, 105, 110, 103, 95, 99, 117, 114, 118, 101]
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"kind": "account",
|
|
942
|
+
"path": "mint"
|
|
943
|
+
}
|
|
944
|
+
]
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"name": "token_treasury",
|
|
949
|
+
"docs": ["Token treasury PDA (withdraw authority for fees)"],
|
|
950
|
+
"writable": true,
|
|
951
|
+
"pda": {
|
|
952
|
+
"seeds": [
|
|
953
|
+
{
|
|
954
|
+
"kind": "const",
|
|
955
|
+
"value": [116, 114, 101, 97, 115, 117, 114, 121]
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"kind": "account",
|
|
959
|
+
"path": "mint"
|
|
960
|
+
}
|
|
961
|
+
]
|
|
962
|
+
}
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"name": "treasury_token_account",
|
|
966
|
+
"writable": true
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"name": "token_2022_program"
|
|
970
|
+
}
|
|
971
|
+
],
|
|
972
|
+
"args": []
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
"name": "initialize",
|
|
976
|
+
"docs": ["Initialize the torch.market protocol."],
|
|
977
|
+
"discriminator": [175, 175, 109, 31, 13, 152, 155, 237],
|
|
978
|
+
"accounts": [
|
|
979
|
+
{
|
|
980
|
+
"name": "authority",
|
|
981
|
+
"writable": true,
|
|
982
|
+
"signer": true
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
"name": "global_config",
|
|
986
|
+
"writable": true,
|
|
987
|
+
"pda": {
|
|
988
|
+
"seeds": [
|
|
989
|
+
{
|
|
990
|
+
"kind": "const",
|
|
991
|
+
"value": [103, 108, 111, 98, 97, 108, 95, 99, 111, 110, 102, 105, 103]
|
|
992
|
+
}
|
|
993
|
+
]
|
|
994
|
+
}
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
"name": "treasury"
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"name": "dev_wallet"
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
"name": "system_program",
|
|
1004
|
+
"address": "11111111111111111111111111111111"
|
|
1005
|
+
}
|
|
1006
|
+
],
|
|
1007
|
+
"args": []
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
"name": "initialize_platform_treasury",
|
|
1011
|
+
"docs": ["Initialize the platform treasury for V4 rewards distribution."],
|
|
1012
|
+
"discriminator": [35, 40, 189, 111, 59, 198, 69, 211],
|
|
1013
|
+
"accounts": [
|
|
1014
|
+
{
|
|
1015
|
+
"name": "authority",
|
|
1016
|
+
"writable": true,
|
|
1017
|
+
"signer": true,
|
|
1018
|
+
"relations": ["global_config"]
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"name": "global_config",
|
|
1022
|
+
"writable": true,
|
|
1023
|
+
"pda": {
|
|
1024
|
+
"seeds": [
|
|
1025
|
+
{
|
|
1026
|
+
"kind": "const",
|
|
1027
|
+
"value": [103, 108, 111, 98, 97, 108, 95, 99, 111, 110, 102, 105, 103]
|
|
1028
|
+
}
|
|
1029
|
+
]
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
"name": "platform_treasury",
|
|
1034
|
+
"writable": true,
|
|
1035
|
+
"pda": {
|
|
1036
|
+
"seeds": [
|
|
1037
|
+
{
|
|
1038
|
+
"kind": "const",
|
|
1039
|
+
"value": [
|
|
1040
|
+
112, 108, 97, 116, 102, 111, 114, 109, 95, 116, 114, 101, 97, 115, 117, 114, 121
|
|
1041
|
+
]
|
|
1042
|
+
}
|
|
1043
|
+
]
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"name": "system_program",
|
|
1048
|
+
"address": "11111111111111111111111111111111"
|
|
1049
|
+
}
|
|
1050
|
+
],
|
|
1051
|
+
"args": []
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
"name": "initialize_protocol_treasury",
|
|
1055
|
+
"docs": [
|
|
1056
|
+
"[V11] Initialize the protocol treasury PDA.",
|
|
1057
|
+
"Protocol fees (0.5%) accumulate here with 1500 SOL reserve floor."
|
|
1058
|
+
],
|
|
1059
|
+
"discriminator": [125, 148, 53, 197, 136, 81, 65, 58],
|
|
1060
|
+
"accounts": [
|
|
1061
|
+
{
|
|
1062
|
+
"name": "authority",
|
|
1063
|
+
"writable": true,
|
|
1064
|
+
"signer": true,
|
|
1065
|
+
"relations": ["global_config"]
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
"name": "global_config",
|
|
1069
|
+
"pda": {
|
|
1070
|
+
"seeds": [
|
|
1071
|
+
{
|
|
1072
|
+
"kind": "const",
|
|
1073
|
+
"value": [103, 108, 111, 98, 97, 108, 95, 99, 111, 110, 102, 105, 103]
|
|
1074
|
+
}
|
|
1075
|
+
]
|
|
1076
|
+
}
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
"name": "protocol_treasury",
|
|
1080
|
+
"writable": true,
|
|
1081
|
+
"pda": {
|
|
1082
|
+
"seeds": [
|
|
1083
|
+
{
|
|
1084
|
+
"kind": "const",
|
|
1085
|
+
"value": [
|
|
1086
|
+
112, 114, 111, 116, 111, 99, 111, 108, 95, 116, 114, 101, 97, 115, 117, 114, 121,
|
|
1087
|
+
95, 118, 49, 49
|
|
1088
|
+
]
|
|
1089
|
+
}
|
|
1090
|
+
]
|
|
1091
|
+
}
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
"name": "system_program",
|
|
1095
|
+
"address": "11111111111111111111111111111111"
|
|
1096
|
+
}
|
|
1097
|
+
],
|
|
1098
|
+
"args": []
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
"name": "liquidate",
|
|
1102
|
+
"docs": [
|
|
1103
|
+
"[V2.4] Liquidate an underwater loan position.",
|
|
1104
|
+
"Permissionless - anyone can call when LTV exceeds liquidation threshold."
|
|
1105
|
+
],
|
|
1106
|
+
"discriminator": [223, 179, 226, 125, 48, 46, 39, 74],
|
|
1107
|
+
"accounts": [
|
|
1108
|
+
{
|
|
1109
|
+
"name": "liquidator",
|
|
1110
|
+
"docs": ["Liquidator pays SOL to treasury, receives collateral tokens"],
|
|
1111
|
+
"writable": true,
|
|
1112
|
+
"signer": true
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
"name": "borrower",
|
|
1116
|
+
"writable": true
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
"name": "mint"
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
"name": "bonding_curve",
|
|
1123
|
+
"pda": {
|
|
1124
|
+
"seeds": [
|
|
1125
|
+
{
|
|
1126
|
+
"kind": "const",
|
|
1127
|
+
"value": [98, 111, 110, 100, 105, 110, 103, 95, 99, 117, 114, 118, 101]
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
"kind": "account",
|
|
1131
|
+
"path": "mint"
|
|
1132
|
+
}
|
|
1133
|
+
]
|
|
1134
|
+
}
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
"name": "treasury",
|
|
1138
|
+
"writable": true,
|
|
1139
|
+
"pda": {
|
|
1140
|
+
"seeds": [
|
|
1141
|
+
{
|
|
1142
|
+
"kind": "const",
|
|
1143
|
+
"value": [116, 114, 101, 97, 115, 117, 114, 121]
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
"kind": "account",
|
|
1147
|
+
"path": "mint"
|
|
1148
|
+
}
|
|
1149
|
+
]
|
|
1150
|
+
}
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
"name": "collateral_vault",
|
|
1154
|
+
"docs": ["Collateral vault - source of seized collateral"],
|
|
1155
|
+
"writable": true,
|
|
1156
|
+
"pda": {
|
|
1157
|
+
"seeds": [
|
|
1158
|
+
{
|
|
1159
|
+
"kind": "const",
|
|
1160
|
+
"value": [99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 95, 118, 97, 117, 108, 116]
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
"kind": "account",
|
|
1164
|
+
"path": "mint"
|
|
1165
|
+
}
|
|
1166
|
+
]
|
|
1167
|
+
}
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"name": "liquidator_token_account",
|
|
1171
|
+
"docs": ["Liquidator's token account (receives seized collateral + bonus)"],
|
|
1172
|
+
"writable": true,
|
|
1173
|
+
"pda": {
|
|
1174
|
+
"seeds": [
|
|
1175
|
+
{
|
|
1176
|
+
"kind": "account",
|
|
1177
|
+
"path": "liquidator"
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
"kind": "account",
|
|
1181
|
+
"path": "token_program"
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
"kind": "account",
|
|
1185
|
+
"path": "mint"
|
|
1186
|
+
}
|
|
1187
|
+
],
|
|
1188
|
+
"program": {
|
|
1189
|
+
"kind": "const",
|
|
1190
|
+
"value": [
|
|
1191
|
+
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
|
|
1192
|
+
153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
|
|
1193
|
+
]
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
"name": "loan_position",
|
|
1199
|
+
"docs": ["Loan position being liquidated"],
|
|
1200
|
+
"writable": true,
|
|
1201
|
+
"pda": {
|
|
1202
|
+
"seeds": [
|
|
1203
|
+
{
|
|
1204
|
+
"kind": "const",
|
|
1205
|
+
"value": [108, 111, 97, 110]
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
"kind": "account",
|
|
1209
|
+
"path": "mint"
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"kind": "account",
|
|
1213
|
+
"path": "borrower"
|
|
1214
|
+
}
|
|
1215
|
+
]
|
|
1216
|
+
}
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
"name": "pool_state",
|
|
1220
|
+
"docs": ["Raydium pool state for price calculation"]
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
"name": "token_vault_0",
|
|
1224
|
+
"docs": ["Pool token vault 0"]
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
"name": "token_vault_1",
|
|
1228
|
+
"docs": ["Pool token vault 1"]
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
"name": "token_program"
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
"name": "associated_token_program",
|
|
1235
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
"name": "system_program",
|
|
1239
|
+
"address": "11111111111111111111111111111111"
|
|
1240
|
+
}
|
|
1241
|
+
],
|
|
1242
|
+
"args": []
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
"name": "migrate_to_dex",
|
|
1246
|
+
"docs": [
|
|
1247
|
+
"[V5] Migrate bonded token to Raydium CPMM DEX.",
|
|
1248
|
+
"Creates a Raydium pool with locked liquidity (LP tokens burned)."
|
|
1249
|
+
],
|
|
1250
|
+
"discriminator": [246, 150, 122, 141, 49, 26, 211, 26],
|
|
1251
|
+
"accounts": [
|
|
1252
|
+
{
|
|
1253
|
+
"name": "payer",
|
|
1254
|
+
"docs": ["Anyone can trigger migration (pays rent for new accounts)"],
|
|
1255
|
+
"writable": true,
|
|
1256
|
+
"signer": true
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
"name": "global_config",
|
|
1260
|
+
"docs": ["Global config for protocol settings"],
|
|
1261
|
+
"pda": {
|
|
1262
|
+
"seeds": [
|
|
1263
|
+
{
|
|
1264
|
+
"kind": "const",
|
|
1265
|
+
"value": [103, 108, 111, 98, 97, 108, 95, 99, 111, 110, 102, 105, 103]
|
|
1266
|
+
}
|
|
1267
|
+
]
|
|
1268
|
+
}
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
"name": "mint",
|
|
1272
|
+
"docs": ["Token mint being migrated"],
|
|
1273
|
+
"writable": true
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
"name": "bonding_curve",
|
|
1277
|
+
"docs": ["Bonding curve being migrated"],
|
|
1278
|
+
"writable": true,
|
|
1279
|
+
"pda": {
|
|
1280
|
+
"seeds": [
|
|
1281
|
+
{
|
|
1282
|
+
"kind": "const",
|
|
1283
|
+
"value": [98, 111, 110, 100, 105, 110, 103, 95, 99, 117, 114, 118, 101]
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
"kind": "account",
|
|
1287
|
+
"path": "mint"
|
|
1288
|
+
}
|
|
1289
|
+
]
|
|
1290
|
+
}
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
"name": "treasury",
|
|
1294
|
+
"docs": ["Token treasury (pays 0.15 SOL migration fee from its balance)"],
|
|
1295
|
+
"writable": true,
|
|
1296
|
+
"pda": {
|
|
1297
|
+
"seeds": [
|
|
1298
|
+
{
|
|
1299
|
+
"kind": "const",
|
|
1300
|
+
"value": [116, 114, 101, 97, 115, 117, 114, 121]
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
"kind": "account",
|
|
1304
|
+
"path": "mint"
|
|
1305
|
+
}
|
|
1306
|
+
]
|
|
1307
|
+
}
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
"name": "token_vault",
|
|
1311
|
+
"docs": ["Bonding curve token vault (source of tokens for LP)"],
|
|
1312
|
+
"writable": true,
|
|
1313
|
+
"pda": {
|
|
1314
|
+
"seeds": [
|
|
1315
|
+
{
|
|
1316
|
+
"kind": "account",
|
|
1317
|
+
"path": "bonding_curve"
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
"kind": "account",
|
|
1321
|
+
"path": "token_2022_program"
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
"kind": "account",
|
|
1325
|
+
"path": "mint"
|
|
1326
|
+
}
|
|
1327
|
+
],
|
|
1328
|
+
"program": {
|
|
1329
|
+
"kind": "const",
|
|
1330
|
+
"value": [
|
|
1331
|
+
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
|
|
1332
|
+
153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
|
|
1333
|
+
]
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
"name": "treasury_token_account",
|
|
1339
|
+
"docs": [
|
|
1340
|
+
"[V13] Treasury's token account - holds vote vault tokens to be returned or burned"
|
|
1341
|
+
],
|
|
1342
|
+
"writable": true,
|
|
1343
|
+
"pda": {
|
|
1344
|
+
"seeds": [
|
|
1345
|
+
{
|
|
1346
|
+
"kind": "account",
|
|
1347
|
+
"path": "treasury"
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
"kind": "account",
|
|
1351
|
+
"path": "token_2022_program"
|
|
1352
|
+
},
|
|
1353
|
+
{
|
|
1354
|
+
"kind": "account",
|
|
1355
|
+
"path": "mint"
|
|
1356
|
+
}
|
|
1357
|
+
],
|
|
1358
|
+
"program": {
|
|
1359
|
+
"kind": "const",
|
|
1360
|
+
"value": [
|
|
1361
|
+
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
|
|
1362
|
+
153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
|
|
1363
|
+
]
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
"name": "payer_wsol",
|
|
1369
|
+
"docs": ["Payer's WSOL account (created for migration, funded with bonding curve SOL)"],
|
|
1370
|
+
"writable": true
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
"name": "payer_token",
|
|
1374
|
+
"docs": ["Payer's token account (receives tokens from bonding curve)"],
|
|
1375
|
+
"writable": true
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
"name": "raydium_program",
|
|
1379
|
+
"address": "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
"name": "amm_config",
|
|
1383
|
+
"docs": ["Raydium AMM config"]
|
|
1384
|
+
},
|
|
1385
|
+
{
|
|
1386
|
+
"name": "raydium_authority",
|
|
1387
|
+
"docs": ["Raydium authority PDA"]
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
"name": "pool_state",
|
|
1391
|
+
"docs": ["Raydium pool state PDA (created by Raydium via init)"],
|
|
1392
|
+
"writable": true
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
"name": "wsol_mint",
|
|
1396
|
+
"docs": ["WSOL mint"],
|
|
1397
|
+
"address": "So11111111111111111111111111111111111111112"
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
"name": "token_0_vault",
|
|
1401
|
+
"docs": ["Pool token 0 vault (WSOL or token depending on ordering)"],
|
|
1402
|
+
"writable": true
|
|
1403
|
+
},
|
|
1404
|
+
{
|
|
1405
|
+
"name": "token_1_vault",
|
|
1406
|
+
"docs": ["Pool token 1 vault"],
|
|
1407
|
+
"writable": true
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
"name": "lp_mint",
|
|
1411
|
+
"docs": ["LP token mint PDA (created by Raydium via init)"],
|
|
1412
|
+
"writable": true
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
"name": "payer_lp_token",
|
|
1416
|
+
"docs": ["Payer's LP token account (receives LP tokens, then burned)"],
|
|
1417
|
+
"writable": true
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
"name": "observation_state",
|
|
1421
|
+
"docs": ["Raydium observation state PDA (created by Raydium via init)"],
|
|
1422
|
+
"writable": true
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
"name": "create_pool_fee",
|
|
1426
|
+
"docs": ["Raydium fee receiver (receives 0.15 SOL)"],
|
|
1427
|
+
"writable": true
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
"name": "token_program"
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
"name": "token_2022_program"
|
|
1434
|
+
},
|
|
1435
|
+
{
|
|
1436
|
+
"name": "associated_token_program"
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
"name": "system_program",
|
|
1440
|
+
"address": "11111111111111111111111111111111"
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
"name": "rent",
|
|
1444
|
+
"address": "SysvarRent111111111111111111111111111111111"
|
|
1445
|
+
}
|
|
1446
|
+
],
|
|
1447
|
+
"args": []
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
"name": "reclaim_failed_token",
|
|
1451
|
+
"docs": ["[V12] Reclaim SOL from a failed token (inactive for 1+ epochs)."],
|
|
1452
|
+
"discriminator": [20, 104, 182, 102, 23, 150, 59, 179],
|
|
1453
|
+
"accounts": [
|
|
1454
|
+
{
|
|
1455
|
+
"name": "payer",
|
|
1456
|
+
"writable": true,
|
|
1457
|
+
"signer": true
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
"name": "mint"
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
"name": "bonding_curve",
|
|
1464
|
+
"writable": true,
|
|
1465
|
+
"pda": {
|
|
1466
|
+
"seeds": [
|
|
1467
|
+
{
|
|
1468
|
+
"kind": "const",
|
|
1469
|
+
"value": [98, 111, 110, 100, 105, 110, 103, 95, 99, 117, 114, 118, 101]
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
"kind": "account",
|
|
1473
|
+
"path": "mint"
|
|
1474
|
+
}
|
|
1475
|
+
]
|
|
1476
|
+
}
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"name": "token_treasury",
|
|
1480
|
+
"writable": true,
|
|
1481
|
+
"pda": {
|
|
1482
|
+
"seeds": [
|
|
1483
|
+
{
|
|
1484
|
+
"kind": "const",
|
|
1485
|
+
"value": [116, 114, 101, 97, 115, 117, 114, 121]
|
|
1486
|
+
},
|
|
1487
|
+
{
|
|
1488
|
+
"kind": "account",
|
|
1489
|
+
"path": "mint"
|
|
1490
|
+
}
|
|
1491
|
+
]
|
|
1492
|
+
}
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
"name": "platform_treasury",
|
|
1496
|
+
"writable": true,
|
|
1497
|
+
"pda": {
|
|
1498
|
+
"seeds": [
|
|
1499
|
+
{
|
|
1500
|
+
"kind": "const",
|
|
1501
|
+
"value": [
|
|
1502
|
+
112, 108, 97, 116, 102, 111, 114, 109, 95, 116, 114, 101, 97, 115, 117, 114, 121
|
|
1503
|
+
]
|
|
1504
|
+
}
|
|
1505
|
+
]
|
|
1506
|
+
}
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
"name": "system_program",
|
|
1510
|
+
"address": "11111111111111111111111111111111"
|
|
1511
|
+
}
|
|
1512
|
+
],
|
|
1513
|
+
"args": []
|
|
1514
|
+
},
|
|
1515
|
+
{
|
|
1516
|
+
"name": "repay",
|
|
1517
|
+
"docs": [
|
|
1518
|
+
"[V2.4] Repay SOL debt and receive collateral back.",
|
|
1519
|
+
"Partial repay reduces debt. Full repay returns all collateral and closes position."
|
|
1520
|
+
],
|
|
1521
|
+
"discriminator": [234, 103, 67, 82, 208, 234, 219, 166],
|
|
1522
|
+
"accounts": [
|
|
1523
|
+
{
|
|
1524
|
+
"name": "borrower",
|
|
1525
|
+
"writable": true,
|
|
1526
|
+
"signer": true
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
"name": "mint"
|
|
1530
|
+
},
|
|
1531
|
+
{
|
|
1532
|
+
"name": "treasury",
|
|
1533
|
+
"writable": true,
|
|
1534
|
+
"pda": {
|
|
1535
|
+
"seeds": [
|
|
1536
|
+
{
|
|
1537
|
+
"kind": "const",
|
|
1538
|
+
"value": [116, 114, 101, 97, 115, 117, 114, 121]
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
"kind": "account",
|
|
1542
|
+
"path": "mint"
|
|
1543
|
+
}
|
|
1544
|
+
]
|
|
1545
|
+
}
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
"name": "collateral_vault",
|
|
1549
|
+
"docs": ["Collateral vault - returns tokens on repay"],
|
|
1550
|
+
"writable": true,
|
|
1551
|
+
"pda": {
|
|
1552
|
+
"seeds": [
|
|
1553
|
+
{
|
|
1554
|
+
"kind": "const",
|
|
1555
|
+
"value": [99, 111, 108, 108, 97, 116, 101, 114, 97, 108, 95, 118, 97, 117, 108, 116]
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
"kind": "account",
|
|
1559
|
+
"path": "mint"
|
|
1560
|
+
}
|
|
1561
|
+
]
|
|
1562
|
+
}
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
"name": "borrower_token_account",
|
|
1566
|
+
"docs": ["Borrower's token account (receives collateral back on full repay)"],
|
|
1567
|
+
"writable": true,
|
|
1568
|
+
"pda": {
|
|
1569
|
+
"seeds": [
|
|
1570
|
+
{
|
|
1571
|
+
"kind": "account",
|
|
1572
|
+
"path": "borrower"
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
"kind": "account",
|
|
1576
|
+
"path": "token_program"
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
"kind": "account",
|
|
1580
|
+
"path": "mint"
|
|
1581
|
+
}
|
|
1582
|
+
],
|
|
1583
|
+
"program": {
|
|
1584
|
+
"kind": "const",
|
|
1585
|
+
"value": [
|
|
1586
|
+
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
|
|
1587
|
+
153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
|
|
1588
|
+
]
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
},
|
|
1592
|
+
{
|
|
1593
|
+
"name": "loan_position",
|
|
1594
|
+
"docs": ["Loan position PDA"],
|
|
1595
|
+
"writable": true,
|
|
1596
|
+
"pda": {
|
|
1597
|
+
"seeds": [
|
|
1598
|
+
{
|
|
1599
|
+
"kind": "const",
|
|
1600
|
+
"value": [108, 111, 97, 110]
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
"kind": "account",
|
|
1604
|
+
"path": "mint"
|
|
1605
|
+
},
|
|
1606
|
+
{
|
|
1607
|
+
"kind": "account",
|
|
1608
|
+
"path": "borrower"
|
|
1609
|
+
}
|
|
1610
|
+
]
|
|
1611
|
+
}
|
|
1612
|
+
},
|
|
1613
|
+
{
|
|
1614
|
+
"name": "token_program"
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
"name": "system_program",
|
|
1618
|
+
"address": "11111111111111111111111111111111"
|
|
1619
|
+
}
|
|
1620
|
+
],
|
|
1621
|
+
"args": [
|
|
1622
|
+
{
|
|
1623
|
+
"name": "sol_amount",
|
|
1624
|
+
"type": "u64"
|
|
1625
|
+
}
|
|
1626
|
+
]
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
"name": "sell",
|
|
1630
|
+
"docs": ["Sell tokens back to the bonding curve."],
|
|
1631
|
+
"discriminator": [51, 230, 133, 164, 1, 127, 131, 173],
|
|
1632
|
+
"accounts": [
|
|
1633
|
+
{
|
|
1634
|
+
"name": "seller",
|
|
1635
|
+
"writable": true,
|
|
1636
|
+
"signer": true
|
|
1637
|
+
},
|
|
1638
|
+
{
|
|
1639
|
+
"name": "mint"
|
|
1640
|
+
},
|
|
1641
|
+
{
|
|
1642
|
+
"name": "bonding_curve",
|
|
1643
|
+
"writable": true,
|
|
1644
|
+
"pda": {
|
|
1645
|
+
"seeds": [
|
|
1646
|
+
{
|
|
1647
|
+
"kind": "const",
|
|
1648
|
+
"value": [98, 111, 110, 100, 105, 110, 103, 95, 99, 117, 114, 118, 101]
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
"kind": "account",
|
|
1652
|
+
"path": "mint"
|
|
1653
|
+
}
|
|
1654
|
+
]
|
|
1655
|
+
}
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
"name": "token_vault",
|
|
1659
|
+
"writable": true,
|
|
1660
|
+
"pda": {
|
|
1661
|
+
"seeds": [
|
|
1662
|
+
{
|
|
1663
|
+
"kind": "account",
|
|
1664
|
+
"path": "bonding_curve"
|
|
1665
|
+
},
|
|
1666
|
+
{
|
|
1667
|
+
"kind": "account",
|
|
1668
|
+
"path": "token_program"
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
"kind": "account",
|
|
1672
|
+
"path": "mint"
|
|
1673
|
+
}
|
|
1674
|
+
],
|
|
1675
|
+
"program": {
|
|
1676
|
+
"kind": "const",
|
|
1677
|
+
"value": [
|
|
1678
|
+
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
|
|
1679
|
+
153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
|
|
1680
|
+
]
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
"name": "seller_token_account",
|
|
1686
|
+
"writable": true,
|
|
1687
|
+
"pda": {
|
|
1688
|
+
"seeds": [
|
|
1689
|
+
{
|
|
1690
|
+
"kind": "account",
|
|
1691
|
+
"path": "seller"
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
"kind": "account",
|
|
1695
|
+
"path": "token_program"
|
|
1696
|
+
},
|
|
1697
|
+
{
|
|
1698
|
+
"kind": "account",
|
|
1699
|
+
"path": "mint"
|
|
1700
|
+
}
|
|
1701
|
+
],
|
|
1702
|
+
"program": {
|
|
1703
|
+
"kind": "const",
|
|
1704
|
+
"value": [
|
|
1705
|
+
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
|
|
1706
|
+
153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
|
|
1707
|
+
]
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
},
|
|
1711
|
+
{
|
|
1712
|
+
"name": "user_position",
|
|
1713
|
+
"pda": {
|
|
1714
|
+
"seeds": [
|
|
1715
|
+
{
|
|
1716
|
+
"kind": "const",
|
|
1717
|
+
"value": [117, 115, 101, 114, 95, 112, 111, 115, 105, 116, 105, 111, 110]
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
"kind": "account",
|
|
1721
|
+
"path": "bonding_curve"
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
"kind": "account",
|
|
1725
|
+
"path": "seller"
|
|
1726
|
+
}
|
|
1727
|
+
]
|
|
1728
|
+
}
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
"name": "token_treasury",
|
|
1732
|
+
"docs": ["Per-token treasury receives sell fee [V2]"],
|
|
1733
|
+
"writable": true,
|
|
1734
|
+
"pda": {
|
|
1735
|
+
"seeds": [
|
|
1736
|
+
{
|
|
1737
|
+
"kind": "const",
|
|
1738
|
+
"value": [116, 114, 101, 97, 115, 117, 114, 121]
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
"kind": "account",
|
|
1742
|
+
"path": "mint"
|
|
1743
|
+
}
|
|
1744
|
+
]
|
|
1745
|
+
}
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
"name": "user_stats",
|
|
1749
|
+
"docs": ["[V4] Optional: User stats for volume tracking (platform rewards)"],
|
|
1750
|
+
"writable": true,
|
|
1751
|
+
"optional": true,
|
|
1752
|
+
"pda": {
|
|
1753
|
+
"seeds": [
|
|
1754
|
+
{
|
|
1755
|
+
"kind": "const",
|
|
1756
|
+
"value": [117, 115, 101, 114, 95, 115, 116, 97, 116, 115]
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
"kind": "account",
|
|
1760
|
+
"path": "seller"
|
|
1761
|
+
}
|
|
1762
|
+
]
|
|
1763
|
+
}
|
|
1764
|
+
},
|
|
1765
|
+
{
|
|
1766
|
+
"name": "platform_treasury",
|
|
1767
|
+
"docs": ["[V4] Optional: Platform treasury for volume tracking"],
|
|
1768
|
+
"writable": true,
|
|
1769
|
+
"optional": true,
|
|
1770
|
+
"pda": {
|
|
1771
|
+
"seeds": [
|
|
1772
|
+
{
|
|
1773
|
+
"kind": "const",
|
|
1774
|
+
"value": [
|
|
1775
|
+
112, 108, 97, 116, 102, 111, 114, 109, 95, 116, 114, 101, 97, 115, 117, 114, 121
|
|
1776
|
+
]
|
|
1777
|
+
}
|
|
1778
|
+
]
|
|
1779
|
+
}
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
"name": "protocol_treasury",
|
|
1783
|
+
"docs": [
|
|
1784
|
+
"[V11] Optional: Protocol treasury receives protocol fees",
|
|
1785
|
+
"If provided, fees go here instead of legacy wallet"
|
|
1786
|
+
],
|
|
1787
|
+
"writable": true,
|
|
1788
|
+
"optional": true,
|
|
1789
|
+
"pda": {
|
|
1790
|
+
"seeds": [
|
|
1791
|
+
{
|
|
1792
|
+
"kind": "const",
|
|
1793
|
+
"value": [
|
|
1794
|
+
112, 114, 111, 116, 111, 99, 111, 108, 95, 116, 114, 101, 97, 115, 117, 114, 121,
|
|
1795
|
+
95, 118, 49, 49
|
|
1796
|
+
]
|
|
1797
|
+
}
|
|
1798
|
+
]
|
|
1799
|
+
}
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
"name": "token_program"
|
|
1803
|
+
},
|
|
1804
|
+
{
|
|
1805
|
+
"name": "system_program",
|
|
1806
|
+
"address": "11111111111111111111111111111111"
|
|
1807
|
+
}
|
|
1808
|
+
],
|
|
1809
|
+
"args": [
|
|
1810
|
+
{
|
|
1811
|
+
"name": "args",
|
|
1812
|
+
"type": {
|
|
1813
|
+
"defined": {
|
|
1814
|
+
"name": "SellArgs"
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
]
|
|
1819
|
+
},
|
|
1820
|
+
{
|
|
1821
|
+
"name": "star_token",
|
|
1822
|
+
"docs": [
|
|
1823
|
+
"[V10] Star a token to show appreciation.",
|
|
1824
|
+
"When 2000 stars is reached, auto-pays accumulated SOL to creator."
|
|
1825
|
+
],
|
|
1826
|
+
"discriminator": [206, 110, 187, 117, 14, 104, 152, 233],
|
|
1827
|
+
"accounts": [
|
|
1828
|
+
{
|
|
1829
|
+
"name": "user",
|
|
1830
|
+
"writable": true,
|
|
1831
|
+
"signer": true
|
|
1832
|
+
},
|
|
1833
|
+
{
|
|
1834
|
+
"name": "mint",
|
|
1835
|
+
"docs": ["Token mint being starred"]
|
|
1836
|
+
},
|
|
1837
|
+
{
|
|
1838
|
+
"name": "bonding_curve",
|
|
1839
|
+
"docs": ["Bonding curve - to get creator address for auto-payout"],
|
|
1840
|
+
"pda": {
|
|
1841
|
+
"seeds": [
|
|
1842
|
+
{
|
|
1843
|
+
"kind": "const",
|
|
1844
|
+
"value": [98, 111, 110, 100, 105, 110, 103, 95, 99, 117, 114, 118, 101]
|
|
1845
|
+
},
|
|
1846
|
+
{
|
|
1847
|
+
"kind": "account",
|
|
1848
|
+
"path": "mint"
|
|
1849
|
+
}
|
|
1850
|
+
]
|
|
1851
|
+
}
|
|
1852
|
+
},
|
|
1853
|
+
{
|
|
1854
|
+
"name": "token_treasury",
|
|
1855
|
+
"docs": ["Token treasury receives star SOL and tracks stars"],
|
|
1856
|
+
"writable": true,
|
|
1857
|
+
"pda": {
|
|
1858
|
+
"seeds": [
|
|
1859
|
+
{
|
|
1860
|
+
"kind": "const",
|
|
1861
|
+
"value": [116, 114, 101, 97, 115, 117, 114, 121]
|
|
1862
|
+
},
|
|
1863
|
+
{
|
|
1864
|
+
"kind": "account",
|
|
1865
|
+
"path": "mint"
|
|
1866
|
+
}
|
|
1867
|
+
]
|
|
1868
|
+
}
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
"name": "creator",
|
|
1872
|
+
"writable": true
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
"name": "star_record",
|
|
1876
|
+
"docs": ["Star record PDA - prevents double-starring"],
|
|
1877
|
+
"writable": true,
|
|
1878
|
+
"pda": {
|
|
1879
|
+
"seeds": [
|
|
1880
|
+
{
|
|
1881
|
+
"kind": "const",
|
|
1882
|
+
"value": [115, 116, 97, 114, 95, 114, 101, 99, 111, 114, 100]
|
|
1883
|
+
},
|
|
1884
|
+
{
|
|
1885
|
+
"kind": "account",
|
|
1886
|
+
"path": "user"
|
|
1887
|
+
},
|
|
1888
|
+
{
|
|
1889
|
+
"kind": "account",
|
|
1890
|
+
"path": "mint"
|
|
1891
|
+
}
|
|
1892
|
+
]
|
|
1893
|
+
}
|
|
1894
|
+
},
|
|
1895
|
+
{
|
|
1896
|
+
"name": "system_program",
|
|
1897
|
+
"address": "11111111111111111111111111111111"
|
|
1898
|
+
}
|
|
1899
|
+
],
|
|
1900
|
+
"args": []
|
|
1901
|
+
},
|
|
1902
|
+
{
|
|
1903
|
+
"name": "update_dev_wallet",
|
|
1904
|
+
"docs": ["[V8] Update the dev wallet address."],
|
|
1905
|
+
"discriminator": [152, 37, 243, 206, 192, 150, 129, 200],
|
|
1906
|
+
"accounts": [
|
|
1907
|
+
{
|
|
1908
|
+
"name": "authority",
|
|
1909
|
+
"signer": true,
|
|
1910
|
+
"relations": ["global_config"]
|
|
1911
|
+
},
|
|
1912
|
+
{
|
|
1913
|
+
"name": "global_config",
|
|
1914
|
+
"writable": true,
|
|
1915
|
+
"pda": {
|
|
1916
|
+
"seeds": [
|
|
1917
|
+
{
|
|
1918
|
+
"kind": "const",
|
|
1919
|
+
"value": [103, 108, 111, 98, 97, 108, 95, 99, 111, 110, 102, 105, 103]
|
|
1920
|
+
}
|
|
1921
|
+
]
|
|
1922
|
+
}
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
"name": "new_dev_wallet"
|
|
1926
|
+
}
|
|
1927
|
+
],
|
|
1928
|
+
"args": []
|
|
1929
|
+
}
|
|
1930
|
+
],
|
|
1931
|
+
"accounts": [
|
|
1932
|
+
{
|
|
1933
|
+
"name": "BondingCurve",
|
|
1934
|
+
"discriminator": [23, 183, 248, 55, 96, 216, 172, 96]
|
|
1935
|
+
},
|
|
1936
|
+
{
|
|
1937
|
+
"name": "GlobalConfig",
|
|
1938
|
+
"discriminator": [149, 8, 156, 202, 160, 252, 176, 217]
|
|
1939
|
+
},
|
|
1940
|
+
{
|
|
1941
|
+
"name": "LoanPosition",
|
|
1942
|
+
"discriminator": [45, 172, 28, 194, 82, 206, 243, 190]
|
|
1943
|
+
},
|
|
1944
|
+
{
|
|
1945
|
+
"name": "PlatformTreasury",
|
|
1946
|
+
"discriminator": [35, 229, 15, 221, 215, 174, 167, 92]
|
|
1947
|
+
},
|
|
1948
|
+
{
|
|
1949
|
+
"name": "ProtocolTreasury",
|
|
1950
|
+
"discriminator": [162, 26, 123, 61, 102, 146, 47, 73]
|
|
1951
|
+
},
|
|
1952
|
+
{
|
|
1953
|
+
"name": "StarRecord",
|
|
1954
|
+
"discriminator": [187, 154, 15, 146, 146, 78, 20, 77]
|
|
1955
|
+
},
|
|
1956
|
+
{
|
|
1957
|
+
"name": "Treasury",
|
|
1958
|
+
"discriminator": [238, 239, 123, 238, 89, 1, 168, 253]
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
"name": "UserPosition",
|
|
1962
|
+
"discriminator": [251, 248, 209, 245, 83, 234, 17, 27]
|
|
1963
|
+
},
|
|
1964
|
+
{
|
|
1965
|
+
"name": "UserStats",
|
|
1966
|
+
"discriminator": [176, 223, 136, 27, 122, 79, 32, 227]
|
|
1967
|
+
}
|
|
1968
|
+
],
|
|
1969
|
+
"events": [
|
|
1970
|
+
{
|
|
1971
|
+
"name": "LoanCreated",
|
|
1972
|
+
"discriminator": [142, 148, 28, 215, 65, 185, 246, 200]
|
|
1973
|
+
},
|
|
1974
|
+
{
|
|
1975
|
+
"name": "LoanLiquidated",
|
|
1976
|
+
"discriminator": [1, 29, 28, 96, 66, 95, 8, 204]
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
"name": "LoanRepaid",
|
|
1980
|
+
"discriminator": [202, 183, 88, 60, 211, 54, 142, 243]
|
|
1981
|
+
},
|
|
1982
|
+
{
|
|
1983
|
+
"name": "RevivalContribution",
|
|
1984
|
+
"discriminator": [222, 122, 165, 165, 149, 122, 80, 240]
|
|
1985
|
+
},
|
|
1986
|
+
{
|
|
1987
|
+
"name": "TokenRevived",
|
|
1988
|
+
"discriminator": [112, 221, 180, 105, 19, 218, 52, 101]
|
|
1989
|
+
}
|
|
1990
|
+
],
|
|
1991
|
+
"errors": [
|
|
1992
|
+
{
|
|
1993
|
+
"code": 6000,
|
|
1994
|
+
"name": "MathOverflow",
|
|
1995
|
+
"msg": "Arithmetic overflow"
|
|
1996
|
+
},
|
|
1997
|
+
{
|
|
1998
|
+
"code": 6001,
|
|
1999
|
+
"name": "SlippageExceeded",
|
|
2000
|
+
"msg": "Slippage tolerance exceeded"
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
"code": 6002,
|
|
2004
|
+
"name": "MaxWalletExceeded",
|
|
2005
|
+
"msg": "Would exceed 2% wallet cap"
|
|
2006
|
+
},
|
|
2007
|
+
{
|
|
2008
|
+
"code": 6003,
|
|
2009
|
+
"name": "InsufficientTokens",
|
|
2010
|
+
"msg": "Insufficient tokens in pool"
|
|
2011
|
+
},
|
|
2012
|
+
{
|
|
2013
|
+
"code": 6004,
|
|
2014
|
+
"name": "InsufficientSol",
|
|
2015
|
+
"msg": "Insufficient SOL in pool"
|
|
2016
|
+
},
|
|
2017
|
+
{
|
|
2018
|
+
"code": 6005,
|
|
2019
|
+
"name": "InsufficientUserBalance",
|
|
2020
|
+
"msg": "Insufficient user balance"
|
|
2021
|
+
},
|
|
2022
|
+
{
|
|
2023
|
+
"code": 6006,
|
|
2024
|
+
"name": "BondingComplete",
|
|
2025
|
+
"msg": "Bonding curve already complete"
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
"code": 6007,
|
|
2029
|
+
"name": "BondingNotComplete",
|
|
2030
|
+
"msg": "Bonding curve not yet complete"
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
"code": 6008,
|
|
2034
|
+
"name": "AlreadyVoted",
|
|
2035
|
+
"msg": "Already voted"
|
|
2036
|
+
},
|
|
2037
|
+
{
|
|
2038
|
+
"code": 6009,
|
|
2039
|
+
"name": "NoTokensToVote",
|
|
2040
|
+
"msg": "No tokens to vote"
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
"code": 6010,
|
|
2044
|
+
"name": "AlreadyMigrated",
|
|
2045
|
+
"msg": "Already migrated"
|
|
2046
|
+
},
|
|
2047
|
+
{
|
|
2048
|
+
"code": 6011,
|
|
2049
|
+
"name": "InvalidAuthority",
|
|
2050
|
+
"msg": "Invalid authority"
|
|
2051
|
+
},
|
|
2052
|
+
{
|
|
2053
|
+
"code": 6012,
|
|
2054
|
+
"name": "AmountTooSmall",
|
|
2055
|
+
"msg": "Amount too small"
|
|
2056
|
+
},
|
|
2057
|
+
{
|
|
2058
|
+
"code": 6013,
|
|
2059
|
+
"name": "ProtocolPaused",
|
|
2060
|
+
"msg": "Protocol paused"
|
|
2061
|
+
},
|
|
2062
|
+
{
|
|
2063
|
+
"code": 6014,
|
|
2064
|
+
"name": "ZeroAmount",
|
|
2065
|
+
"msg": "Zero amount not allowed"
|
|
2066
|
+
},
|
|
2067
|
+
{
|
|
2068
|
+
"code": 6015,
|
|
2069
|
+
"name": "NameTooLong",
|
|
2070
|
+
"msg": "Name too long"
|
|
2071
|
+
},
|
|
2072
|
+
{
|
|
2073
|
+
"code": 6016,
|
|
2074
|
+
"name": "SymbolTooLong",
|
|
2075
|
+
"msg": "Symbol too long"
|
|
2076
|
+
},
|
|
2077
|
+
{
|
|
2078
|
+
"code": 6017,
|
|
2079
|
+
"name": "UriTooLong",
|
|
2080
|
+
"msg": "URI too long"
|
|
2081
|
+
},
|
|
2082
|
+
{
|
|
2083
|
+
"code": 6018,
|
|
2084
|
+
"name": "BuybackTooSoon",
|
|
2085
|
+
"msg": "Buyback interval not elapsed"
|
|
2086
|
+
},
|
|
2087
|
+
{
|
|
2088
|
+
"code": 6019,
|
|
2089
|
+
"name": "InsufficientTreasury",
|
|
2090
|
+
"msg": "Treasury has insufficient SOL"
|
|
2091
|
+
},
|
|
2092
|
+
{
|
|
2093
|
+
"code": 6020,
|
|
2094
|
+
"name": "VoteNotFinalized",
|
|
2095
|
+
"msg": "Vote not finalized"
|
|
2096
|
+
},
|
|
2097
|
+
{
|
|
2098
|
+
"code": 6021,
|
|
2099
|
+
"name": "SupplyFloorReached",
|
|
2100
|
+
"msg": "Supply floor reached, tokens held instead of burned"
|
|
2101
|
+
},
|
|
2102
|
+
{
|
|
2103
|
+
"code": 6022,
|
|
2104
|
+
"name": "NotToken2022",
|
|
2105
|
+
"msg": "This operation requires a Token-2022 mint"
|
|
2106
|
+
},
|
|
2107
|
+
{
|
|
2108
|
+
"code": 6023,
|
|
2109
|
+
"name": "VoteRequired",
|
|
2110
|
+
"msg": "Vote is required on first buy"
|
|
2111
|
+
},
|
|
2112
|
+
{
|
|
2113
|
+
"code": 6024,
|
|
2114
|
+
"name": "AlreadyReclaimed",
|
|
2115
|
+
"msg": "Token has already been reclaimed"
|
|
2116
|
+
},
|
|
2117
|
+
{
|
|
2118
|
+
"code": 6025,
|
|
2119
|
+
"name": "TokenStillActive",
|
|
2120
|
+
"msg": "Token is still active, cannot reclaim yet"
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
"code": 6026,
|
|
2124
|
+
"name": "BelowReclaimThreshold",
|
|
2125
|
+
"msg": "Token SOL balance below reclaim threshold"
|
|
2126
|
+
},
|
|
2127
|
+
{
|
|
2128
|
+
"code": 6027,
|
|
2129
|
+
"name": "EpochNotComplete",
|
|
2130
|
+
"msg": "Epoch has not ended yet"
|
|
2131
|
+
},
|
|
2132
|
+
{
|
|
2133
|
+
"code": 6028,
|
|
2134
|
+
"name": "AlreadyClaimed",
|
|
2135
|
+
"msg": "Already claimed rewards for this epoch"
|
|
2136
|
+
},
|
|
2137
|
+
{
|
|
2138
|
+
"code": 6029,
|
|
2139
|
+
"name": "NoRewardsAvailable",
|
|
2140
|
+
"msg": "No rewards available to claim"
|
|
2141
|
+
},
|
|
2142
|
+
{
|
|
2143
|
+
"code": 6030,
|
|
2144
|
+
"name": "NoVolumeInEpoch",
|
|
2145
|
+
"msg": "No volume recorded in claimable epoch"
|
|
2146
|
+
},
|
|
2147
|
+
{
|
|
2148
|
+
"code": 6031,
|
|
2149
|
+
"name": "NotMigrated",
|
|
2150
|
+
"msg": "Token not migrated to DEX yet"
|
|
2151
|
+
},
|
|
2152
|
+
{
|
|
2153
|
+
"code": 6032,
|
|
2154
|
+
"name": "PoolCreationFailed",
|
|
2155
|
+
"msg": "Raydium pool creation failed"
|
|
2156
|
+
},
|
|
2157
|
+
{
|
|
2158
|
+
"code": 6033,
|
|
2159
|
+
"name": "InsufficientMigrationFee",
|
|
2160
|
+
"msg": "Insufficient treasury balance for migration fee"
|
|
2161
|
+
},
|
|
2162
|
+
{
|
|
2163
|
+
"code": 6034,
|
|
2164
|
+
"name": "InvalidTokenOrdering",
|
|
2165
|
+
"msg": "Invalid token ordering for Raydium pool"
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
"code": 6035,
|
|
2169
|
+
"name": "CannotStarSelf",
|
|
2170
|
+
"msg": "Cannot star yourself"
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
"code": 6036,
|
|
2174
|
+
"name": "CreatorNotEligible",
|
|
2175
|
+
"msg": "Creator not eligible for rewards (needs 5000+ stars)"
|
|
2176
|
+
},
|
|
2177
|
+
{
|
|
2178
|
+
"code": 6037,
|
|
2179
|
+
"name": "CreatorClaimTooSoon",
|
|
2180
|
+
"msg": "Creator reward claim interval not elapsed (24 hours)"
|
|
2181
|
+
},
|
|
2182
|
+
{
|
|
2183
|
+
"code": 6038,
|
|
2184
|
+
"name": "NoCreatorFundBalance",
|
|
2185
|
+
"msg": "No creator fund balance available"
|
|
2186
|
+
},
|
|
2187
|
+
{
|
|
2188
|
+
"code": 6039,
|
|
2189
|
+
"name": "InvalidDevWallet",
|
|
2190
|
+
"msg": "Invalid dev wallet address"
|
|
2191
|
+
},
|
|
2192
|
+
{
|
|
2193
|
+
"code": 6040,
|
|
2194
|
+
"name": "Unauthorized",
|
|
2195
|
+
"msg": "Unauthorized - only authority can perform this action"
|
|
2196
|
+
},
|
|
2197
|
+
{
|
|
2198
|
+
"code": 6041,
|
|
2199
|
+
"name": "BaselineAlreadyInitialized",
|
|
2200
|
+
"msg": "Baseline has already been initialized"
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
"code": 6042,
|
|
2204
|
+
"name": "BaselineNotInitialized",
|
|
2205
|
+
"msg": "Baseline must be initialized before auto buyback"
|
|
2206
|
+
},
|
|
2207
|
+
{
|
|
2208
|
+
"code": 6043,
|
|
2209
|
+
"name": "InvalidRatioThreshold",
|
|
2210
|
+
"msg": "Ratio threshold must be between 1 and 10000 bps"
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
"code": 6044,
|
|
2214
|
+
"name": "InvalidReserveRatio",
|
|
2215
|
+
"msg": "Reserve ratio must be between 0 and 9000 bps"
|
|
2216
|
+
},
|
|
2217
|
+
{
|
|
2218
|
+
"code": 6045,
|
|
2219
|
+
"name": "InvalidBuybackPercent",
|
|
2220
|
+
"msg": "Buyback percent must be between 100 and 10000 bps"
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
"code": 6046,
|
|
2224
|
+
"name": "ZeroPoolReserves",
|
|
2225
|
+
"msg": "Pool reserves cannot be zero"
|
|
2226
|
+
},
|
|
2227
|
+
{
|
|
2228
|
+
"code": 6047,
|
|
2229
|
+
"name": "RatioAboveThreshold",
|
|
2230
|
+
"msg": "Price above threshold - no buyback needed"
|
|
2231
|
+
},
|
|
2232
|
+
{
|
|
2233
|
+
"code": 6048,
|
|
2234
|
+
"name": "AtReserveFloor",
|
|
2235
|
+
"msg": "Treasury at reserve floor - cannot execute buyback"
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
"code": 6049,
|
|
2239
|
+
"name": "InvalidBuybackInterval",
|
|
2240
|
+
"msg": "Invalid buyback interval"
|
|
2241
|
+
},
|
|
2242
|
+
{
|
|
2243
|
+
"code": 6050,
|
|
2244
|
+
"name": "InsufficientVolumeForRewards",
|
|
2245
|
+
"msg": "Insufficient volume for protocol rewards (need >= 10 SOL/epoch)"
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
"code": 6051,
|
|
2249
|
+
"name": "ProtocolTreasuryBelowFloor",
|
|
2250
|
+
"msg": "Protocol treasury below reserve floor"
|
|
2251
|
+
},
|
|
2252
|
+
{
|
|
2253
|
+
"code": 6052,
|
|
2254
|
+
"name": "ProtocolTreasuryAlreadyInitialized",
|
|
2255
|
+
"msg": "Protocol treasury already initialized"
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
"code": 6053,
|
|
2259
|
+
"name": "TokenNotReclaimed",
|
|
2260
|
+
"msg": "Token has not been reclaimed - cannot contribute to revival"
|
|
2261
|
+
},
|
|
2262
|
+
{
|
|
2263
|
+
"code": 6054,
|
|
2264
|
+
"name": "LendingNotEnabled",
|
|
2265
|
+
"msg": "Lending is not enabled for this token"
|
|
2266
|
+
},
|
|
2267
|
+
{
|
|
2268
|
+
"code": 6055,
|
|
2269
|
+
"name": "LendingRequiresMigration",
|
|
2270
|
+
"msg": "Token must be migrated to DEX before lending"
|
|
2271
|
+
},
|
|
2272
|
+
{
|
|
2273
|
+
"code": 6056,
|
|
2274
|
+
"name": "LtvExceeded",
|
|
2275
|
+
"msg": "Loan-to-value ratio exceeds maximum"
|
|
2276
|
+
},
|
|
2277
|
+
{
|
|
2278
|
+
"code": 6057,
|
|
2279
|
+
"name": "LendingCapExceeded",
|
|
2280
|
+
"msg": "Treasury lending capacity exhausted (utilization cap reached)"
|
|
2281
|
+
},
|
|
2282
|
+
{
|
|
2283
|
+
"code": 6058,
|
|
2284
|
+
"name": "BorrowTooSmall",
|
|
2285
|
+
"msg": "Borrow amount below minimum (0.1 SOL)"
|
|
2286
|
+
},
|
|
2287
|
+
{
|
|
2288
|
+
"code": 6059,
|
|
2289
|
+
"name": "NoActiveLoan",
|
|
2290
|
+
"msg": "No active loan position"
|
|
2291
|
+
},
|
|
2292
|
+
{
|
|
2293
|
+
"code": 6060,
|
|
2294
|
+
"name": "NotLiquidatable",
|
|
2295
|
+
"msg": "Position is not liquidatable (LTV below threshold)"
|
|
2296
|
+
},
|
|
2297
|
+
{
|
|
2298
|
+
"code": 6061,
|
|
2299
|
+
"name": "EmptyBorrowRequest",
|
|
2300
|
+
"msg": "Must provide collateral or borrow amount"
|
|
2301
|
+
},
|
|
2302
|
+
{
|
|
2303
|
+
"code": 6062,
|
|
2304
|
+
"name": "RepayExceedsDebt",
|
|
2305
|
+
"msg": "Repay amount exceeds total owed"
|
|
2306
|
+
},
|
|
2307
|
+
{
|
|
2308
|
+
"code": 6063,
|
|
2309
|
+
"name": "InvalidLendingConfig",
|
|
2310
|
+
"msg": "Max LTV must be less than liquidation threshold"
|
|
2311
|
+
},
|
|
2312
|
+
{
|
|
2313
|
+
"code": 6064,
|
|
2314
|
+
"name": "InvalidPoolAccount",
|
|
2315
|
+
"msg": "Invalid Raydium pool account (wrong owner, vault, or mint)"
|
|
2316
|
+
}
|
|
2317
|
+
],
|
|
2318
|
+
"types": [
|
|
2319
|
+
{
|
|
2320
|
+
"name": "BondingCurve",
|
|
2321
|
+
"docs": ["Per-token bonding curve state"],
|
|
2322
|
+
"type": {
|
|
2323
|
+
"kind": "struct",
|
|
2324
|
+
"fields": [
|
|
2325
|
+
{
|
|
2326
|
+
"name": "mint",
|
|
2327
|
+
"docs": ["Token mint"],
|
|
2328
|
+
"type": "pubkey"
|
|
2329
|
+
},
|
|
2330
|
+
{
|
|
2331
|
+
"name": "creator",
|
|
2332
|
+
"docs": ["Token creator"],
|
|
2333
|
+
"type": "pubkey"
|
|
2334
|
+
},
|
|
2335
|
+
{
|
|
2336
|
+
"name": "virtual_sol_reserves",
|
|
2337
|
+
"docs": ["Virtual SOL for pricing"],
|
|
2338
|
+
"type": "u64"
|
|
2339
|
+
},
|
|
2340
|
+
{
|
|
2341
|
+
"name": "virtual_token_reserves",
|
|
2342
|
+
"docs": ["Virtual tokens for pricing"],
|
|
2343
|
+
"type": "u64"
|
|
2344
|
+
},
|
|
2345
|
+
{
|
|
2346
|
+
"name": "real_sol_reserves",
|
|
2347
|
+
"docs": ["Actual SOL in pool"],
|
|
2348
|
+
"type": "u64"
|
|
2349
|
+
},
|
|
2350
|
+
{
|
|
2351
|
+
"name": "real_token_reserves",
|
|
2352
|
+
"docs": ["Actual tokens available"],
|
|
2353
|
+
"type": "u64"
|
|
2354
|
+
},
|
|
2355
|
+
{
|
|
2356
|
+
"name": "vote_vault_balance",
|
|
2357
|
+
"docs": [
|
|
2358
|
+
"[V2.2] Tokens in vote vault (10%, subject to community vote)",
|
|
2359
|
+
"Held in Treasury's token account until vote finalizes"
|
|
2360
|
+
],
|
|
2361
|
+
"type": "u64"
|
|
2362
|
+
},
|
|
2363
|
+
{
|
|
2364
|
+
"name": "permanently_burned_tokens",
|
|
2365
|
+
"docs": ["Tokens permanently burned via post-migration buybacks"],
|
|
2366
|
+
"type": "u64"
|
|
2367
|
+
},
|
|
2368
|
+
{
|
|
2369
|
+
"name": "bonding_complete",
|
|
2370
|
+
"docs": ["Reached bonding target"],
|
|
2371
|
+
"type": "bool"
|
|
2372
|
+
},
|
|
2373
|
+
{
|
|
2374
|
+
"name": "bonding_complete_slot",
|
|
2375
|
+
"docs": ["Slot when bonding completed"],
|
|
2376
|
+
"type": "u64"
|
|
2377
|
+
},
|
|
2378
|
+
{
|
|
2379
|
+
"name": "votes_return",
|
|
2380
|
+
"docs": ["Votes to return tokens"],
|
|
2381
|
+
"type": "u64"
|
|
2382
|
+
},
|
|
2383
|
+
{
|
|
2384
|
+
"name": "votes_burn",
|
|
2385
|
+
"docs": ["Votes to burn tokens"],
|
|
2386
|
+
"type": "u64"
|
|
2387
|
+
},
|
|
2388
|
+
{
|
|
2389
|
+
"name": "total_voters",
|
|
2390
|
+
"docs": ["Total unique voters"],
|
|
2391
|
+
"type": "u64"
|
|
2392
|
+
},
|
|
2393
|
+
{
|
|
2394
|
+
"name": "vote_finalized",
|
|
2395
|
+
"docs": ["Voting ended"],
|
|
2396
|
+
"type": "bool"
|
|
2397
|
+
},
|
|
2398
|
+
{
|
|
2399
|
+
"name": "vote_result_return",
|
|
2400
|
+
"docs": ["Vote result"],
|
|
2401
|
+
"type": "bool"
|
|
2402
|
+
},
|
|
2403
|
+
{
|
|
2404
|
+
"name": "migrated",
|
|
2405
|
+
"docs": ["Migrated to DEX"],
|
|
2406
|
+
"type": "bool"
|
|
2407
|
+
},
|
|
2408
|
+
{
|
|
2409
|
+
"name": "is_token_2022",
|
|
2410
|
+
"docs": ["Is Token-2022 mint (V3)"],
|
|
2411
|
+
"type": "bool"
|
|
2412
|
+
},
|
|
2413
|
+
{
|
|
2414
|
+
"name": "last_activity_slot",
|
|
2415
|
+
"docs": ["Last activity slot (buy/sell) for V4 inactivity tracking"],
|
|
2416
|
+
"type": "u64"
|
|
2417
|
+
},
|
|
2418
|
+
{
|
|
2419
|
+
"name": "reclaimed",
|
|
2420
|
+
"docs": ["Has been reclaimed (V4 - failed token)"],
|
|
2421
|
+
"type": "bool"
|
|
2422
|
+
},
|
|
2423
|
+
{
|
|
2424
|
+
"name": "name",
|
|
2425
|
+
"docs": ["Token name"],
|
|
2426
|
+
"type": {
|
|
2427
|
+
"array": ["u8", 32]
|
|
2428
|
+
}
|
|
2429
|
+
},
|
|
2430
|
+
{
|
|
2431
|
+
"name": "symbol",
|
|
2432
|
+
"docs": ["Token symbol"],
|
|
2433
|
+
"type": {
|
|
2434
|
+
"array": ["u8", 10]
|
|
2435
|
+
}
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
"name": "uri",
|
|
2439
|
+
"docs": ["Metadata URI"],
|
|
2440
|
+
"type": {
|
|
2441
|
+
"array": ["u8", 200]
|
|
2442
|
+
}
|
|
2443
|
+
},
|
|
2444
|
+
{
|
|
2445
|
+
"name": "bump",
|
|
2446
|
+
"docs": ["PDA bump"],
|
|
2447
|
+
"type": "u8"
|
|
2448
|
+
},
|
|
2449
|
+
{
|
|
2450
|
+
"name": "treasury_bump",
|
|
2451
|
+
"docs": ["Treasury bump [V2]"],
|
|
2452
|
+
"type": "u8"
|
|
2453
|
+
}
|
|
2454
|
+
]
|
|
2455
|
+
}
|
|
2456
|
+
},
|
|
2457
|
+
{
|
|
2458
|
+
"name": "BorrowArgs",
|
|
2459
|
+
"type": {
|
|
2460
|
+
"kind": "struct",
|
|
2461
|
+
"fields": [
|
|
2462
|
+
{
|
|
2463
|
+
"name": "collateral_amount",
|
|
2464
|
+
"docs": ["Tokens to lock as collateral (can be 0 if adding debt to existing position)"],
|
|
2465
|
+
"type": "u64"
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
"name": "sol_to_borrow",
|
|
2469
|
+
"docs": ["SOL to borrow from treasury (can be 0 if just adding collateral)"],
|
|
2470
|
+
"type": "u64"
|
|
2471
|
+
}
|
|
2472
|
+
]
|
|
2473
|
+
}
|
|
2474
|
+
},
|
|
2475
|
+
{
|
|
2476
|
+
"name": "BuyArgs",
|
|
2477
|
+
"type": {
|
|
2478
|
+
"kind": "struct",
|
|
2479
|
+
"fields": [
|
|
2480
|
+
{
|
|
2481
|
+
"name": "sol_amount",
|
|
2482
|
+
"type": "u64"
|
|
2483
|
+
},
|
|
2484
|
+
{
|
|
2485
|
+
"name": "min_tokens_out",
|
|
2486
|
+
"type": "u64"
|
|
2487
|
+
},
|
|
2488
|
+
{
|
|
2489
|
+
"name": "vote",
|
|
2490
|
+
"docs": [
|
|
2491
|
+
"Vote on burned tokens fate. Required on first buy, must be None on subsequent buys.",
|
|
2492
|
+
"true = return tokens to circulation, false = permanently burn them"
|
|
2493
|
+
],
|
|
2494
|
+
"type": {
|
|
2495
|
+
"option": "bool"
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
]
|
|
2499
|
+
}
|
|
2500
|
+
},
|
|
2501
|
+
{
|
|
2502
|
+
"name": "CreateTokenArgs",
|
|
2503
|
+
"type": {
|
|
2504
|
+
"kind": "struct",
|
|
2505
|
+
"fields": [
|
|
2506
|
+
{
|
|
2507
|
+
"name": "name",
|
|
2508
|
+
"type": "string"
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
"name": "symbol",
|
|
2512
|
+
"type": "string"
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
"name": "uri",
|
|
2516
|
+
"type": "string"
|
|
2517
|
+
}
|
|
2518
|
+
]
|
|
2519
|
+
}
|
|
2520
|
+
},
|
|
2521
|
+
{
|
|
2522
|
+
"name": "GlobalConfig",
|
|
2523
|
+
"docs": ["Global protocol configuration"],
|
|
2524
|
+
"type": {
|
|
2525
|
+
"kind": "struct",
|
|
2526
|
+
"fields": [
|
|
2527
|
+
{
|
|
2528
|
+
"name": "authority",
|
|
2529
|
+
"docs": ["Protocol admin"],
|
|
2530
|
+
"type": "pubkey"
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
"name": "treasury",
|
|
2534
|
+
"docs": ["Fee recipient (protocol fee 0.5%)"],
|
|
2535
|
+
"type": "pubkey"
|
|
2536
|
+
},
|
|
2537
|
+
{
|
|
2538
|
+
"name": "dev_wallet",
|
|
2539
|
+
"docs": ["Dev/RD wallet (receives 25% of treasury fee) [V8]"],
|
|
2540
|
+
"type": "pubkey"
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
"name": "platform_treasury",
|
|
2544
|
+
"docs": ["Platform treasury for V4 rewards (optional, Pubkey::default if not set)"],
|
|
2545
|
+
"type": "pubkey"
|
|
2546
|
+
},
|
|
2547
|
+
{
|
|
2548
|
+
"name": "protocol_fee_bps",
|
|
2549
|
+
"docs": ["Fee in basis points"],
|
|
2550
|
+
"type": "u16"
|
|
2551
|
+
},
|
|
2552
|
+
{
|
|
2553
|
+
"name": "paused",
|
|
2554
|
+
"docs": ["Emergency pause"],
|
|
2555
|
+
"type": "bool"
|
|
2556
|
+
},
|
|
2557
|
+
{
|
|
2558
|
+
"name": "total_tokens_launched",
|
|
2559
|
+
"docs": ["Tokens launched counter"],
|
|
2560
|
+
"type": "u64"
|
|
2561
|
+
},
|
|
2562
|
+
{
|
|
2563
|
+
"name": "total_volume_sol",
|
|
2564
|
+
"docs": ["Cumulative SOL volume"],
|
|
2565
|
+
"type": "u64"
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
"name": "bump",
|
|
2569
|
+
"docs": ["PDA bump"],
|
|
2570
|
+
"type": "u8"
|
|
2571
|
+
}
|
|
2572
|
+
]
|
|
2573
|
+
}
|
|
2574
|
+
},
|
|
2575
|
+
{
|
|
2576
|
+
"name": "LoanCreated",
|
|
2577
|
+
"type": {
|
|
2578
|
+
"kind": "struct",
|
|
2579
|
+
"fields": [
|
|
2580
|
+
{
|
|
2581
|
+
"name": "mint",
|
|
2582
|
+
"type": "pubkey"
|
|
2583
|
+
},
|
|
2584
|
+
{
|
|
2585
|
+
"name": "user",
|
|
2586
|
+
"type": "pubkey"
|
|
2587
|
+
},
|
|
2588
|
+
{
|
|
2589
|
+
"name": "collateral_amount",
|
|
2590
|
+
"type": "u64"
|
|
2591
|
+
},
|
|
2592
|
+
{
|
|
2593
|
+
"name": "borrowed_amount",
|
|
2594
|
+
"type": "u64"
|
|
2595
|
+
},
|
|
2596
|
+
{
|
|
2597
|
+
"name": "ltv_bps",
|
|
2598
|
+
"type": "u16"
|
|
2599
|
+
}
|
|
2600
|
+
]
|
|
2601
|
+
}
|
|
2602
|
+
},
|
|
2603
|
+
{
|
|
2604
|
+
"name": "LoanLiquidated",
|
|
2605
|
+
"type": {
|
|
2606
|
+
"kind": "struct",
|
|
2607
|
+
"fields": [
|
|
2608
|
+
{
|
|
2609
|
+
"name": "mint",
|
|
2610
|
+
"type": "pubkey"
|
|
2611
|
+
},
|
|
2612
|
+
{
|
|
2613
|
+
"name": "borrower",
|
|
2614
|
+
"type": "pubkey"
|
|
2615
|
+
},
|
|
2616
|
+
{
|
|
2617
|
+
"name": "liquidator",
|
|
2618
|
+
"type": "pubkey"
|
|
2619
|
+
},
|
|
2620
|
+
{
|
|
2621
|
+
"name": "debt_covered",
|
|
2622
|
+
"type": "u64"
|
|
2623
|
+
},
|
|
2624
|
+
{
|
|
2625
|
+
"name": "collateral_seized",
|
|
2626
|
+
"type": "u64"
|
|
2627
|
+
},
|
|
2628
|
+
{
|
|
2629
|
+
"name": "bad_debt",
|
|
2630
|
+
"type": "u64"
|
|
2631
|
+
}
|
|
2632
|
+
]
|
|
2633
|
+
}
|
|
2634
|
+
},
|
|
2635
|
+
{
|
|
2636
|
+
"name": "LoanPosition",
|
|
2637
|
+
"docs": [
|
|
2638
|
+
"[V2.4] Per-user, per-token loan position for treasury lending",
|
|
2639
|
+
"",
|
|
2640
|
+
"Created on first borrow. Tracks collateral locked and SOL owed.",
|
|
2641
|
+
"Closed (rent reclaimed) on full repay or full liquidation."
|
|
2642
|
+
],
|
|
2643
|
+
"type": {
|
|
2644
|
+
"kind": "struct",
|
|
2645
|
+
"fields": [
|
|
2646
|
+
{
|
|
2647
|
+
"name": "user",
|
|
2648
|
+
"docs": ["Borrower wallet"],
|
|
2649
|
+
"type": "pubkey"
|
|
2650
|
+
},
|
|
2651
|
+
{
|
|
2652
|
+
"name": "mint",
|
|
2653
|
+
"docs": ["Token mint (for PDA derivation)"],
|
|
2654
|
+
"type": "pubkey"
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
"name": "collateral_amount",
|
|
2658
|
+
"docs": ["Tokens locked as collateral in collateral vault"],
|
|
2659
|
+
"type": "u64"
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
"name": "borrowed_amount",
|
|
2663
|
+
"docs": ["SOL principal owed (excludes accrued interest)"],
|
|
2664
|
+
"type": "u64"
|
|
2665
|
+
},
|
|
2666
|
+
{
|
|
2667
|
+
"name": "accrued_interest",
|
|
2668
|
+
"docs": ["Interest accumulated since last update"],
|
|
2669
|
+
"type": "u64"
|
|
2670
|
+
},
|
|
2671
|
+
{
|
|
2672
|
+
"name": "last_update_slot",
|
|
2673
|
+
"docs": ["Last slot when interest was calculated"],
|
|
2674
|
+
"type": "u64"
|
|
2675
|
+
},
|
|
2676
|
+
{
|
|
2677
|
+
"name": "bump",
|
|
2678
|
+
"docs": ["PDA bump"],
|
|
2679
|
+
"type": "u8"
|
|
2680
|
+
}
|
|
2681
|
+
]
|
|
2682
|
+
}
|
|
2683
|
+
},
|
|
2684
|
+
{
|
|
2685
|
+
"name": "LoanRepaid",
|
|
2686
|
+
"type": {
|
|
2687
|
+
"kind": "struct",
|
|
2688
|
+
"fields": [
|
|
2689
|
+
{
|
|
2690
|
+
"name": "mint",
|
|
2691
|
+
"type": "pubkey"
|
|
2692
|
+
},
|
|
2693
|
+
{
|
|
2694
|
+
"name": "user",
|
|
2695
|
+
"type": "pubkey"
|
|
2696
|
+
},
|
|
2697
|
+
{
|
|
2698
|
+
"name": "sol_repaid",
|
|
2699
|
+
"type": "u64"
|
|
2700
|
+
},
|
|
2701
|
+
{
|
|
2702
|
+
"name": "interest_paid",
|
|
2703
|
+
"type": "u64"
|
|
2704
|
+
},
|
|
2705
|
+
{
|
|
2706
|
+
"name": "collateral_returned",
|
|
2707
|
+
"type": "u64"
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
"name": "fully_repaid",
|
|
2711
|
+
"type": "bool"
|
|
2712
|
+
}
|
|
2713
|
+
]
|
|
2714
|
+
}
|
|
2715
|
+
},
|
|
2716
|
+
{
|
|
2717
|
+
"name": "PlatformTreasury",
|
|
2718
|
+
"docs": ["Platform-wide treasury for V4 failed token reclaims and rewards"],
|
|
2719
|
+
"type": {
|
|
2720
|
+
"kind": "struct",
|
|
2721
|
+
"fields": [
|
|
2722
|
+
{
|
|
2723
|
+
"name": "authority",
|
|
2724
|
+
"docs": ["Protocol authority"],
|
|
2725
|
+
"type": "pubkey"
|
|
2726
|
+
},
|
|
2727
|
+
{
|
|
2728
|
+
"name": "total_reclaimed",
|
|
2729
|
+
"docs": ["Total SOL ever reclaimed from failed tokens"],
|
|
2730
|
+
"type": "u64"
|
|
2731
|
+
},
|
|
2732
|
+
{
|
|
2733
|
+
"name": "current_balance",
|
|
2734
|
+
"docs": ["Current distributable balance"],
|
|
2735
|
+
"type": "u64"
|
|
2736
|
+
},
|
|
2737
|
+
{
|
|
2738
|
+
"name": "total_distributed",
|
|
2739
|
+
"docs": ["Total SOL ever distributed as rewards"],
|
|
2740
|
+
"type": "u64"
|
|
2741
|
+
},
|
|
2742
|
+
{
|
|
2743
|
+
"name": "current_epoch",
|
|
2744
|
+
"docs": ["Current distribution epoch"],
|
|
2745
|
+
"type": "u64"
|
|
2746
|
+
},
|
|
2747
|
+
{
|
|
2748
|
+
"name": "last_epoch_ts",
|
|
2749
|
+
"docs": ["Timestamp of last epoch advance"],
|
|
2750
|
+
"type": "i64"
|
|
2751
|
+
},
|
|
2752
|
+
{
|
|
2753
|
+
"name": "total_volume_current_epoch",
|
|
2754
|
+
"docs": ["Total platform volume in current epoch"],
|
|
2755
|
+
"type": "u64"
|
|
2756
|
+
},
|
|
2757
|
+
{
|
|
2758
|
+
"name": "total_volume_previous_epoch",
|
|
2759
|
+
"docs": ["Total platform volume in previous epoch (for claiming)"],
|
|
2760
|
+
"type": "u64"
|
|
2761
|
+
},
|
|
2762
|
+
{
|
|
2763
|
+
"name": "previous_epoch_rewards",
|
|
2764
|
+
"docs": ["SOL available for previous epoch claims"],
|
|
2765
|
+
"type": "u64"
|
|
2766
|
+
},
|
|
2767
|
+
{
|
|
2768
|
+
"name": "tokens_reclaimed_count",
|
|
2769
|
+
"docs": ["Number of failed tokens reclaimed"],
|
|
2770
|
+
"type": "u64"
|
|
2771
|
+
},
|
|
2772
|
+
{
|
|
2773
|
+
"name": "bump",
|
|
2774
|
+
"docs": ["PDA bump"],
|
|
2775
|
+
"type": "u8"
|
|
2776
|
+
}
|
|
2777
|
+
]
|
|
2778
|
+
}
|
|
2779
|
+
},
|
|
2780
|
+
{
|
|
2781
|
+
"name": "ProtocolTreasury",
|
|
2782
|
+
"docs": [
|
|
2783
|
+
"[V11] Protocol-level treasury for fee distribution to active traders",
|
|
2784
|
+
"",
|
|
2785
|
+
"Unlike GlobalConfig.treasury (a wallet), this is a PDA that:",
|
|
2786
|
+
"- Receives 0.5% protocol fees from all trades",
|
|
2787
|
+
"- Maintains a 1500 SOL reserve floor",
|
|
2788
|
+
"- Distributes excess SOL weekly to users with >= 10 SOL epoch volume"
|
|
2789
|
+
],
|
|
2790
|
+
"type": {
|
|
2791
|
+
"kind": "struct",
|
|
2792
|
+
"fields": [
|
|
2793
|
+
{
|
|
2794
|
+
"name": "authority",
|
|
2795
|
+
"docs": ["Protocol authority"],
|
|
2796
|
+
"type": "pubkey"
|
|
2797
|
+
},
|
|
2798
|
+
{
|
|
2799
|
+
"name": "current_balance",
|
|
2800
|
+
"docs": ["Current SOL balance held by this PDA"],
|
|
2801
|
+
"type": "u64"
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
"name": "reserve_floor",
|
|
2805
|
+
"docs": ["Reserve floor - no payouts below this (1500 SOL)"],
|
|
2806
|
+
"type": "u64"
|
|
2807
|
+
},
|
|
2808
|
+
{
|
|
2809
|
+
"name": "total_fees_received",
|
|
2810
|
+
"docs": ["Total SOL ever received from protocol fees"],
|
|
2811
|
+
"type": "u64"
|
|
2812
|
+
},
|
|
2813
|
+
{
|
|
2814
|
+
"name": "total_distributed",
|
|
2815
|
+
"docs": ["Total SOL ever distributed to users"],
|
|
2816
|
+
"type": "u64"
|
|
2817
|
+
},
|
|
2818
|
+
{
|
|
2819
|
+
"name": "current_epoch",
|
|
2820
|
+
"docs": ["Current distribution epoch"],
|
|
2821
|
+
"type": "u64"
|
|
2822
|
+
},
|
|
2823
|
+
{
|
|
2824
|
+
"name": "last_epoch_ts",
|
|
2825
|
+
"docs": ["Timestamp of last epoch advance"],
|
|
2826
|
+
"type": "i64"
|
|
2827
|
+
},
|
|
2828
|
+
{
|
|
2829
|
+
"name": "total_volume_current_epoch",
|
|
2830
|
+
"docs": ["Total platform volume in current epoch"],
|
|
2831
|
+
"type": "u64"
|
|
2832
|
+
},
|
|
2833
|
+
{
|
|
2834
|
+
"name": "total_volume_previous_epoch",
|
|
2835
|
+
"docs": ["Total platform volume in previous epoch (for payout calculation)"],
|
|
2836
|
+
"type": "u64"
|
|
2837
|
+
},
|
|
2838
|
+
{
|
|
2839
|
+
"name": "distributable_amount",
|
|
2840
|
+
"docs": ["SOL available for distribution this epoch (balance - reserve_floor)"],
|
|
2841
|
+
"type": "u64"
|
|
2842
|
+
},
|
|
2843
|
+
{
|
|
2844
|
+
"name": "bump",
|
|
2845
|
+
"docs": ["PDA bump"],
|
|
2846
|
+
"type": "u8"
|
|
2847
|
+
}
|
|
2848
|
+
]
|
|
2849
|
+
}
|
|
2850
|
+
},
|
|
2851
|
+
{
|
|
2852
|
+
"name": "RevivalContribution",
|
|
2853
|
+
"docs": ["Emitted when someone contributes to a token revival"],
|
|
2854
|
+
"type": {
|
|
2855
|
+
"kind": "struct",
|
|
2856
|
+
"fields": [
|
|
2857
|
+
{
|
|
2858
|
+
"name": "mint",
|
|
2859
|
+
"type": "pubkey"
|
|
2860
|
+
},
|
|
2861
|
+
{
|
|
2862
|
+
"name": "contributor",
|
|
2863
|
+
"type": "pubkey"
|
|
2864
|
+
},
|
|
2865
|
+
{
|
|
2866
|
+
"name": "amount",
|
|
2867
|
+
"type": "u64"
|
|
2868
|
+
},
|
|
2869
|
+
{
|
|
2870
|
+
"name": "total_contributed",
|
|
2871
|
+
"type": "u64"
|
|
2872
|
+
},
|
|
2873
|
+
{
|
|
2874
|
+
"name": "threshold",
|
|
2875
|
+
"type": "u64"
|
|
2876
|
+
},
|
|
2877
|
+
{
|
|
2878
|
+
"name": "revived",
|
|
2879
|
+
"type": "bool"
|
|
2880
|
+
}
|
|
2881
|
+
]
|
|
2882
|
+
}
|
|
2883
|
+
},
|
|
2884
|
+
{
|
|
2885
|
+
"name": "SellArgs",
|
|
2886
|
+
"type": {
|
|
2887
|
+
"kind": "struct",
|
|
2888
|
+
"fields": [
|
|
2889
|
+
{
|
|
2890
|
+
"name": "token_amount",
|
|
2891
|
+
"type": "u64"
|
|
2892
|
+
},
|
|
2893
|
+
{
|
|
2894
|
+
"name": "min_sol_out",
|
|
2895
|
+
"type": "u64"
|
|
2896
|
+
}
|
|
2897
|
+
]
|
|
2898
|
+
}
|
|
2899
|
+
},
|
|
2900
|
+
{
|
|
2901
|
+
"name": "StarRecord",
|
|
2902
|
+
"docs": ["Individual star record - prevents double-starring (V7, updated V10)"],
|
|
2903
|
+
"type": {
|
|
2904
|
+
"kind": "struct",
|
|
2905
|
+
"fields": [
|
|
2906
|
+
{
|
|
2907
|
+
"name": "user",
|
|
2908
|
+
"docs": ["User who gave the star"],
|
|
2909
|
+
"type": "pubkey"
|
|
2910
|
+
},
|
|
2911
|
+
{
|
|
2912
|
+
"name": "mint",
|
|
2913
|
+
"docs": ["[V10] Token mint that received the star (was: creator)"],
|
|
2914
|
+
"type": "pubkey"
|
|
2915
|
+
},
|
|
2916
|
+
{
|
|
2917
|
+
"name": "starred_at_slot",
|
|
2918
|
+
"docs": ["Slot when star was given"],
|
|
2919
|
+
"type": "u64"
|
|
2920
|
+
},
|
|
2921
|
+
{
|
|
2922
|
+
"name": "bump",
|
|
2923
|
+
"docs": ["PDA bump"],
|
|
2924
|
+
"type": "u8"
|
|
2925
|
+
}
|
|
2926
|
+
]
|
|
2927
|
+
}
|
|
2928
|
+
},
|
|
2929
|
+
{
|
|
2930
|
+
"name": "TokenRevived",
|
|
2931
|
+
"docs": ["Emitted when a token is successfully revived"],
|
|
2932
|
+
"type": {
|
|
2933
|
+
"kind": "struct",
|
|
2934
|
+
"fields": [
|
|
2935
|
+
{
|
|
2936
|
+
"name": "mint",
|
|
2937
|
+
"type": "pubkey"
|
|
2938
|
+
},
|
|
2939
|
+
{
|
|
2940
|
+
"name": "total_contributed",
|
|
2941
|
+
"type": "u64"
|
|
2942
|
+
},
|
|
2943
|
+
{
|
|
2944
|
+
"name": "revival_slot",
|
|
2945
|
+
"type": "u64"
|
|
2946
|
+
}
|
|
2947
|
+
]
|
|
2948
|
+
}
|
|
2949
|
+
},
|
|
2950
|
+
{
|
|
2951
|
+
"name": "Treasury",
|
|
2952
|
+
"docs": ["Per-token treasury for buybacks (V2, extended in V9, V10)"],
|
|
2953
|
+
"type": {
|
|
2954
|
+
"kind": "struct",
|
|
2955
|
+
"fields": [
|
|
2956
|
+
{
|
|
2957
|
+
"name": "bonding_curve",
|
|
2958
|
+
"docs": ["Associated bonding curve"],
|
|
2959
|
+
"type": "pubkey"
|
|
2960
|
+
},
|
|
2961
|
+
{
|
|
2962
|
+
"name": "mint",
|
|
2963
|
+
"docs": ["Token mint"],
|
|
2964
|
+
"type": "pubkey"
|
|
2965
|
+
},
|
|
2966
|
+
{
|
|
2967
|
+
"name": "sol_balance",
|
|
2968
|
+
"docs": ["SOL balance available for buybacks"],
|
|
2969
|
+
"type": "u64"
|
|
2970
|
+
},
|
|
2971
|
+
{
|
|
2972
|
+
"name": "total_bought_back",
|
|
2973
|
+
"docs": ["Total tokens bought back"],
|
|
2974
|
+
"type": "u64"
|
|
2975
|
+
},
|
|
2976
|
+
{
|
|
2977
|
+
"name": "total_burned_from_buyback",
|
|
2978
|
+
"docs": ["Total tokens burned via buyback"],
|
|
2979
|
+
"type": "u64"
|
|
2980
|
+
},
|
|
2981
|
+
{
|
|
2982
|
+
"name": "tokens_held",
|
|
2983
|
+
"docs": ["Tokens held in treasury (after supply floor reached)"],
|
|
2984
|
+
"type": "u64"
|
|
2985
|
+
},
|
|
2986
|
+
{
|
|
2987
|
+
"name": "last_buyback_slot",
|
|
2988
|
+
"docs": ["Last buyback slot"],
|
|
2989
|
+
"type": "u64"
|
|
2990
|
+
},
|
|
2991
|
+
{
|
|
2992
|
+
"name": "buyback_count",
|
|
2993
|
+
"docs": ["Total buybacks executed"],
|
|
2994
|
+
"type": "u64"
|
|
2995
|
+
},
|
|
2996
|
+
{
|
|
2997
|
+
"name": "harvested_fees",
|
|
2998
|
+
"docs": ["Transfer fees harvested (V3)"],
|
|
2999
|
+
"type": "u64"
|
|
3000
|
+
},
|
|
3001
|
+
{
|
|
3002
|
+
"name": "bump",
|
|
3003
|
+
"docs": ["PDA bump"],
|
|
3004
|
+
"type": "u8"
|
|
3005
|
+
},
|
|
3006
|
+
{
|
|
3007
|
+
"name": "baseline_sol_reserves",
|
|
3008
|
+
"docs": ["Pool SOL reserves at migration time (baseline for ratio calculation)"],
|
|
3009
|
+
"type": "u64"
|
|
3010
|
+
},
|
|
3011
|
+
{
|
|
3012
|
+
"name": "baseline_token_reserves",
|
|
3013
|
+
"docs": ["Pool token reserves at migration time (baseline for ratio calculation)"],
|
|
3014
|
+
"type": "u64"
|
|
3015
|
+
},
|
|
3016
|
+
{
|
|
3017
|
+
"name": "ratio_threshold_bps",
|
|
3018
|
+
"docs": [
|
|
3019
|
+
"Ratio threshold in basis points (e.g., 8000 = 80%)",
|
|
3020
|
+
"Buyback triggers when: current_ratio < baseline_ratio * (threshold / 10000)"
|
|
3021
|
+
],
|
|
3022
|
+
"type": "u16"
|
|
3023
|
+
},
|
|
3024
|
+
{
|
|
3025
|
+
"name": "reserve_ratio_bps",
|
|
3026
|
+
"docs": [
|
|
3027
|
+
"Reserve ratio in basis points (e.g., 3000 = 30%)",
|
|
3028
|
+
"This percentage of treasury SOL is never spent on buybacks"
|
|
3029
|
+
],
|
|
3030
|
+
"type": "u16"
|
|
3031
|
+
},
|
|
3032
|
+
{
|
|
3033
|
+
"name": "buyback_percent_bps",
|
|
3034
|
+
"docs": [
|
|
3035
|
+
"Buyback amount per call in basis points (e.g., 1500 = 15%)",
|
|
3036
|
+
"Each buyback call spends this percentage of available (non-reserved) SOL"
|
|
3037
|
+
],
|
|
3038
|
+
"type": "u16"
|
|
3039
|
+
},
|
|
3040
|
+
{
|
|
3041
|
+
"name": "min_buyback_interval_slots",
|
|
3042
|
+
"docs": ["Minimum slots between buyback calls"],
|
|
3043
|
+
"type": "u64"
|
|
3044
|
+
},
|
|
3045
|
+
{
|
|
3046
|
+
"name": "baseline_initialized",
|
|
3047
|
+
"docs": ["Whether baseline has been set (can only set once, at migration)"],
|
|
3048
|
+
"type": "bool"
|
|
3049
|
+
},
|
|
3050
|
+
{
|
|
3051
|
+
"name": "total_stars",
|
|
3052
|
+
"docs": ["Total stars received for this token"],
|
|
3053
|
+
"type": "u64"
|
|
3054
|
+
},
|
|
3055
|
+
{
|
|
3056
|
+
"name": "star_sol_balance",
|
|
3057
|
+
"docs": ["SOL accumulated from stars (separate from sol_balance for buybacks)"],
|
|
3058
|
+
"type": "u64"
|
|
3059
|
+
},
|
|
3060
|
+
{
|
|
3061
|
+
"name": "creator_paid_out",
|
|
3062
|
+
"docs": ["Whether creator has been paid out (one-time payout on threshold)"],
|
|
3063
|
+
"type": "bool"
|
|
3064
|
+
}
|
|
3065
|
+
]
|
|
3066
|
+
}
|
|
3067
|
+
},
|
|
3068
|
+
{
|
|
3069
|
+
"name": "UserPosition",
|
|
3070
|
+
"docs": ["Per-user position for a token"],
|
|
3071
|
+
"type": {
|
|
3072
|
+
"kind": "struct",
|
|
3073
|
+
"fields": [
|
|
3074
|
+
{
|
|
3075
|
+
"name": "user",
|
|
3076
|
+
"docs": ["User wallet"],
|
|
3077
|
+
"type": "pubkey"
|
|
3078
|
+
},
|
|
3079
|
+
{
|
|
3080
|
+
"name": "bonding_curve",
|
|
3081
|
+
"docs": ["Bonding curve reference"],
|
|
3082
|
+
"type": "pubkey"
|
|
3083
|
+
},
|
|
3084
|
+
{
|
|
3085
|
+
"name": "total_purchased",
|
|
3086
|
+
"docs": ["Gross tokens purchased"],
|
|
3087
|
+
"type": "u64"
|
|
3088
|
+
},
|
|
3089
|
+
{
|
|
3090
|
+
"name": "tokens_received",
|
|
3091
|
+
"docs": ["Net tokens received"],
|
|
3092
|
+
"type": "u64"
|
|
3093
|
+
},
|
|
3094
|
+
{
|
|
3095
|
+
"name": "tokens_burned",
|
|
3096
|
+
"docs": ["Tokens sent to burn"],
|
|
3097
|
+
"type": "u64"
|
|
3098
|
+
},
|
|
3099
|
+
{
|
|
3100
|
+
"name": "total_sol_spent",
|
|
3101
|
+
"docs": ["SOL spent"],
|
|
3102
|
+
"type": "u64"
|
|
3103
|
+
},
|
|
3104
|
+
{
|
|
3105
|
+
"name": "has_voted",
|
|
3106
|
+
"docs": ["Has voted"],
|
|
3107
|
+
"type": "bool"
|
|
3108
|
+
},
|
|
3109
|
+
{
|
|
3110
|
+
"name": "vote_return",
|
|
3111
|
+
"docs": ["Vote choice"],
|
|
3112
|
+
"type": "bool"
|
|
3113
|
+
},
|
|
3114
|
+
{
|
|
3115
|
+
"name": "bump",
|
|
3116
|
+
"docs": ["PDA bump"],
|
|
3117
|
+
"type": "u8"
|
|
3118
|
+
}
|
|
3119
|
+
]
|
|
3120
|
+
}
|
|
3121
|
+
},
|
|
3122
|
+
{
|
|
3123
|
+
"name": "UserStats",
|
|
3124
|
+
"docs": ["Per-user stats for platform-wide volume tracking and rewards (V4)"],
|
|
3125
|
+
"type": {
|
|
3126
|
+
"kind": "struct",
|
|
3127
|
+
"fields": [
|
|
3128
|
+
{
|
|
3129
|
+
"name": "user",
|
|
3130
|
+
"docs": ["User wallet"],
|
|
3131
|
+
"type": "pubkey"
|
|
3132
|
+
},
|
|
3133
|
+
{
|
|
3134
|
+
"name": "total_volume",
|
|
3135
|
+
"docs": ["All-time SOL volume (buys + sells)"],
|
|
3136
|
+
"type": "u64"
|
|
3137
|
+
},
|
|
3138
|
+
{
|
|
3139
|
+
"name": "volume_current_epoch",
|
|
3140
|
+
"docs": ["Volume in current epoch"],
|
|
3141
|
+
"type": "u64"
|
|
3142
|
+
},
|
|
3143
|
+
{
|
|
3144
|
+
"name": "volume_previous_epoch",
|
|
3145
|
+
"docs": ["Volume in previous epoch (for claiming)"],
|
|
3146
|
+
"type": "u64"
|
|
3147
|
+
},
|
|
3148
|
+
{
|
|
3149
|
+
"name": "last_epoch_claimed",
|
|
3150
|
+
"docs": ["Last epoch user claimed rewards for"],
|
|
3151
|
+
"type": "u64"
|
|
3152
|
+
},
|
|
3153
|
+
{
|
|
3154
|
+
"name": "total_rewards_claimed",
|
|
3155
|
+
"docs": ["Total rewards claimed all-time"],
|
|
3156
|
+
"type": "u64"
|
|
3157
|
+
},
|
|
3158
|
+
{
|
|
3159
|
+
"name": "last_volume_epoch",
|
|
3160
|
+
"docs": ["Last epoch when volume was recorded (for lazy epoch transition)"],
|
|
3161
|
+
"type": "u64"
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
"name": "bump",
|
|
3165
|
+
"docs": ["PDA bump"],
|
|
3166
|
+
"type": "u8"
|
|
3167
|
+
}
|
|
3168
|
+
]
|
|
3169
|
+
}
|
|
3170
|
+
}
|
|
3171
|
+
]
|
|
3172
|
+
}
|