torchsdk 4.1.1 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +3 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/program.d.ts +18 -0
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +11 -1
- package/dist/program.js.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +7 -4
- package/dist/tokens.js.map +1 -1
- package/dist/torch_market.json +2501 -1029
- package/dist/transactions.d.ts +46 -1
- package/dist/transactions.d.ts.map +1 -1
- package/dist/transactions.js +252 -1
- package/dist/transactions.js.map +1 -1
- package/dist/types.d.ts +28 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/readme.md +22 -7
package/dist/torch_market.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"address": "8hbUkonssSEEtkqzwM7ZcZrD9evacM92TcWSooVF4BeT",
|
|
3
3
|
"metadata": {
|
|
4
4
|
"name": "torch_market",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "10.0.0",
|
|
6
6
|
"spec": "0.1.0",
|
|
7
7
|
"description": "torch.market"
|
|
8
8
|
},
|
|
@@ -1060,132 +1060,32 @@
|
|
|
1060
1060
|
"args": []
|
|
1061
1061
|
},
|
|
1062
1062
|
{
|
|
1063
|
-
"name": "
|
|
1063
|
+
"name": "close_short",
|
|
1064
1064
|
"docs": [
|
|
1065
|
-
"[
|
|
1066
|
-
"
|
|
1065
|
+
"[V5] Close or partially repay a short position.",
|
|
1066
|
+
"Return tokens, receive SOL collateral back."
|
|
1067
1067
|
],
|
|
1068
1068
|
"discriminator": [
|
|
1069
|
-
|
|
1069
|
+
159,
|
|
1070
1070
|
16,
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
],
|
|
1078
|
-
"accounts": [
|
|
1079
|
-
{
|
|
1080
|
-
"name": "contributor",
|
|
1081
|
-
"writable": true,
|
|
1082
|
-
"signer": true
|
|
1083
|
-
},
|
|
1084
|
-
{
|
|
1085
|
-
"name": "mint",
|
|
1086
|
-
"docs": [
|
|
1087
|
-
"The mint of the reclaimed token"
|
|
1088
|
-
]
|
|
1089
|
-
},
|
|
1090
|
-
{
|
|
1091
|
-
"name": "bonding_curve",
|
|
1092
|
-
"docs": [
|
|
1093
|
-
"Bonding curve - must be reclaimed to accept revival contributions"
|
|
1094
|
-
],
|
|
1095
|
-
"writable": true,
|
|
1096
|
-
"pda": {
|
|
1097
|
-
"seeds": [
|
|
1098
|
-
{
|
|
1099
|
-
"kind": "const",
|
|
1100
|
-
"value": [
|
|
1101
|
-
98,
|
|
1102
|
-
111,
|
|
1103
|
-
110,
|
|
1104
|
-
100,
|
|
1105
|
-
105,
|
|
1106
|
-
110,
|
|
1107
|
-
103,
|
|
1108
|
-
95,
|
|
1109
|
-
99,
|
|
1110
|
-
117,
|
|
1111
|
-
114,
|
|
1112
|
-
118,
|
|
1113
|
-
101
|
|
1114
|
-
]
|
|
1115
|
-
},
|
|
1116
|
-
{
|
|
1117
|
-
"kind": "account",
|
|
1118
|
-
"path": "mint"
|
|
1119
|
-
}
|
|
1120
|
-
]
|
|
1121
|
-
}
|
|
1122
|
-
},
|
|
1123
|
-
{
|
|
1124
|
-
"name": "system_program",
|
|
1125
|
-
"address": "11111111111111111111111111111111"
|
|
1126
|
-
}
|
|
1127
|
-
],
|
|
1128
|
-
"args": [
|
|
1129
|
-
{
|
|
1130
|
-
"name": "sol_amount",
|
|
1131
|
-
"type": "u64"
|
|
1132
|
-
}
|
|
1133
|
-
]
|
|
1134
|
-
},
|
|
1135
|
-
{
|
|
1136
|
-
"name": "create_token",
|
|
1137
|
-
"docs": [
|
|
1138
|
-
"[V3] Create a new Token-2022 token with transfer fee extension."
|
|
1139
|
-
],
|
|
1140
|
-
"discriminator": [
|
|
1141
|
-
84,
|
|
1142
|
-
52,
|
|
1143
|
-
204,
|
|
1144
|
-
228,
|
|
1145
|
-
24,
|
|
1146
|
-
140,
|
|
1147
|
-
234,
|
|
1148
|
-
75
|
|
1071
|
+
29,
|
|
1072
|
+
141,
|
|
1073
|
+
209,
|
|
1074
|
+
68,
|
|
1075
|
+
25,
|
|
1076
|
+
0
|
|
1149
1077
|
],
|
|
1150
1078
|
"accounts": [
|
|
1151
1079
|
{
|
|
1152
|
-
"name": "
|
|
1080
|
+
"name": "shorter",
|
|
1153
1081
|
"writable": true,
|
|
1154
1082
|
"signer": true
|
|
1155
1083
|
},
|
|
1156
1084
|
{
|
|
1157
|
-
"name": "
|
|
1158
|
-
"pda": {
|
|
1159
|
-
"seeds": [
|
|
1160
|
-
{
|
|
1161
|
-
"kind": "const",
|
|
1162
|
-
"value": [
|
|
1163
|
-
103,
|
|
1164
|
-
108,
|
|
1165
|
-
111,
|
|
1166
|
-
98,
|
|
1167
|
-
97,
|
|
1168
|
-
108,
|
|
1169
|
-
95,
|
|
1170
|
-
99,
|
|
1171
|
-
111,
|
|
1172
|
-
110,
|
|
1173
|
-
102,
|
|
1174
|
-
105,
|
|
1175
|
-
103
|
|
1176
|
-
]
|
|
1177
|
-
}
|
|
1178
|
-
]
|
|
1179
|
-
}
|
|
1180
|
-
},
|
|
1181
|
-
{
|
|
1182
|
-
"name": "mint",
|
|
1183
|
-
"writable": true,
|
|
1184
|
-
"signer": true
|
|
1085
|
+
"name": "mint"
|
|
1185
1086
|
},
|
|
1186
1087
|
{
|
|
1187
1088
|
"name": "bonding_curve",
|
|
1188
|
-
"writable": true,
|
|
1189
1089
|
"pda": {
|
|
1190
1090
|
"seeds": [
|
|
1191
1091
|
{
|
|
@@ -1213,10 +1113,6 @@
|
|
|
1213
1113
|
]
|
|
1214
1114
|
}
|
|
1215
1115
|
},
|
|
1216
|
-
{
|
|
1217
|
-
"name": "token_vault",
|
|
1218
|
-
"writable": true
|
|
1219
|
-
},
|
|
1220
1116
|
{
|
|
1221
1117
|
"name": "treasury",
|
|
1222
1118
|
"writable": true,
|
|
@@ -1242,21 +1138,11 @@
|
|
|
1242
1138
|
]
|
|
1243
1139
|
}
|
|
1244
1140
|
},
|
|
1245
|
-
{
|
|
1246
|
-
"name": "treasury_token_account",
|
|
1247
|
-
"docs": [
|
|
1248
|
-
"then buyback tokens post-migration. Created via CPI."
|
|
1249
|
-
],
|
|
1250
|
-
"writable": true
|
|
1251
|
-
},
|
|
1252
1141
|
{
|
|
1253
1142
|
"name": "treasury_lock",
|
|
1254
1143
|
"docs": [
|
|
1255
|
-
"
|
|
1256
|
-
"Initialized at token creation. Also serves as type discriminator",
|
|
1257
|
-
"for V27 vs legacy tokens in revival handler."
|
|
1144
|
+
"Treasury lock PDA (owns the locked token ATA)"
|
|
1258
1145
|
],
|
|
1259
|
-
"writable": true,
|
|
1260
1146
|
"pda": {
|
|
1261
1147
|
"seeds": [
|
|
1262
1148
|
{
|
|
@@ -1287,180 +1173,195 @@
|
|
|
1287
1173
|
{
|
|
1288
1174
|
"name": "treasury_lock_token_account",
|
|
1289
1175
|
"docs": [
|
|
1290
|
-
"
|
|
1291
|
-
"and treasury_token_account above). Address validated by CPI: the associated",
|
|
1292
|
-
"token program derives the correct ATA from (treasury_lock PDA, mint, Token-2022)",
|
|
1293
|
-
"and rejects mismatched addresses. mint_to CPI further validates mint authority."
|
|
1176
|
+
"Treasury lock's token account (receives returned tokens)"
|
|
1294
1177
|
],
|
|
1295
|
-
"writable": true
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1178
|
+
"writable": true,
|
|
1179
|
+
"pda": {
|
|
1180
|
+
"seeds": [
|
|
1181
|
+
{
|
|
1182
|
+
"kind": "account",
|
|
1183
|
+
"path": "treasury_lock"
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
"kind": "account",
|
|
1187
|
+
"path": "token_program"
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
"kind": "account",
|
|
1191
|
+
"path": "mint"
|
|
1192
|
+
}
|
|
1193
|
+
],
|
|
1194
|
+
"program": {
|
|
1195
|
+
"kind": "const",
|
|
1196
|
+
"value": [
|
|
1197
|
+
140,
|
|
1198
|
+
151,
|
|
1199
|
+
37,
|
|
1200
|
+
143,
|
|
1201
|
+
78,
|
|
1202
|
+
36,
|
|
1203
|
+
137,
|
|
1204
|
+
241,
|
|
1205
|
+
187,
|
|
1206
|
+
61,
|
|
1207
|
+
16,
|
|
1208
|
+
41,
|
|
1209
|
+
20,
|
|
1210
|
+
142,
|
|
1211
|
+
13,
|
|
1212
|
+
131,
|
|
1213
|
+
11,
|
|
1214
|
+
90,
|
|
1215
|
+
19,
|
|
1216
|
+
153,
|
|
1217
|
+
218,
|
|
1218
|
+
255,
|
|
1219
|
+
16,
|
|
1220
|
+
132,
|
|
1221
|
+
4,
|
|
1222
|
+
142,
|
|
1223
|
+
123,
|
|
1224
|
+
216,
|
|
1225
|
+
219,
|
|
1226
|
+
233,
|
|
1227
|
+
248,
|
|
1228
|
+
89
|
|
1229
|
+
]
|
|
1319
1230
|
}
|
|
1320
1231
|
}
|
|
1321
|
-
}
|
|
1322
|
-
]
|
|
1323
|
-
},
|
|
1324
|
-
{
|
|
1325
|
-
"name": "create_vault",
|
|
1326
|
-
"docs": [
|
|
1327
|
-
"[V14] Create a per-user SOL vault for safe agent interaction.",
|
|
1328
|
-
"The vault PDA enforces spending caps at the protocol level.",
|
|
1329
|
-
"[V14.1] Also creates a VaultWalletLink for the creator."
|
|
1330
|
-
],
|
|
1331
|
-
"discriminator": [
|
|
1332
|
-
29,
|
|
1333
|
-
237,
|
|
1334
|
-
247,
|
|
1335
|
-
208,
|
|
1336
|
-
193,
|
|
1337
|
-
82,
|
|
1338
|
-
54,
|
|
1339
|
-
135
|
|
1340
|
-
],
|
|
1341
|
-
"accounts": [
|
|
1342
|
-
{
|
|
1343
|
-
"name": "creator",
|
|
1344
|
-
"writable": true,
|
|
1345
|
-
"signer": true
|
|
1346
1232
|
},
|
|
1347
1233
|
{
|
|
1348
|
-
"name": "
|
|
1234
|
+
"name": "short_config",
|
|
1349
1235
|
"writable": true,
|
|
1350
1236
|
"pda": {
|
|
1351
1237
|
"seeds": [
|
|
1352
1238
|
{
|
|
1353
1239
|
"kind": "const",
|
|
1354
1240
|
"value": [
|
|
1355
|
-
|
|
1241
|
+
115,
|
|
1242
|
+
104,
|
|
1356
1243
|
111,
|
|
1357
1244
|
114,
|
|
1358
|
-
|
|
1359
|
-
104,
|
|
1245
|
+
116,
|
|
1360
1246
|
95,
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1247
|
+
99,
|
|
1248
|
+
111,
|
|
1249
|
+
110,
|
|
1250
|
+
102,
|
|
1251
|
+
105,
|
|
1252
|
+
103
|
|
1366
1253
|
]
|
|
1367
1254
|
},
|
|
1368
1255
|
{
|
|
1369
1256
|
"kind": "account",
|
|
1370
|
-
"path": "
|
|
1257
|
+
"path": "mint"
|
|
1371
1258
|
}
|
|
1372
1259
|
]
|
|
1373
1260
|
}
|
|
1374
1261
|
},
|
|
1375
1262
|
{
|
|
1376
|
-
"name": "
|
|
1377
|
-
"docs": [
|
|
1378
|
-
"Auto-created wallet link for the creator"
|
|
1379
|
-
],
|
|
1263
|
+
"name": "short_position",
|
|
1380
1264
|
"writable": true,
|
|
1381
1265
|
"pda": {
|
|
1382
1266
|
"seeds": [
|
|
1383
1267
|
{
|
|
1384
1268
|
"kind": "const",
|
|
1385
1269
|
"value": [
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
116,
|
|
1391
|
-
95,
|
|
1392
|
-
119,
|
|
1393
|
-
97,
|
|
1394
|
-
108,
|
|
1395
|
-
108,
|
|
1396
|
-
101,
|
|
1270
|
+
115,
|
|
1271
|
+
104,
|
|
1272
|
+
111,
|
|
1273
|
+
114,
|
|
1397
1274
|
116
|
|
1398
1275
|
]
|
|
1399
1276
|
},
|
|
1400
1277
|
{
|
|
1401
1278
|
"kind": "account",
|
|
1402
|
-
"path": "
|
|
1279
|
+
"path": "mint"
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
"kind": "account",
|
|
1283
|
+
"path": "shorter"
|
|
1403
1284
|
}
|
|
1404
1285
|
]
|
|
1405
1286
|
}
|
|
1406
1287
|
},
|
|
1407
1288
|
{
|
|
1408
|
-
"name": "
|
|
1409
|
-
"
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
"args": []
|
|
1413
|
-
},
|
|
1414
|
-
{
|
|
1415
|
-
"name": "deposit_vault",
|
|
1416
|
-
"docs": [
|
|
1417
|
-
"[V14] Deposit SOL into a vault. Anyone can deposit (multi-wallet)."
|
|
1418
|
-
],
|
|
1419
|
-
"discriminator": [
|
|
1420
|
-
126,
|
|
1421
|
-
224,
|
|
1422
|
-
21,
|
|
1423
|
-
255,
|
|
1424
|
-
228,
|
|
1425
|
-
53,
|
|
1426
|
-
117,
|
|
1427
|
-
33
|
|
1428
|
-
],
|
|
1429
|
-
"accounts": [
|
|
1430
|
-
{
|
|
1431
|
-
"name": "depositor",
|
|
1432
|
-
"writable": true,
|
|
1433
|
-
"signer": true
|
|
1434
|
-
},
|
|
1435
|
-
{
|
|
1436
|
-
"name": "vault",
|
|
1289
|
+
"name": "shorter_token_account",
|
|
1290
|
+
"docs": [
|
|
1291
|
+
"Shorter's token account (source of returned tokens)"
|
|
1292
|
+
],
|
|
1437
1293
|
"writable": true,
|
|
1438
1294
|
"pda": {
|
|
1439
1295
|
"seeds": [
|
|
1440
1296
|
{
|
|
1441
|
-
"kind": "
|
|
1442
|
-
"
|
|
1443
|
-
116,
|
|
1444
|
-
111,
|
|
1445
|
-
114,
|
|
1446
|
-
99,
|
|
1447
|
-
104,
|
|
1448
|
-
95,
|
|
1449
|
-
118,
|
|
1450
|
-
97,
|
|
1451
|
-
117,
|
|
1452
|
-
108,
|
|
1453
|
-
116
|
|
1454
|
-
]
|
|
1297
|
+
"kind": "account",
|
|
1298
|
+
"path": "shorter"
|
|
1455
1299
|
},
|
|
1456
1300
|
{
|
|
1457
1301
|
"kind": "account",
|
|
1458
|
-
"path": "
|
|
1459
|
-
|
|
1302
|
+
"path": "token_program"
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"kind": "account",
|
|
1306
|
+
"path": "mint"
|
|
1460
1307
|
}
|
|
1461
|
-
]
|
|
1308
|
+
],
|
|
1309
|
+
"program": {
|
|
1310
|
+
"kind": "const",
|
|
1311
|
+
"value": [
|
|
1312
|
+
140,
|
|
1313
|
+
151,
|
|
1314
|
+
37,
|
|
1315
|
+
143,
|
|
1316
|
+
78,
|
|
1317
|
+
36,
|
|
1318
|
+
137,
|
|
1319
|
+
241,
|
|
1320
|
+
187,
|
|
1321
|
+
61,
|
|
1322
|
+
16,
|
|
1323
|
+
41,
|
|
1324
|
+
20,
|
|
1325
|
+
142,
|
|
1326
|
+
13,
|
|
1327
|
+
131,
|
|
1328
|
+
11,
|
|
1329
|
+
90,
|
|
1330
|
+
19,
|
|
1331
|
+
153,
|
|
1332
|
+
218,
|
|
1333
|
+
255,
|
|
1334
|
+
16,
|
|
1335
|
+
132,
|
|
1336
|
+
4,
|
|
1337
|
+
142,
|
|
1338
|
+
123,
|
|
1339
|
+
216,
|
|
1340
|
+
219,
|
|
1341
|
+
233,
|
|
1342
|
+
248,
|
|
1343
|
+
89
|
|
1344
|
+
]
|
|
1345
|
+
}
|
|
1462
1346
|
}
|
|
1463
1347
|
},
|
|
1348
|
+
{
|
|
1349
|
+
"name": "torch_vault",
|
|
1350
|
+
"writable": true,
|
|
1351
|
+
"optional": true
|
|
1352
|
+
},
|
|
1353
|
+
{
|
|
1354
|
+
"name": "vault_wallet_link",
|
|
1355
|
+
"optional": true
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
"name": "vault_token_account",
|
|
1359
|
+
"writable": true,
|
|
1360
|
+
"optional": true
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
"name": "token_program"
|
|
1364
|
+
},
|
|
1464
1365
|
{
|
|
1465
1366
|
"name": "system_program",
|
|
1466
1367
|
"address": "11111111111111111111111111111111"
|
|
@@ -1468,46 +1369,43 @@
|
|
|
1468
1369
|
],
|
|
1469
1370
|
"args": [
|
|
1470
1371
|
{
|
|
1471
|
-
"name": "
|
|
1372
|
+
"name": "token_amount",
|
|
1472
1373
|
"type": "u64"
|
|
1473
1374
|
}
|
|
1474
1375
|
]
|
|
1475
1376
|
},
|
|
1476
1377
|
{
|
|
1477
|
-
"name": "
|
|
1378
|
+
"name": "contribute_revival",
|
|
1478
1379
|
"docs": [
|
|
1479
|
-
"[
|
|
1480
|
-
"
|
|
1481
|
-
"Isolates direct lamport manipulation from CPIs to avoid runtime balance errors."
|
|
1380
|
+
"[V12] Contribute SOL to revive a reclaimed token.",
|
|
1381
|
+
"When contributions reach 30 SOL, the token is automatically revived."
|
|
1482
1382
|
],
|
|
1483
1383
|
"discriminator": [
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1384
|
+
105,
|
|
1385
|
+
16,
|
|
1386
|
+
174,
|
|
1387
|
+
226,
|
|
1388
|
+
236,
|
|
1389
|
+
231,
|
|
1390
|
+
13,
|
|
1391
|
+
250
|
|
1492
1392
|
],
|
|
1493
1393
|
"accounts": [
|
|
1494
1394
|
{
|
|
1495
|
-
"name": "
|
|
1496
|
-
"
|
|
1497
|
-
"Anyone can trigger (permissionless)"
|
|
1498
|
-
],
|
|
1395
|
+
"name": "contributor",
|
|
1396
|
+
"writable": true,
|
|
1499
1397
|
"signer": true
|
|
1500
1398
|
},
|
|
1501
1399
|
{
|
|
1502
1400
|
"name": "mint",
|
|
1503
1401
|
"docs": [
|
|
1504
|
-
"
|
|
1402
|
+
"The mint of the reclaimed token"
|
|
1505
1403
|
]
|
|
1506
1404
|
},
|
|
1507
1405
|
{
|
|
1508
1406
|
"name": "bonding_curve",
|
|
1509
1407
|
"docs": [
|
|
1510
|
-
"Bonding curve
|
|
1408
|
+
"Bonding curve - must be reclaimed to accept revival contributions"
|
|
1511
1409
|
],
|
|
1512
1410
|
"writable": true,
|
|
1513
1411
|
"pda": {
|
|
@@ -1538,148 +1436,71 @@
|
|
|
1538
1436
|
}
|
|
1539
1437
|
},
|
|
1540
1438
|
{
|
|
1541
|
-
"name": "
|
|
1542
|
-
"
|
|
1543
|
-
"Bonding curve's WSOL ATA (lamport destination — protocol controlled)"
|
|
1544
|
-
],
|
|
1545
|
-
"writable": true
|
|
1439
|
+
"name": "system_program",
|
|
1440
|
+
"address": "11111111111111111111111111111111"
|
|
1546
1441
|
}
|
|
1547
1442
|
],
|
|
1548
|
-
"args": [
|
|
1443
|
+
"args": [
|
|
1444
|
+
{
|
|
1445
|
+
"name": "sol_amount",
|
|
1446
|
+
"type": "u64"
|
|
1447
|
+
}
|
|
1448
|
+
]
|
|
1549
1449
|
},
|
|
1550
1450
|
{
|
|
1551
|
-
"name": "
|
|
1451
|
+
"name": "create_token",
|
|
1552
1452
|
"docs": [
|
|
1553
|
-
"[
|
|
1554
|
-
"Must be called before vault_swap (buy) in the same transaction.",
|
|
1555
|
-
"Isolates direct lamport manipulation from CPIs to avoid runtime balance errors."
|
|
1453
|
+
"[V3] Create a new Token-2022 token with transfer fee extension."
|
|
1556
1454
|
],
|
|
1557
1455
|
"discriminator": [
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1456
|
+
84,
|
|
1457
|
+
52,
|
|
1458
|
+
204,
|
|
1459
|
+
228,
|
|
1562
1460
|
24,
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1461
|
+
140,
|
|
1462
|
+
234,
|
|
1463
|
+
75
|
|
1566
1464
|
],
|
|
1567
1465
|
"accounts": [
|
|
1568
1466
|
{
|
|
1569
|
-
"name": "
|
|
1570
|
-
"
|
|
1571
|
-
"Controller wallet (linked to vault)"
|
|
1572
|
-
],
|
|
1467
|
+
"name": "creator",
|
|
1468
|
+
"writable": true,
|
|
1573
1469
|
"signer": true
|
|
1574
1470
|
},
|
|
1575
1471
|
{
|
|
1576
|
-
"name": "
|
|
1577
|
-
"docs": [
|
|
1578
|
-
"Vault PDA (SOL source)"
|
|
1579
|
-
],
|
|
1580
|
-
"writable": true,
|
|
1472
|
+
"name": "global_config",
|
|
1581
1473
|
"pda": {
|
|
1582
1474
|
"seeds": [
|
|
1583
1475
|
{
|
|
1584
1476
|
"kind": "const",
|
|
1585
1477
|
"value": [
|
|
1586
|
-
|
|
1478
|
+
103,
|
|
1479
|
+
108,
|
|
1587
1480
|
111,
|
|
1588
|
-
|
|
1589
|
-
99,
|
|
1590
|
-
104,
|
|
1591
|
-
95,
|
|
1592
|
-
118,
|
|
1481
|
+
98,
|
|
1593
1482
|
97,
|
|
1594
|
-
117,
|
|
1595
1483
|
108,
|
|
1596
|
-
|
|
1484
|
+
95,
|
|
1485
|
+
99,
|
|
1486
|
+
111,
|
|
1487
|
+
110,
|
|
1488
|
+
102,
|
|
1489
|
+
105,
|
|
1490
|
+
103
|
|
1597
1491
|
]
|
|
1598
|
-
},
|
|
1599
|
-
{
|
|
1600
|
-
"kind": "account",
|
|
1601
|
-
"path": "torch_vault.creator",
|
|
1602
|
-
"account": "TorchVault"
|
|
1603
1492
|
}
|
|
1604
1493
|
]
|
|
1605
1494
|
}
|
|
1606
1495
|
},
|
|
1607
1496
|
{
|
|
1608
|
-
"name": "
|
|
1609
|
-
"
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
"kind": "const",
|
|
1616
|
-
"value": [
|
|
1617
|
-
118,
|
|
1618
|
-
97,
|
|
1619
|
-
117,
|
|
1620
|
-
108,
|
|
1621
|
-
116,
|
|
1622
|
-
95,
|
|
1623
|
-
119,
|
|
1624
|
-
97,
|
|
1625
|
-
108,
|
|
1626
|
-
108,
|
|
1627
|
-
101,
|
|
1628
|
-
116
|
|
1629
|
-
]
|
|
1630
|
-
},
|
|
1631
|
-
{
|
|
1632
|
-
"kind": "account",
|
|
1633
|
-
"path": "signer"
|
|
1634
|
-
}
|
|
1635
|
-
]
|
|
1636
|
-
}
|
|
1637
|
-
},
|
|
1638
|
-
{
|
|
1639
|
-
"name": "vault_wsol_account",
|
|
1640
|
-
"docs": [
|
|
1641
|
-
"Vault's WSOL ATA (lamport destination)"
|
|
1642
|
-
],
|
|
1643
|
-
"writable": true
|
|
1644
|
-
}
|
|
1645
|
-
],
|
|
1646
|
-
"args": [
|
|
1647
|
-
{
|
|
1648
|
-
"name": "amount",
|
|
1649
|
-
"type": "u64"
|
|
1650
|
-
}
|
|
1651
|
-
]
|
|
1652
|
-
},
|
|
1653
|
-
{
|
|
1654
|
-
"name": "harvest_fees",
|
|
1655
|
-
"docs": [
|
|
1656
|
-
"[V3] Harvest accumulated transfer fees."
|
|
1657
|
-
],
|
|
1658
|
-
"discriminator": [
|
|
1659
|
-
90,
|
|
1660
|
-
149,
|
|
1661
|
-
158,
|
|
1662
|
-
241,
|
|
1663
|
-
163,
|
|
1664
|
-
186,
|
|
1665
|
-
155,
|
|
1666
|
-
202
|
|
1667
|
-
],
|
|
1668
|
-
"accounts": [
|
|
1669
|
-
{
|
|
1670
|
-
"name": "payer",
|
|
1671
|
-
"docs": [
|
|
1672
|
-
"Anyone can harvest fees (permissionless)"
|
|
1673
|
-
],
|
|
1674
|
-
"writable": true,
|
|
1675
|
-
"signer": true
|
|
1676
|
-
},
|
|
1677
|
-
{
|
|
1678
|
-
"name": "mint",
|
|
1679
|
-
"writable": true
|
|
1680
|
-
},
|
|
1681
|
-
{
|
|
1682
|
-
"name": "bonding_curve",
|
|
1497
|
+
"name": "mint",
|
|
1498
|
+
"writable": true,
|
|
1499
|
+
"signer": true
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
"name": "bonding_curve",
|
|
1503
|
+
"writable": true,
|
|
1683
1504
|
"pda": {
|
|
1684
1505
|
"seeds": [
|
|
1685
1506
|
{
|
|
@@ -1708,10 +1529,11 @@
|
|
|
1708
1529
|
}
|
|
1709
1530
|
},
|
|
1710
1531
|
{
|
|
1711
|
-
"name": "
|
|
1712
|
-
"
|
|
1713
|
-
|
|
1714
|
-
|
|
1532
|
+
"name": "token_vault",
|
|
1533
|
+
"writable": true
|
|
1534
|
+
},
|
|
1535
|
+
{
|
|
1536
|
+
"name": "treasury",
|
|
1715
1537
|
"writable": true,
|
|
1716
1538
|
"pda": {
|
|
1717
1539
|
"seeds": [
|
|
@@ -1738,125 +1560,164 @@
|
|
|
1738
1560
|
{
|
|
1739
1561
|
"name": "treasury_token_account",
|
|
1740
1562
|
"docs": [
|
|
1741
|
-
"
|
|
1563
|
+
"then buyback tokens post-migration. Created via CPI."
|
|
1564
|
+
],
|
|
1565
|
+
"writable": true
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
"name": "treasury_lock",
|
|
1569
|
+
"docs": [
|
|
1570
|
+
"[V27] Treasury lock PDA — owns the locked token ATA (250M).",
|
|
1571
|
+
"Initialized at token creation. Also serves as type discriminator",
|
|
1572
|
+
"for V27 vs legacy tokens in revival handler."
|
|
1742
1573
|
],
|
|
1743
1574
|
"writable": true,
|
|
1744
1575
|
"pda": {
|
|
1745
1576
|
"seeds": [
|
|
1746
1577
|
{
|
|
1747
|
-
"kind": "
|
|
1748
|
-
"
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1578
|
+
"kind": "const",
|
|
1579
|
+
"value": [
|
|
1580
|
+
116,
|
|
1581
|
+
114,
|
|
1582
|
+
101,
|
|
1583
|
+
97,
|
|
1584
|
+
115,
|
|
1585
|
+
117,
|
|
1586
|
+
114,
|
|
1587
|
+
121,
|
|
1588
|
+
95,
|
|
1589
|
+
108,
|
|
1590
|
+
111,
|
|
1591
|
+
99,
|
|
1592
|
+
107
|
|
1593
|
+
]
|
|
1753
1594
|
},
|
|
1754
1595
|
{
|
|
1755
1596
|
"kind": "account",
|
|
1756
1597
|
"path": "mint"
|
|
1757
1598
|
}
|
|
1758
|
-
]
|
|
1759
|
-
"program": {
|
|
1760
|
-
"kind": "const",
|
|
1761
|
-
"value": [
|
|
1762
|
-
140,
|
|
1763
|
-
151,
|
|
1764
|
-
37,
|
|
1765
|
-
143,
|
|
1766
|
-
78,
|
|
1767
|
-
36,
|
|
1768
|
-
137,
|
|
1769
|
-
241,
|
|
1770
|
-
187,
|
|
1771
|
-
61,
|
|
1772
|
-
16,
|
|
1773
|
-
41,
|
|
1774
|
-
20,
|
|
1775
|
-
142,
|
|
1776
|
-
13,
|
|
1777
|
-
131,
|
|
1778
|
-
11,
|
|
1779
|
-
90,
|
|
1780
|
-
19,
|
|
1781
|
-
153,
|
|
1782
|
-
218,
|
|
1783
|
-
255,
|
|
1784
|
-
16,
|
|
1785
|
-
132,
|
|
1786
|
-
4,
|
|
1787
|
-
142,
|
|
1788
|
-
123,
|
|
1789
|
-
216,
|
|
1790
|
-
219,
|
|
1791
|
-
233,
|
|
1792
|
-
248,
|
|
1793
|
-
89
|
|
1794
|
-
]
|
|
1795
|
-
}
|
|
1599
|
+
]
|
|
1796
1600
|
}
|
|
1797
1601
|
},
|
|
1602
|
+
{
|
|
1603
|
+
"name": "treasury_lock_token_account",
|
|
1604
|
+
"docs": [
|
|
1605
|
+
"Created via CPI to associated token program (same pattern as token_vault",
|
|
1606
|
+
"and treasury_token_account above). Address validated by CPI: the associated",
|
|
1607
|
+
"token program derives the correct ATA from (treasury_lock PDA, mint, Token-2022)",
|
|
1608
|
+
"and rejects mismatched addresses. mint_to CPI further validates mint authority."
|
|
1609
|
+
],
|
|
1610
|
+
"writable": true
|
|
1611
|
+
},
|
|
1798
1612
|
{
|
|
1799
1613
|
"name": "token_2022_program"
|
|
1800
1614
|
},
|
|
1801
1615
|
{
|
|
1802
1616
|
"name": "associated_token_program",
|
|
1803
1617
|
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
1618
|
+
},
|
|
1619
|
+
{
|
|
1620
|
+
"name": "system_program",
|
|
1621
|
+
"address": "11111111111111111111111111111111"
|
|
1622
|
+
},
|
|
1623
|
+
{
|
|
1624
|
+
"name": "rent",
|
|
1625
|
+
"address": "SysvarRent111111111111111111111111111111111"
|
|
1804
1626
|
}
|
|
1805
1627
|
],
|
|
1806
|
-
"args": [
|
|
1628
|
+
"args": [
|
|
1629
|
+
{
|
|
1630
|
+
"name": "args",
|
|
1631
|
+
"type": {
|
|
1632
|
+
"defined": {
|
|
1633
|
+
"name": "CreateTokenArgs"
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
]
|
|
1807
1638
|
},
|
|
1808
1639
|
{
|
|
1809
|
-
"name": "
|
|
1640
|
+
"name": "create_vault",
|
|
1810
1641
|
"docs": [
|
|
1811
|
-
"
|
|
1642
|
+
"[V14] Create a per-user SOL vault for safe agent interaction.",
|
|
1643
|
+
"The vault PDA enforces spending caps at the protocol level.",
|
|
1644
|
+
"[V14.1] Also creates a VaultWalletLink for the creator."
|
|
1812
1645
|
],
|
|
1813
1646
|
"discriminator": [
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1647
|
+
29,
|
|
1648
|
+
237,
|
|
1649
|
+
247,
|
|
1650
|
+
208,
|
|
1651
|
+
193,
|
|
1652
|
+
82,
|
|
1653
|
+
54,
|
|
1654
|
+
135
|
|
1822
1655
|
],
|
|
1823
1656
|
"accounts": [
|
|
1824
1657
|
{
|
|
1825
|
-
"name": "
|
|
1658
|
+
"name": "creator",
|
|
1826
1659
|
"writable": true,
|
|
1827
1660
|
"signer": true
|
|
1828
1661
|
},
|
|
1829
1662
|
{
|
|
1830
|
-
"name": "
|
|
1663
|
+
"name": "vault",
|
|
1831
1664
|
"writable": true,
|
|
1832
1665
|
"pda": {
|
|
1833
1666
|
"seeds": [
|
|
1834
1667
|
{
|
|
1835
1668
|
"kind": "const",
|
|
1836
1669
|
"value": [
|
|
1837
|
-
|
|
1838
|
-
108,
|
|
1670
|
+
116,
|
|
1839
1671
|
111,
|
|
1840
|
-
|
|
1672
|
+
114,
|
|
1673
|
+
99,
|
|
1674
|
+
104,
|
|
1675
|
+
95,
|
|
1676
|
+
118,
|
|
1841
1677
|
97,
|
|
1678
|
+
117,
|
|
1842
1679
|
108,
|
|
1843
|
-
|
|
1844
|
-
99,
|
|
1845
|
-
111,
|
|
1846
|
-
110,
|
|
1847
|
-
102,
|
|
1848
|
-
105,
|
|
1849
|
-
103
|
|
1680
|
+
116
|
|
1850
1681
|
]
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
"kind": "account",
|
|
1685
|
+
"path": "creator"
|
|
1851
1686
|
}
|
|
1852
1687
|
]
|
|
1853
1688
|
}
|
|
1854
1689
|
},
|
|
1855
1690
|
{
|
|
1856
|
-
"name": "
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1691
|
+
"name": "wallet_link",
|
|
1692
|
+
"docs": [
|
|
1693
|
+
"Auto-created wallet link for the creator"
|
|
1694
|
+
],
|
|
1695
|
+
"writable": true,
|
|
1696
|
+
"pda": {
|
|
1697
|
+
"seeds": [
|
|
1698
|
+
{
|
|
1699
|
+
"kind": "const",
|
|
1700
|
+
"value": [
|
|
1701
|
+
118,
|
|
1702
|
+
97,
|
|
1703
|
+
117,
|
|
1704
|
+
108,
|
|
1705
|
+
116,
|
|
1706
|
+
95,
|
|
1707
|
+
119,
|
|
1708
|
+
97,
|
|
1709
|
+
108,
|
|
1710
|
+
108,
|
|
1711
|
+
101,
|
|
1712
|
+
116
|
|
1713
|
+
]
|
|
1714
|
+
},
|
|
1715
|
+
{
|
|
1716
|
+
"kind": "account",
|
|
1717
|
+
"path": "creator"
|
|
1718
|
+
}
|
|
1719
|
+
]
|
|
1720
|
+
}
|
|
1860
1721
|
},
|
|
1861
1722
|
{
|
|
1862
1723
|
"name": "system_program",
|
|
@@ -1866,29 +1727,88 @@
|
|
|
1866
1727
|
"args": []
|
|
1867
1728
|
},
|
|
1868
1729
|
{
|
|
1869
|
-
"name": "
|
|
1730
|
+
"name": "deposit_vault",
|
|
1870
1731
|
"docs": [
|
|
1871
|
-
"[
|
|
1872
|
-
"Protocol fees (0.5%) accumulate here with 1500 SOL reserve floor."
|
|
1732
|
+
"[V14] Deposit SOL into a vault. Anyone can deposit (multi-wallet)."
|
|
1873
1733
|
],
|
|
1874
1734
|
"discriminator": [
|
|
1875
|
-
|
|
1876
|
-
|
|
1735
|
+
126,
|
|
1736
|
+
224,
|
|
1737
|
+
21,
|
|
1738
|
+
255,
|
|
1739
|
+
228,
|
|
1877
1740
|
53,
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1741
|
+
117,
|
|
1742
|
+
33
|
|
1743
|
+
],
|
|
1744
|
+
"accounts": [
|
|
1745
|
+
{
|
|
1746
|
+
"name": "depositor",
|
|
1747
|
+
"writable": true,
|
|
1748
|
+
"signer": true
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
"name": "vault",
|
|
1752
|
+
"writable": true,
|
|
1753
|
+
"pda": {
|
|
1754
|
+
"seeds": [
|
|
1755
|
+
{
|
|
1756
|
+
"kind": "const",
|
|
1757
|
+
"value": [
|
|
1758
|
+
116,
|
|
1759
|
+
111,
|
|
1760
|
+
114,
|
|
1761
|
+
99,
|
|
1762
|
+
104,
|
|
1763
|
+
95,
|
|
1764
|
+
118,
|
|
1765
|
+
97,
|
|
1766
|
+
117,
|
|
1767
|
+
108,
|
|
1768
|
+
116
|
|
1769
|
+
]
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
"kind": "account",
|
|
1773
|
+
"path": "vault.creator",
|
|
1774
|
+
"account": "TorchVault"
|
|
1775
|
+
}
|
|
1776
|
+
]
|
|
1777
|
+
}
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
"name": "system_program",
|
|
1781
|
+
"address": "11111111111111111111111111111111"
|
|
1782
|
+
}
|
|
1783
|
+
],
|
|
1784
|
+
"args": [
|
|
1785
|
+
{
|
|
1786
|
+
"name": "sol_amount",
|
|
1787
|
+
"type": "u64"
|
|
1788
|
+
}
|
|
1789
|
+
]
|
|
1790
|
+
},
|
|
1791
|
+
{
|
|
1792
|
+
"name": "enable_short_selling",
|
|
1793
|
+
"docs": [
|
|
1794
|
+
"[V5] Enable short selling for a specific token. Admin only.",
|
|
1795
|
+
"Creates ShortConfig PDA and sets Treasury sentinel flags."
|
|
1796
|
+
],
|
|
1797
|
+
"discriminator": [
|
|
1798
|
+
222,
|
|
1799
|
+
128,
|
|
1800
|
+
161,
|
|
1801
|
+
13,
|
|
1802
|
+
223,
|
|
1803
|
+
79,
|
|
1804
|
+
147,
|
|
1805
|
+
208
|
|
1883
1806
|
],
|
|
1884
1807
|
"accounts": [
|
|
1885
1808
|
{
|
|
1886
1809
|
"name": "authority",
|
|
1887
1810
|
"writable": true,
|
|
1888
|
-
"signer": true
|
|
1889
|
-
"relations": [
|
|
1890
|
-
"global_config"
|
|
1891
|
-
]
|
|
1811
|
+
"signer": true
|
|
1892
1812
|
},
|
|
1893
1813
|
{
|
|
1894
1814
|
"name": "global_config",
|
|
@@ -1916,72 +1836,39 @@
|
|
|
1916
1836
|
}
|
|
1917
1837
|
},
|
|
1918
1838
|
{
|
|
1919
|
-
"name": "
|
|
1920
|
-
|
|
1839
|
+
"name": "mint"
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
1842
|
+
"name": "bonding_curve",
|
|
1921
1843
|
"pda": {
|
|
1922
1844
|
"seeds": [
|
|
1923
1845
|
{
|
|
1924
1846
|
"kind": "const",
|
|
1925
1847
|
"value": [
|
|
1926
|
-
|
|
1927
|
-
114,
|
|
1928
|
-
111,
|
|
1929
|
-
116,
|
|
1930
|
-
111,
|
|
1931
|
-
99,
|
|
1848
|
+
98,
|
|
1932
1849
|
111,
|
|
1933
|
-
|
|
1850
|
+
110,
|
|
1851
|
+
100,
|
|
1852
|
+
105,
|
|
1853
|
+
110,
|
|
1854
|
+
103,
|
|
1934
1855
|
95,
|
|
1935
|
-
|
|
1936
|
-
114,
|
|
1937
|
-
101,
|
|
1938
|
-
97,
|
|
1939
|
-
115,
|
|
1856
|
+
99,
|
|
1940
1857
|
117,
|
|
1941
1858
|
114,
|
|
1942
|
-
121,
|
|
1943
|
-
95,
|
|
1944
1859
|
118,
|
|
1945
|
-
|
|
1946
|
-
49
|
|
1860
|
+
101
|
|
1947
1861
|
]
|
|
1862
|
+
},
|
|
1863
|
+
{
|
|
1864
|
+
"kind": "account",
|
|
1865
|
+
"path": "mint"
|
|
1948
1866
|
}
|
|
1949
1867
|
]
|
|
1950
1868
|
}
|
|
1951
1869
|
},
|
|
1952
1870
|
{
|
|
1953
|
-
"name": "
|
|
1954
|
-
"address": "11111111111111111111111111111111"
|
|
1955
|
-
}
|
|
1956
|
-
],
|
|
1957
|
-
"args": []
|
|
1958
|
-
},
|
|
1959
|
-
{
|
|
1960
|
-
"name": "link_wallet",
|
|
1961
|
-
"docs": [
|
|
1962
|
-
"[V14.1] Link a new wallet to a vault. Authority only."
|
|
1963
|
-
],
|
|
1964
|
-
"discriminator": [
|
|
1965
|
-
86,
|
|
1966
|
-
92,
|
|
1967
|
-
31,
|
|
1968
|
-
146,
|
|
1969
|
-
228,
|
|
1970
|
-
51,
|
|
1971
|
-
209,
|
|
1972
|
-
230
|
|
1973
|
-
],
|
|
1974
|
-
"accounts": [
|
|
1975
|
-
{
|
|
1976
|
-
"name": "authority",
|
|
1977
|
-
"writable": true,
|
|
1978
|
-
"signer": true,
|
|
1979
|
-
"relations": [
|
|
1980
|
-
"vault"
|
|
1981
|
-
]
|
|
1982
|
-
},
|
|
1983
|
-
{
|
|
1984
|
-
"name": "vault",
|
|
1871
|
+
"name": "treasury",
|
|
1985
1872
|
"writable": true,
|
|
1986
1873
|
"pda": {
|
|
1987
1874
|
"seeds": [
|
|
@@ -1989,54 +1876,47 @@
|
|
|
1989
1876
|
"kind": "const",
|
|
1990
1877
|
"value": [
|
|
1991
1878
|
116,
|
|
1992
|
-
111,
|
|
1993
1879
|
114,
|
|
1994
|
-
|
|
1995
|
-
104,
|
|
1996
|
-
95,
|
|
1997
|
-
118,
|
|
1880
|
+
101,
|
|
1998
1881
|
97,
|
|
1882
|
+
115,
|
|
1999
1883
|
117,
|
|
2000
|
-
|
|
2001
|
-
|
|
1884
|
+
114,
|
|
1885
|
+
121
|
|
2002
1886
|
]
|
|
2003
1887
|
},
|
|
2004
1888
|
{
|
|
2005
1889
|
"kind": "account",
|
|
2006
|
-
"path": "
|
|
2007
|
-
"account": "TorchVault"
|
|
1890
|
+
"path": "mint"
|
|
2008
1891
|
}
|
|
2009
1892
|
]
|
|
2010
1893
|
}
|
|
2011
1894
|
},
|
|
2012
1895
|
{
|
|
2013
|
-
"name": "
|
|
2014
|
-
},
|
|
2015
|
-
{
|
|
2016
|
-
"name": "wallet_link",
|
|
1896
|
+
"name": "short_config",
|
|
2017
1897
|
"writable": true,
|
|
2018
1898
|
"pda": {
|
|
2019
1899
|
"seeds": [
|
|
2020
1900
|
{
|
|
2021
1901
|
"kind": "const",
|
|
2022
1902
|
"value": [
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
1903
|
+
115,
|
|
1904
|
+
104,
|
|
1905
|
+
111,
|
|
1906
|
+
114,
|
|
2027
1907
|
116,
|
|
2028
1908
|
95,
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
1909
|
+
99,
|
|
1910
|
+
111,
|
|
1911
|
+
110,
|
|
1912
|
+
102,
|
|
1913
|
+
105,
|
|
1914
|
+
103
|
|
2035
1915
|
]
|
|
2036
1916
|
},
|
|
2037
1917
|
{
|
|
2038
1918
|
"kind": "account",
|
|
2039
|
-
"path": "
|
|
1919
|
+
"path": "mint"
|
|
2040
1920
|
}
|
|
2041
1921
|
]
|
|
2042
1922
|
}
|
|
@@ -2049,39 +1929,42 @@
|
|
|
2049
1929
|
"args": []
|
|
2050
1930
|
},
|
|
2051
1931
|
{
|
|
2052
|
-
"name": "
|
|
1932
|
+
"name": "fund_migration_wsol",
|
|
2053
1933
|
"docs": [
|
|
2054
|
-
"[
|
|
2055
|
-
"
|
|
1934
|
+
"[V26] Fund bonding curve's WSOL ATA with bonding curve SOL.",
|
|
1935
|
+
"Must be called BEFORE migrate_to_dex in the same transaction.",
|
|
1936
|
+
"Isolates direct lamport manipulation from CPIs to avoid runtime balance errors."
|
|
2056
1937
|
],
|
|
2057
1938
|
"discriminator": [
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
1939
|
+
143,
|
|
1940
|
+
163,
|
|
1941
|
+
2,
|
|
1942
|
+
0,
|
|
1943
|
+
85,
|
|
1944
|
+
235,
|
|
1945
|
+
44,
|
|
1946
|
+
150
|
|
2066
1947
|
],
|
|
2067
1948
|
"accounts": [
|
|
2068
1949
|
{
|
|
2069
|
-
"name": "
|
|
1950
|
+
"name": "payer",
|
|
2070
1951
|
"docs": [
|
|
2071
|
-
"
|
|
1952
|
+
"Anyone can trigger (permissionless)"
|
|
2072
1953
|
],
|
|
2073
|
-
"writable": true,
|
|
2074
1954
|
"signer": true
|
|
2075
1955
|
},
|
|
2076
1956
|
{
|
|
2077
|
-
"name": "
|
|
2078
|
-
"
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
"name": "mint"
|
|
1957
|
+
"name": "mint",
|
|
1958
|
+
"docs": [
|
|
1959
|
+
"Token mint being migrated"
|
|
1960
|
+
]
|
|
2082
1961
|
},
|
|
2083
1962
|
{
|
|
2084
1963
|
"name": "bonding_curve",
|
|
1964
|
+
"docs": [
|
|
1965
|
+
"Bonding curve — SOL source"
|
|
1966
|
+
],
|
|
1967
|
+
"writable": true,
|
|
2085
1968
|
"pda": {
|
|
2086
1969
|
"seeds": [
|
|
2087
1970
|
{
|
|
@@ -2110,57 +1993,1624 @@
|
|
|
2110
1993
|
}
|
|
2111
1994
|
},
|
|
2112
1995
|
{
|
|
2113
|
-
"name": "
|
|
2114
|
-
"writable": true,
|
|
2115
|
-
"pda": {
|
|
2116
|
-
"seeds": [
|
|
2117
|
-
{
|
|
2118
|
-
"kind": "const",
|
|
2119
|
-
"value": [
|
|
2120
|
-
116,
|
|
2121
|
-
114,
|
|
2122
|
-
101,
|
|
2123
|
-
97,
|
|
2124
|
-
115,
|
|
2125
|
-
117,
|
|
2126
|
-
114,
|
|
2127
|
-
121
|
|
2128
|
-
]
|
|
2129
|
-
},
|
|
2130
|
-
{
|
|
2131
|
-
"kind": "account",
|
|
2132
|
-
"path": "mint"
|
|
2133
|
-
}
|
|
2134
|
-
]
|
|
2135
|
-
}
|
|
2136
|
-
},
|
|
2137
|
-
{
|
|
2138
|
-
"name": "collateral_vault",
|
|
1996
|
+
"name": "bc_wsol",
|
|
2139
1997
|
"docs": [
|
|
2140
|
-
"
|
|
1998
|
+
"Bonding curve's WSOL ATA (lamport destination — protocol controlled)"
|
|
2141
1999
|
],
|
|
2142
|
-
"writable": true
|
|
2143
|
-
|
|
2000
|
+
"writable": true
|
|
2001
|
+
}
|
|
2002
|
+
],
|
|
2003
|
+
"args": []
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
"name": "fund_vault_wsol",
|
|
2007
|
+
"docs": [
|
|
2008
|
+
"[V19] Fund vault WSOL ATA with lamports from vault PDA.",
|
|
2009
|
+
"Must be called before vault_swap (buy) in the same transaction.",
|
|
2010
|
+
"Isolates direct lamport manipulation from CPIs to avoid runtime balance errors."
|
|
2011
|
+
],
|
|
2012
|
+
"discriminator": [
|
|
2013
|
+
100,
|
|
2014
|
+
184,
|
|
2015
|
+
41,
|
|
2016
|
+
110,
|
|
2017
|
+
24,
|
|
2018
|
+
100,
|
|
2019
|
+
34,
|
|
2020
|
+
246
|
|
2021
|
+
],
|
|
2022
|
+
"accounts": [
|
|
2023
|
+
{
|
|
2024
|
+
"name": "signer",
|
|
2025
|
+
"docs": [
|
|
2026
|
+
"Controller wallet (linked to vault)"
|
|
2027
|
+
],
|
|
2028
|
+
"signer": true
|
|
2029
|
+
},
|
|
2030
|
+
{
|
|
2031
|
+
"name": "torch_vault",
|
|
2032
|
+
"docs": [
|
|
2033
|
+
"Vault PDA (SOL source)"
|
|
2034
|
+
],
|
|
2035
|
+
"writable": true,
|
|
2036
|
+
"pda": {
|
|
2144
2037
|
"seeds": [
|
|
2145
2038
|
{
|
|
2146
2039
|
"kind": "const",
|
|
2147
2040
|
"value": [
|
|
2148
|
-
|
|
2041
|
+
116,
|
|
2149
2042
|
111,
|
|
2043
|
+
114,
|
|
2044
|
+
99,
|
|
2045
|
+
104,
|
|
2046
|
+
95,
|
|
2047
|
+
118,
|
|
2048
|
+
97,
|
|
2049
|
+
117,
|
|
2150
2050
|
108,
|
|
2151
|
-
|
|
2051
|
+
116
|
|
2052
|
+
]
|
|
2053
|
+
},
|
|
2054
|
+
{
|
|
2055
|
+
"kind": "account",
|
|
2056
|
+
"path": "torch_vault.creator",
|
|
2057
|
+
"account": "TorchVault"
|
|
2058
|
+
}
|
|
2059
|
+
]
|
|
2060
|
+
}
|
|
2061
|
+
},
|
|
2062
|
+
{
|
|
2063
|
+
"name": "vault_wallet_link",
|
|
2064
|
+
"docs": [
|
|
2065
|
+
"Vault wallet link (proves signer is authorized)"
|
|
2066
|
+
],
|
|
2067
|
+
"pda": {
|
|
2068
|
+
"seeds": [
|
|
2069
|
+
{
|
|
2070
|
+
"kind": "const",
|
|
2071
|
+
"value": [
|
|
2072
|
+
118,
|
|
2152
2073
|
97,
|
|
2074
|
+
117,
|
|
2075
|
+
108,
|
|
2153
2076
|
116,
|
|
2154
|
-
|
|
2155
|
-
|
|
2077
|
+
95,
|
|
2078
|
+
119,
|
|
2156
2079
|
97,
|
|
2157
2080
|
108,
|
|
2081
|
+
108,
|
|
2082
|
+
101,
|
|
2083
|
+
116
|
|
2084
|
+
]
|
|
2085
|
+
},
|
|
2086
|
+
{
|
|
2087
|
+
"kind": "account",
|
|
2088
|
+
"path": "signer"
|
|
2089
|
+
}
|
|
2090
|
+
]
|
|
2091
|
+
}
|
|
2092
|
+
},
|
|
2093
|
+
{
|
|
2094
|
+
"name": "vault_wsol_account",
|
|
2095
|
+
"docs": [
|
|
2096
|
+
"Vault's WSOL ATA (lamport destination)"
|
|
2097
|
+
],
|
|
2098
|
+
"writable": true
|
|
2099
|
+
}
|
|
2100
|
+
],
|
|
2101
|
+
"args": [
|
|
2102
|
+
{
|
|
2103
|
+
"name": "amount",
|
|
2104
|
+
"type": "u64"
|
|
2105
|
+
}
|
|
2106
|
+
]
|
|
2107
|
+
},
|
|
2108
|
+
{
|
|
2109
|
+
"name": "harvest_fees",
|
|
2110
|
+
"docs": [
|
|
2111
|
+
"[V3] Harvest accumulated transfer fees."
|
|
2112
|
+
],
|
|
2113
|
+
"discriminator": [
|
|
2114
|
+
90,
|
|
2115
|
+
149,
|
|
2116
|
+
158,
|
|
2117
|
+
241,
|
|
2118
|
+
163,
|
|
2119
|
+
186,
|
|
2120
|
+
155,
|
|
2121
|
+
202
|
|
2122
|
+
],
|
|
2123
|
+
"accounts": [
|
|
2124
|
+
{
|
|
2125
|
+
"name": "payer",
|
|
2126
|
+
"docs": [
|
|
2127
|
+
"Anyone can harvest fees (permissionless)"
|
|
2128
|
+
],
|
|
2129
|
+
"writable": true,
|
|
2130
|
+
"signer": true
|
|
2131
|
+
},
|
|
2132
|
+
{
|
|
2133
|
+
"name": "mint",
|
|
2134
|
+
"writable": true
|
|
2135
|
+
},
|
|
2136
|
+
{
|
|
2137
|
+
"name": "bonding_curve",
|
|
2138
|
+
"pda": {
|
|
2139
|
+
"seeds": [
|
|
2140
|
+
{
|
|
2141
|
+
"kind": "const",
|
|
2142
|
+
"value": [
|
|
2143
|
+
98,
|
|
2144
|
+
111,
|
|
2145
|
+
110,
|
|
2146
|
+
100,
|
|
2147
|
+
105,
|
|
2148
|
+
110,
|
|
2149
|
+
103,
|
|
2158
2150
|
95,
|
|
2151
|
+
99,
|
|
2152
|
+
117,
|
|
2153
|
+
114,
|
|
2159
2154
|
118,
|
|
2155
|
+
101
|
|
2156
|
+
]
|
|
2157
|
+
},
|
|
2158
|
+
{
|
|
2159
|
+
"kind": "account",
|
|
2160
|
+
"path": "mint"
|
|
2161
|
+
}
|
|
2162
|
+
]
|
|
2163
|
+
}
|
|
2164
|
+
},
|
|
2165
|
+
{
|
|
2166
|
+
"name": "token_treasury",
|
|
2167
|
+
"docs": [
|
|
2168
|
+
"Token treasury PDA (withdraw authority for fees)"
|
|
2169
|
+
],
|
|
2170
|
+
"writable": true,
|
|
2171
|
+
"pda": {
|
|
2172
|
+
"seeds": [
|
|
2173
|
+
{
|
|
2174
|
+
"kind": "const",
|
|
2175
|
+
"value": [
|
|
2176
|
+
116,
|
|
2177
|
+
114,
|
|
2178
|
+
101,
|
|
2160
2179
|
97,
|
|
2180
|
+
115,
|
|
2161
2181
|
117,
|
|
2162
|
-
|
|
2163
|
-
|
|
2182
|
+
114,
|
|
2183
|
+
121
|
|
2184
|
+
]
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
"kind": "account",
|
|
2188
|
+
"path": "mint"
|
|
2189
|
+
}
|
|
2190
|
+
]
|
|
2191
|
+
}
|
|
2192
|
+
},
|
|
2193
|
+
{
|
|
2194
|
+
"name": "treasury_token_account",
|
|
2195
|
+
"docs": [
|
|
2196
|
+
"Treasury's Token-2022 ATA — must match treasury PDA's ATA for this mint"
|
|
2197
|
+
],
|
|
2198
|
+
"writable": true,
|
|
2199
|
+
"pda": {
|
|
2200
|
+
"seeds": [
|
|
2201
|
+
{
|
|
2202
|
+
"kind": "account",
|
|
2203
|
+
"path": "token_treasury"
|
|
2204
|
+
},
|
|
2205
|
+
{
|
|
2206
|
+
"kind": "account",
|
|
2207
|
+
"path": "token_2022_program"
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
"kind": "account",
|
|
2211
|
+
"path": "mint"
|
|
2212
|
+
}
|
|
2213
|
+
],
|
|
2214
|
+
"program": {
|
|
2215
|
+
"kind": "const",
|
|
2216
|
+
"value": [
|
|
2217
|
+
140,
|
|
2218
|
+
151,
|
|
2219
|
+
37,
|
|
2220
|
+
143,
|
|
2221
|
+
78,
|
|
2222
|
+
36,
|
|
2223
|
+
137,
|
|
2224
|
+
241,
|
|
2225
|
+
187,
|
|
2226
|
+
61,
|
|
2227
|
+
16,
|
|
2228
|
+
41,
|
|
2229
|
+
20,
|
|
2230
|
+
142,
|
|
2231
|
+
13,
|
|
2232
|
+
131,
|
|
2233
|
+
11,
|
|
2234
|
+
90,
|
|
2235
|
+
19,
|
|
2236
|
+
153,
|
|
2237
|
+
218,
|
|
2238
|
+
255,
|
|
2239
|
+
16,
|
|
2240
|
+
132,
|
|
2241
|
+
4,
|
|
2242
|
+
142,
|
|
2243
|
+
123,
|
|
2244
|
+
216,
|
|
2245
|
+
219,
|
|
2246
|
+
233,
|
|
2247
|
+
248,
|
|
2248
|
+
89
|
|
2249
|
+
]
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
"name": "token_2022_program"
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
"name": "associated_token_program",
|
|
2258
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
2259
|
+
}
|
|
2260
|
+
],
|
|
2261
|
+
"args": []
|
|
2262
|
+
},
|
|
2263
|
+
{
|
|
2264
|
+
"name": "initialize",
|
|
2265
|
+
"docs": [
|
|
2266
|
+
"Initialize the torch.market protocol."
|
|
2267
|
+
],
|
|
2268
|
+
"discriminator": [
|
|
2269
|
+
175,
|
|
2270
|
+
175,
|
|
2271
|
+
109,
|
|
2272
|
+
31,
|
|
2273
|
+
13,
|
|
2274
|
+
152,
|
|
2275
|
+
155,
|
|
2276
|
+
237
|
|
2277
|
+
],
|
|
2278
|
+
"accounts": [
|
|
2279
|
+
{
|
|
2280
|
+
"name": "authority",
|
|
2281
|
+
"writable": true,
|
|
2282
|
+
"signer": true
|
|
2283
|
+
},
|
|
2284
|
+
{
|
|
2285
|
+
"name": "global_config",
|
|
2286
|
+
"writable": true,
|
|
2287
|
+
"pda": {
|
|
2288
|
+
"seeds": [
|
|
2289
|
+
{
|
|
2290
|
+
"kind": "const",
|
|
2291
|
+
"value": [
|
|
2292
|
+
103,
|
|
2293
|
+
108,
|
|
2294
|
+
111,
|
|
2295
|
+
98,
|
|
2296
|
+
97,
|
|
2297
|
+
108,
|
|
2298
|
+
95,
|
|
2299
|
+
99,
|
|
2300
|
+
111,
|
|
2301
|
+
110,
|
|
2302
|
+
102,
|
|
2303
|
+
105,
|
|
2304
|
+
103
|
|
2305
|
+
]
|
|
2306
|
+
}
|
|
2307
|
+
]
|
|
2308
|
+
}
|
|
2309
|
+
},
|
|
2310
|
+
{
|
|
2311
|
+
"name": "treasury"
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
"name": "dev_wallet"
|
|
2315
|
+
},
|
|
2316
|
+
{
|
|
2317
|
+
"name": "system_program",
|
|
2318
|
+
"address": "11111111111111111111111111111111"
|
|
2319
|
+
}
|
|
2320
|
+
],
|
|
2321
|
+
"args": []
|
|
2322
|
+
},
|
|
2323
|
+
{
|
|
2324
|
+
"name": "initialize_protocol_treasury",
|
|
2325
|
+
"docs": [
|
|
2326
|
+
"[V11] Initialize the protocol treasury PDA.",
|
|
2327
|
+
"Protocol fees (0.5%) accumulate here with 1500 SOL reserve floor."
|
|
2328
|
+
],
|
|
2329
|
+
"discriminator": [
|
|
2330
|
+
125,
|
|
2331
|
+
148,
|
|
2332
|
+
53,
|
|
2333
|
+
197,
|
|
2334
|
+
136,
|
|
2335
|
+
81,
|
|
2336
|
+
65,
|
|
2337
|
+
58
|
|
2338
|
+
],
|
|
2339
|
+
"accounts": [
|
|
2340
|
+
{
|
|
2341
|
+
"name": "authority",
|
|
2342
|
+
"writable": true,
|
|
2343
|
+
"signer": true,
|
|
2344
|
+
"relations": [
|
|
2345
|
+
"global_config"
|
|
2346
|
+
]
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
"name": "global_config",
|
|
2350
|
+
"pda": {
|
|
2351
|
+
"seeds": [
|
|
2352
|
+
{
|
|
2353
|
+
"kind": "const",
|
|
2354
|
+
"value": [
|
|
2355
|
+
103,
|
|
2356
|
+
108,
|
|
2357
|
+
111,
|
|
2358
|
+
98,
|
|
2359
|
+
97,
|
|
2360
|
+
108,
|
|
2361
|
+
95,
|
|
2362
|
+
99,
|
|
2363
|
+
111,
|
|
2364
|
+
110,
|
|
2365
|
+
102,
|
|
2366
|
+
105,
|
|
2367
|
+
103
|
|
2368
|
+
]
|
|
2369
|
+
}
|
|
2370
|
+
]
|
|
2371
|
+
}
|
|
2372
|
+
},
|
|
2373
|
+
{
|
|
2374
|
+
"name": "protocol_treasury",
|
|
2375
|
+
"writable": true,
|
|
2376
|
+
"pda": {
|
|
2377
|
+
"seeds": [
|
|
2378
|
+
{
|
|
2379
|
+
"kind": "const",
|
|
2380
|
+
"value": [
|
|
2381
|
+
112,
|
|
2382
|
+
114,
|
|
2383
|
+
111,
|
|
2384
|
+
116,
|
|
2385
|
+
111,
|
|
2386
|
+
99,
|
|
2387
|
+
111,
|
|
2388
|
+
108,
|
|
2389
|
+
95,
|
|
2390
|
+
116,
|
|
2391
|
+
114,
|
|
2392
|
+
101,
|
|
2393
|
+
97,
|
|
2394
|
+
115,
|
|
2395
|
+
117,
|
|
2396
|
+
114,
|
|
2397
|
+
121,
|
|
2398
|
+
95,
|
|
2399
|
+
118,
|
|
2400
|
+
49,
|
|
2401
|
+
49
|
|
2402
|
+
]
|
|
2403
|
+
}
|
|
2404
|
+
]
|
|
2405
|
+
}
|
|
2406
|
+
},
|
|
2407
|
+
{
|
|
2408
|
+
"name": "system_program",
|
|
2409
|
+
"address": "11111111111111111111111111111111"
|
|
2410
|
+
}
|
|
2411
|
+
],
|
|
2412
|
+
"args": []
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
"name": "link_wallet",
|
|
2416
|
+
"docs": [
|
|
2417
|
+
"[V14.1] Link a new wallet to a vault. Authority only."
|
|
2418
|
+
],
|
|
2419
|
+
"discriminator": [
|
|
2420
|
+
86,
|
|
2421
|
+
92,
|
|
2422
|
+
31,
|
|
2423
|
+
146,
|
|
2424
|
+
228,
|
|
2425
|
+
51,
|
|
2426
|
+
209,
|
|
2427
|
+
230
|
|
2428
|
+
],
|
|
2429
|
+
"accounts": [
|
|
2430
|
+
{
|
|
2431
|
+
"name": "authority",
|
|
2432
|
+
"writable": true,
|
|
2433
|
+
"signer": true,
|
|
2434
|
+
"relations": [
|
|
2435
|
+
"vault"
|
|
2436
|
+
]
|
|
2437
|
+
},
|
|
2438
|
+
{
|
|
2439
|
+
"name": "vault",
|
|
2440
|
+
"writable": true,
|
|
2441
|
+
"pda": {
|
|
2442
|
+
"seeds": [
|
|
2443
|
+
{
|
|
2444
|
+
"kind": "const",
|
|
2445
|
+
"value": [
|
|
2446
|
+
116,
|
|
2447
|
+
111,
|
|
2448
|
+
114,
|
|
2449
|
+
99,
|
|
2450
|
+
104,
|
|
2451
|
+
95,
|
|
2452
|
+
118,
|
|
2453
|
+
97,
|
|
2454
|
+
117,
|
|
2455
|
+
108,
|
|
2456
|
+
116
|
|
2457
|
+
]
|
|
2458
|
+
},
|
|
2459
|
+
{
|
|
2460
|
+
"kind": "account",
|
|
2461
|
+
"path": "vault.creator",
|
|
2462
|
+
"account": "TorchVault"
|
|
2463
|
+
}
|
|
2464
|
+
]
|
|
2465
|
+
}
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
"name": "wallet_to_link"
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
"name": "wallet_link",
|
|
2472
|
+
"writable": true,
|
|
2473
|
+
"pda": {
|
|
2474
|
+
"seeds": [
|
|
2475
|
+
{
|
|
2476
|
+
"kind": "const",
|
|
2477
|
+
"value": [
|
|
2478
|
+
118,
|
|
2479
|
+
97,
|
|
2480
|
+
117,
|
|
2481
|
+
108,
|
|
2482
|
+
116,
|
|
2483
|
+
95,
|
|
2484
|
+
119,
|
|
2485
|
+
97,
|
|
2486
|
+
108,
|
|
2487
|
+
108,
|
|
2488
|
+
101,
|
|
2489
|
+
116
|
|
2490
|
+
]
|
|
2491
|
+
},
|
|
2492
|
+
{
|
|
2493
|
+
"kind": "account",
|
|
2494
|
+
"path": "wallet_to_link"
|
|
2495
|
+
}
|
|
2496
|
+
]
|
|
2497
|
+
}
|
|
2498
|
+
},
|
|
2499
|
+
{
|
|
2500
|
+
"name": "system_program",
|
|
2501
|
+
"address": "11111111111111111111111111111111"
|
|
2502
|
+
}
|
|
2503
|
+
],
|
|
2504
|
+
"args": []
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
"name": "liquidate",
|
|
2508
|
+
"docs": [
|
|
2509
|
+
"[V2.4] Liquidate an underwater loan position.",
|
|
2510
|
+
"Permissionless - anyone can call when LTV exceeds liquidation threshold."
|
|
2511
|
+
],
|
|
2512
|
+
"discriminator": [
|
|
2513
|
+
223,
|
|
2514
|
+
179,
|
|
2515
|
+
226,
|
|
2516
|
+
125,
|
|
2517
|
+
48,
|
|
2518
|
+
46,
|
|
2519
|
+
39,
|
|
2520
|
+
74
|
|
2521
|
+
],
|
|
2522
|
+
"accounts": [
|
|
2523
|
+
{
|
|
2524
|
+
"name": "liquidator",
|
|
2525
|
+
"docs": [
|
|
2526
|
+
"Liquidator pays SOL to treasury, receives collateral tokens"
|
|
2527
|
+
],
|
|
2528
|
+
"writable": true,
|
|
2529
|
+
"signer": true
|
|
2530
|
+
},
|
|
2531
|
+
{
|
|
2532
|
+
"name": "borrower",
|
|
2533
|
+
"writable": true
|
|
2534
|
+
},
|
|
2535
|
+
{
|
|
2536
|
+
"name": "mint"
|
|
2537
|
+
},
|
|
2538
|
+
{
|
|
2539
|
+
"name": "bonding_curve",
|
|
2540
|
+
"pda": {
|
|
2541
|
+
"seeds": [
|
|
2542
|
+
{
|
|
2543
|
+
"kind": "const",
|
|
2544
|
+
"value": [
|
|
2545
|
+
98,
|
|
2546
|
+
111,
|
|
2547
|
+
110,
|
|
2548
|
+
100,
|
|
2549
|
+
105,
|
|
2550
|
+
110,
|
|
2551
|
+
103,
|
|
2552
|
+
95,
|
|
2553
|
+
99,
|
|
2554
|
+
117,
|
|
2555
|
+
114,
|
|
2556
|
+
118,
|
|
2557
|
+
101
|
|
2558
|
+
]
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
"kind": "account",
|
|
2562
|
+
"path": "mint"
|
|
2563
|
+
}
|
|
2564
|
+
]
|
|
2565
|
+
}
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
"name": "treasury",
|
|
2569
|
+
"writable": true,
|
|
2570
|
+
"pda": {
|
|
2571
|
+
"seeds": [
|
|
2572
|
+
{
|
|
2573
|
+
"kind": "const",
|
|
2574
|
+
"value": [
|
|
2575
|
+
116,
|
|
2576
|
+
114,
|
|
2577
|
+
101,
|
|
2578
|
+
97,
|
|
2579
|
+
115,
|
|
2580
|
+
117,
|
|
2581
|
+
114,
|
|
2582
|
+
121
|
|
2583
|
+
]
|
|
2584
|
+
},
|
|
2585
|
+
{
|
|
2586
|
+
"kind": "account",
|
|
2587
|
+
"path": "mint"
|
|
2588
|
+
}
|
|
2589
|
+
]
|
|
2590
|
+
}
|
|
2591
|
+
},
|
|
2592
|
+
{
|
|
2593
|
+
"name": "collateral_vault",
|
|
2594
|
+
"docs": [
|
|
2595
|
+
"Collateral vault - source of seized collateral"
|
|
2596
|
+
],
|
|
2597
|
+
"writable": true,
|
|
2598
|
+
"pda": {
|
|
2599
|
+
"seeds": [
|
|
2600
|
+
{
|
|
2601
|
+
"kind": "const",
|
|
2602
|
+
"value": [
|
|
2603
|
+
99,
|
|
2604
|
+
111,
|
|
2605
|
+
108,
|
|
2606
|
+
108,
|
|
2607
|
+
97,
|
|
2608
|
+
116,
|
|
2609
|
+
101,
|
|
2610
|
+
114,
|
|
2611
|
+
97,
|
|
2612
|
+
108,
|
|
2613
|
+
95,
|
|
2614
|
+
118,
|
|
2615
|
+
97,
|
|
2616
|
+
117,
|
|
2617
|
+
108,
|
|
2618
|
+
116
|
|
2619
|
+
]
|
|
2620
|
+
},
|
|
2621
|
+
{
|
|
2622
|
+
"kind": "account",
|
|
2623
|
+
"path": "mint"
|
|
2624
|
+
}
|
|
2625
|
+
]
|
|
2626
|
+
}
|
|
2627
|
+
},
|
|
2628
|
+
{
|
|
2629
|
+
"name": "liquidator_token_account",
|
|
2630
|
+
"docs": [
|
|
2631
|
+
"Liquidator's token account (receives seized collateral + bonus)"
|
|
2632
|
+
],
|
|
2633
|
+
"writable": true,
|
|
2634
|
+
"pda": {
|
|
2635
|
+
"seeds": [
|
|
2636
|
+
{
|
|
2637
|
+
"kind": "account",
|
|
2638
|
+
"path": "liquidator"
|
|
2639
|
+
},
|
|
2640
|
+
{
|
|
2641
|
+
"kind": "account",
|
|
2642
|
+
"path": "token_program"
|
|
2643
|
+
},
|
|
2644
|
+
{
|
|
2645
|
+
"kind": "account",
|
|
2646
|
+
"path": "mint"
|
|
2647
|
+
}
|
|
2648
|
+
],
|
|
2649
|
+
"program": {
|
|
2650
|
+
"kind": "const",
|
|
2651
|
+
"value": [
|
|
2652
|
+
140,
|
|
2653
|
+
151,
|
|
2654
|
+
37,
|
|
2655
|
+
143,
|
|
2656
|
+
78,
|
|
2657
|
+
36,
|
|
2658
|
+
137,
|
|
2659
|
+
241,
|
|
2660
|
+
187,
|
|
2661
|
+
61,
|
|
2662
|
+
16,
|
|
2663
|
+
41,
|
|
2664
|
+
20,
|
|
2665
|
+
142,
|
|
2666
|
+
13,
|
|
2667
|
+
131,
|
|
2668
|
+
11,
|
|
2669
|
+
90,
|
|
2670
|
+
19,
|
|
2671
|
+
153,
|
|
2672
|
+
218,
|
|
2673
|
+
255,
|
|
2674
|
+
16,
|
|
2675
|
+
132,
|
|
2676
|
+
4,
|
|
2677
|
+
142,
|
|
2678
|
+
123,
|
|
2679
|
+
216,
|
|
2680
|
+
219,
|
|
2681
|
+
233,
|
|
2682
|
+
248,
|
|
2683
|
+
89
|
|
2684
|
+
]
|
|
2685
|
+
}
|
|
2686
|
+
}
|
|
2687
|
+
},
|
|
2688
|
+
{
|
|
2689
|
+
"name": "loan_position",
|
|
2690
|
+
"docs": [
|
|
2691
|
+
"Loan position being liquidated"
|
|
2692
|
+
],
|
|
2693
|
+
"writable": true,
|
|
2694
|
+
"pda": {
|
|
2695
|
+
"seeds": [
|
|
2696
|
+
{
|
|
2697
|
+
"kind": "const",
|
|
2698
|
+
"value": [
|
|
2699
|
+
108,
|
|
2700
|
+
111,
|
|
2701
|
+
97,
|
|
2702
|
+
110
|
|
2703
|
+
]
|
|
2704
|
+
},
|
|
2705
|
+
{
|
|
2706
|
+
"kind": "account",
|
|
2707
|
+
"path": "mint"
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
"kind": "account",
|
|
2711
|
+
"path": "borrower"
|
|
2712
|
+
}
|
|
2713
|
+
]
|
|
2714
|
+
}
|
|
2715
|
+
},
|
|
2716
|
+
{
|
|
2717
|
+
"name": "pool_state",
|
|
2718
|
+
"docs": [
|
|
2719
|
+
"[V27] Raydium pool state — constrained via PDA derivation"
|
|
2720
|
+
]
|
|
2721
|
+
},
|
|
2722
|
+
{
|
|
2723
|
+
"name": "token_vault_0",
|
|
2724
|
+
"docs": [
|
|
2725
|
+
"[V27] Pool token vault 0 — constrained via PDA derivation"
|
|
2726
|
+
]
|
|
2727
|
+
},
|
|
2728
|
+
{
|
|
2729
|
+
"name": "token_vault_1",
|
|
2730
|
+
"docs": [
|
|
2731
|
+
"[V27] Pool token vault 1 — constrained via PDA derivation"
|
|
2732
|
+
]
|
|
2733
|
+
},
|
|
2734
|
+
{
|
|
2735
|
+
"name": "token_program"
|
|
2736
|
+
},
|
|
2737
|
+
{
|
|
2738
|
+
"name": "associated_token_program",
|
|
2739
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
2740
|
+
},
|
|
2741
|
+
{
|
|
2742
|
+
"name": "system_program",
|
|
2743
|
+
"address": "11111111111111111111111111111111"
|
|
2744
|
+
},
|
|
2745
|
+
{
|
|
2746
|
+
"name": "torch_vault",
|
|
2747
|
+
"docs": [
|
|
2748
|
+
"[V20] Optional: Torch vault — SOL paid from vault, collateral received to vault ATA"
|
|
2749
|
+
],
|
|
2750
|
+
"writable": true,
|
|
2751
|
+
"optional": true
|
|
2752
|
+
},
|
|
2753
|
+
{
|
|
2754
|
+
"name": "vault_wallet_link",
|
|
2755
|
+
"docs": [
|
|
2756
|
+
"[V20] Optional: Proves liquidator is authorized to use the vault"
|
|
2757
|
+
],
|
|
2758
|
+
"optional": true,
|
|
2759
|
+
"pda": {
|
|
2760
|
+
"seeds": [
|
|
2761
|
+
{
|
|
2762
|
+
"kind": "const",
|
|
2763
|
+
"value": [
|
|
2764
|
+
118,
|
|
2765
|
+
97,
|
|
2766
|
+
117,
|
|
2767
|
+
108,
|
|
2768
|
+
116,
|
|
2769
|
+
95,
|
|
2770
|
+
119,
|
|
2771
|
+
97,
|
|
2772
|
+
108,
|
|
2773
|
+
108,
|
|
2774
|
+
101,
|
|
2775
|
+
116
|
|
2776
|
+
]
|
|
2777
|
+
},
|
|
2778
|
+
{
|
|
2779
|
+
"kind": "account",
|
|
2780
|
+
"path": "liquidator"
|
|
2781
|
+
}
|
|
2782
|
+
]
|
|
2783
|
+
}
|
|
2784
|
+
},
|
|
2785
|
+
{
|
|
2786
|
+
"name": "vault_token_account",
|
|
2787
|
+
"docs": [
|
|
2788
|
+
"[V20] Optional: Vault's token ATA — receives seized collateral + bonus"
|
|
2789
|
+
],
|
|
2790
|
+
"writable": true,
|
|
2791
|
+
"optional": true,
|
|
2792
|
+
"pda": {
|
|
2793
|
+
"seeds": [
|
|
2794
|
+
{
|
|
2795
|
+
"kind": "account",
|
|
2796
|
+
"path": "torch_vault"
|
|
2797
|
+
},
|
|
2798
|
+
{
|
|
2799
|
+
"kind": "account",
|
|
2800
|
+
"path": "token_program"
|
|
2801
|
+
},
|
|
2802
|
+
{
|
|
2803
|
+
"kind": "account",
|
|
2804
|
+
"path": "mint"
|
|
2805
|
+
}
|
|
2806
|
+
],
|
|
2807
|
+
"program": {
|
|
2808
|
+
"kind": "const",
|
|
2809
|
+
"value": [
|
|
2810
|
+
140,
|
|
2811
|
+
151,
|
|
2812
|
+
37,
|
|
2813
|
+
143,
|
|
2814
|
+
78,
|
|
2815
|
+
36,
|
|
2816
|
+
137,
|
|
2817
|
+
241,
|
|
2818
|
+
187,
|
|
2819
|
+
61,
|
|
2820
|
+
16,
|
|
2821
|
+
41,
|
|
2822
|
+
20,
|
|
2823
|
+
142,
|
|
2824
|
+
13,
|
|
2825
|
+
131,
|
|
2826
|
+
11,
|
|
2827
|
+
90,
|
|
2828
|
+
19,
|
|
2829
|
+
153,
|
|
2830
|
+
218,
|
|
2831
|
+
255,
|
|
2832
|
+
16,
|
|
2833
|
+
132,
|
|
2834
|
+
4,
|
|
2835
|
+
142,
|
|
2836
|
+
123,
|
|
2837
|
+
216,
|
|
2838
|
+
219,
|
|
2839
|
+
233,
|
|
2840
|
+
248,
|
|
2841
|
+
89
|
|
2842
|
+
]
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
}
|
|
2846
|
+
],
|
|
2847
|
+
"args": []
|
|
2848
|
+
},
|
|
2849
|
+
{
|
|
2850
|
+
"name": "liquidate_short",
|
|
2851
|
+
"docs": [
|
|
2852
|
+
"[V5] Liquidate an underwater short position. Permissionless.",
|
|
2853
|
+
"When token price rises and LTV exceeds 65%, anyone can call this."
|
|
2854
|
+
],
|
|
2855
|
+
"discriminator": [
|
|
2856
|
+
197,
|
|
2857
|
+
62,
|
|
2858
|
+
252,
|
|
2859
|
+
198,
|
|
2860
|
+
25,
|
|
2861
|
+
93,
|
|
2862
|
+
177,
|
|
2863
|
+
131
|
|
2864
|
+
],
|
|
2865
|
+
"accounts": [
|
|
2866
|
+
{
|
|
2867
|
+
"name": "liquidator",
|
|
2868
|
+
"writable": true,
|
|
2869
|
+
"signer": true
|
|
2870
|
+
},
|
|
2871
|
+
{
|
|
2872
|
+
"name": "borrower",
|
|
2873
|
+
"writable": true
|
|
2874
|
+
},
|
|
2875
|
+
{
|
|
2876
|
+
"name": "mint"
|
|
2877
|
+
},
|
|
2878
|
+
{
|
|
2879
|
+
"name": "bonding_curve",
|
|
2880
|
+
"pda": {
|
|
2881
|
+
"seeds": [
|
|
2882
|
+
{
|
|
2883
|
+
"kind": "const",
|
|
2884
|
+
"value": [
|
|
2885
|
+
98,
|
|
2886
|
+
111,
|
|
2887
|
+
110,
|
|
2888
|
+
100,
|
|
2889
|
+
105,
|
|
2890
|
+
110,
|
|
2891
|
+
103,
|
|
2892
|
+
95,
|
|
2893
|
+
99,
|
|
2894
|
+
117,
|
|
2895
|
+
114,
|
|
2896
|
+
118,
|
|
2897
|
+
101
|
|
2898
|
+
]
|
|
2899
|
+
},
|
|
2900
|
+
{
|
|
2901
|
+
"kind": "account",
|
|
2902
|
+
"path": "mint"
|
|
2903
|
+
}
|
|
2904
|
+
]
|
|
2905
|
+
}
|
|
2906
|
+
},
|
|
2907
|
+
{
|
|
2908
|
+
"name": "treasury",
|
|
2909
|
+
"writable": true,
|
|
2910
|
+
"pda": {
|
|
2911
|
+
"seeds": [
|
|
2912
|
+
{
|
|
2913
|
+
"kind": "const",
|
|
2914
|
+
"value": [
|
|
2915
|
+
116,
|
|
2916
|
+
114,
|
|
2917
|
+
101,
|
|
2918
|
+
97,
|
|
2919
|
+
115,
|
|
2920
|
+
117,
|
|
2921
|
+
114,
|
|
2922
|
+
121
|
|
2923
|
+
]
|
|
2924
|
+
},
|
|
2925
|
+
{
|
|
2926
|
+
"kind": "account",
|
|
2927
|
+
"path": "mint"
|
|
2928
|
+
}
|
|
2929
|
+
]
|
|
2930
|
+
}
|
|
2931
|
+
},
|
|
2932
|
+
{
|
|
2933
|
+
"name": "treasury_lock",
|
|
2934
|
+
"docs": [
|
|
2935
|
+
"Treasury lock PDA (owns the locked token ATA)"
|
|
2936
|
+
],
|
|
2937
|
+
"pda": {
|
|
2938
|
+
"seeds": [
|
|
2939
|
+
{
|
|
2940
|
+
"kind": "const",
|
|
2941
|
+
"value": [
|
|
2942
|
+
116,
|
|
2943
|
+
114,
|
|
2944
|
+
101,
|
|
2945
|
+
97,
|
|
2946
|
+
115,
|
|
2947
|
+
117,
|
|
2948
|
+
114,
|
|
2949
|
+
121,
|
|
2950
|
+
95,
|
|
2951
|
+
108,
|
|
2952
|
+
111,
|
|
2953
|
+
99,
|
|
2954
|
+
107
|
|
2955
|
+
]
|
|
2956
|
+
},
|
|
2957
|
+
{
|
|
2958
|
+
"kind": "account",
|
|
2959
|
+
"path": "mint"
|
|
2960
|
+
}
|
|
2961
|
+
]
|
|
2962
|
+
}
|
|
2963
|
+
},
|
|
2964
|
+
{
|
|
2965
|
+
"name": "treasury_lock_token_account",
|
|
2966
|
+
"docs": [
|
|
2967
|
+
"Treasury lock's token account (receives liquidator's tokens to cover debt)"
|
|
2968
|
+
],
|
|
2969
|
+
"writable": true,
|
|
2970
|
+
"pda": {
|
|
2971
|
+
"seeds": [
|
|
2972
|
+
{
|
|
2973
|
+
"kind": "account",
|
|
2974
|
+
"path": "treasury_lock"
|
|
2975
|
+
},
|
|
2976
|
+
{
|
|
2977
|
+
"kind": "account",
|
|
2978
|
+
"path": "token_program"
|
|
2979
|
+
},
|
|
2980
|
+
{
|
|
2981
|
+
"kind": "account",
|
|
2982
|
+
"path": "mint"
|
|
2983
|
+
}
|
|
2984
|
+
],
|
|
2985
|
+
"program": {
|
|
2986
|
+
"kind": "const",
|
|
2987
|
+
"value": [
|
|
2988
|
+
140,
|
|
2989
|
+
151,
|
|
2990
|
+
37,
|
|
2991
|
+
143,
|
|
2992
|
+
78,
|
|
2993
|
+
36,
|
|
2994
|
+
137,
|
|
2995
|
+
241,
|
|
2996
|
+
187,
|
|
2997
|
+
61,
|
|
2998
|
+
16,
|
|
2999
|
+
41,
|
|
3000
|
+
20,
|
|
3001
|
+
142,
|
|
3002
|
+
13,
|
|
3003
|
+
131,
|
|
3004
|
+
11,
|
|
3005
|
+
90,
|
|
3006
|
+
19,
|
|
3007
|
+
153,
|
|
3008
|
+
218,
|
|
3009
|
+
255,
|
|
3010
|
+
16,
|
|
3011
|
+
132,
|
|
3012
|
+
4,
|
|
3013
|
+
142,
|
|
3014
|
+
123,
|
|
3015
|
+
216,
|
|
3016
|
+
219,
|
|
3017
|
+
233,
|
|
3018
|
+
248,
|
|
3019
|
+
89
|
|
3020
|
+
]
|
|
3021
|
+
}
|
|
3022
|
+
}
|
|
3023
|
+
},
|
|
3024
|
+
{
|
|
3025
|
+
"name": "short_config",
|
|
3026
|
+
"writable": true,
|
|
3027
|
+
"pda": {
|
|
3028
|
+
"seeds": [
|
|
3029
|
+
{
|
|
3030
|
+
"kind": "const",
|
|
3031
|
+
"value": [
|
|
3032
|
+
115,
|
|
3033
|
+
104,
|
|
3034
|
+
111,
|
|
3035
|
+
114,
|
|
3036
|
+
116,
|
|
3037
|
+
95,
|
|
3038
|
+
99,
|
|
3039
|
+
111,
|
|
3040
|
+
110,
|
|
3041
|
+
102,
|
|
3042
|
+
105,
|
|
3043
|
+
103
|
|
3044
|
+
]
|
|
3045
|
+
},
|
|
3046
|
+
{
|
|
3047
|
+
"kind": "account",
|
|
3048
|
+
"path": "mint"
|
|
3049
|
+
}
|
|
3050
|
+
]
|
|
3051
|
+
}
|
|
3052
|
+
},
|
|
3053
|
+
{
|
|
3054
|
+
"name": "short_position",
|
|
3055
|
+
"writable": true,
|
|
3056
|
+
"pda": {
|
|
3057
|
+
"seeds": [
|
|
3058
|
+
{
|
|
3059
|
+
"kind": "const",
|
|
3060
|
+
"value": [
|
|
3061
|
+
115,
|
|
3062
|
+
104,
|
|
3063
|
+
111,
|
|
3064
|
+
114,
|
|
3065
|
+
116
|
|
3066
|
+
]
|
|
3067
|
+
},
|
|
3068
|
+
{
|
|
3069
|
+
"kind": "account",
|
|
3070
|
+
"path": "mint"
|
|
3071
|
+
},
|
|
3072
|
+
{
|
|
3073
|
+
"kind": "account",
|
|
3074
|
+
"path": "borrower"
|
|
3075
|
+
}
|
|
3076
|
+
]
|
|
3077
|
+
}
|
|
3078
|
+
},
|
|
3079
|
+
{
|
|
3080
|
+
"name": "liquidator_token_account",
|
|
3081
|
+
"docs": [
|
|
3082
|
+
"Liquidator's token account (source of tokens to cover debt)"
|
|
3083
|
+
],
|
|
3084
|
+
"writable": true,
|
|
3085
|
+
"pda": {
|
|
3086
|
+
"seeds": [
|
|
3087
|
+
{
|
|
3088
|
+
"kind": "account",
|
|
3089
|
+
"path": "liquidator"
|
|
3090
|
+
},
|
|
3091
|
+
{
|
|
3092
|
+
"kind": "account",
|
|
3093
|
+
"path": "token_program"
|
|
3094
|
+
},
|
|
3095
|
+
{
|
|
3096
|
+
"kind": "account",
|
|
3097
|
+
"path": "mint"
|
|
3098
|
+
}
|
|
3099
|
+
],
|
|
3100
|
+
"program": {
|
|
3101
|
+
"kind": "const",
|
|
3102
|
+
"value": [
|
|
3103
|
+
140,
|
|
3104
|
+
151,
|
|
3105
|
+
37,
|
|
3106
|
+
143,
|
|
3107
|
+
78,
|
|
3108
|
+
36,
|
|
3109
|
+
137,
|
|
3110
|
+
241,
|
|
3111
|
+
187,
|
|
3112
|
+
61,
|
|
3113
|
+
16,
|
|
3114
|
+
41,
|
|
3115
|
+
20,
|
|
3116
|
+
142,
|
|
3117
|
+
13,
|
|
3118
|
+
131,
|
|
3119
|
+
11,
|
|
3120
|
+
90,
|
|
3121
|
+
19,
|
|
3122
|
+
153,
|
|
3123
|
+
218,
|
|
3124
|
+
255,
|
|
3125
|
+
16,
|
|
3126
|
+
132,
|
|
3127
|
+
4,
|
|
3128
|
+
142,
|
|
3129
|
+
123,
|
|
3130
|
+
216,
|
|
3131
|
+
219,
|
|
3132
|
+
233,
|
|
3133
|
+
248,
|
|
3134
|
+
89
|
|
3135
|
+
]
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
},
|
|
3139
|
+
{
|
|
3140
|
+
"name": "pool_state"
|
|
3141
|
+
},
|
|
3142
|
+
{
|
|
3143
|
+
"name": "token_vault_0"
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
"name": "token_vault_1"
|
|
3147
|
+
},
|
|
3148
|
+
{
|
|
3149
|
+
"name": "torch_vault",
|
|
3150
|
+
"writable": true,
|
|
3151
|
+
"optional": true
|
|
3152
|
+
},
|
|
3153
|
+
{
|
|
3154
|
+
"name": "vault_wallet_link",
|
|
3155
|
+
"optional": true
|
|
3156
|
+
},
|
|
3157
|
+
{
|
|
3158
|
+
"name": "vault_token_account",
|
|
3159
|
+
"writable": true,
|
|
3160
|
+
"optional": true
|
|
3161
|
+
},
|
|
3162
|
+
{
|
|
3163
|
+
"name": "token_program"
|
|
3164
|
+
},
|
|
3165
|
+
{
|
|
3166
|
+
"name": "system_program",
|
|
3167
|
+
"address": "11111111111111111111111111111111"
|
|
3168
|
+
}
|
|
3169
|
+
],
|
|
3170
|
+
"args": []
|
|
3171
|
+
},
|
|
3172
|
+
{
|
|
3173
|
+
"name": "migrate_to_dex",
|
|
3174
|
+
"docs": [
|
|
3175
|
+
"[V26] Migrate bonded token to Raydium CPMM DEX.",
|
|
3176
|
+
"Permissionless — anyone can call once bonding completes.",
|
|
3177
|
+
"bc_wsol must be pre-funded via fund_migration_wsol.",
|
|
3178
|
+
"Creates a Raydium pool with locked liquidity (LP tokens burned)."
|
|
3179
|
+
],
|
|
3180
|
+
"discriminator": [
|
|
3181
|
+
246,
|
|
3182
|
+
150,
|
|
3183
|
+
122,
|
|
3184
|
+
141,
|
|
3185
|
+
49,
|
|
3186
|
+
26,
|
|
3187
|
+
211,
|
|
3188
|
+
26
|
|
3189
|
+
],
|
|
3190
|
+
"accounts": [
|
|
3191
|
+
{
|
|
3192
|
+
"name": "payer",
|
|
3193
|
+
"docs": [
|
|
3194
|
+
"Anyone can trigger migration (pays rent for new accounts)"
|
|
3195
|
+
],
|
|
3196
|
+
"writable": true,
|
|
3197
|
+
"signer": true
|
|
3198
|
+
},
|
|
3199
|
+
{
|
|
3200
|
+
"name": "global_config",
|
|
3201
|
+
"docs": [
|
|
3202
|
+
"Global config for protocol settings"
|
|
3203
|
+
],
|
|
3204
|
+
"pda": {
|
|
3205
|
+
"seeds": [
|
|
3206
|
+
{
|
|
3207
|
+
"kind": "const",
|
|
3208
|
+
"value": [
|
|
3209
|
+
103,
|
|
3210
|
+
108,
|
|
3211
|
+
111,
|
|
3212
|
+
98,
|
|
3213
|
+
97,
|
|
3214
|
+
108,
|
|
3215
|
+
95,
|
|
3216
|
+
99,
|
|
3217
|
+
111,
|
|
3218
|
+
110,
|
|
3219
|
+
102,
|
|
3220
|
+
105,
|
|
3221
|
+
103
|
|
3222
|
+
]
|
|
3223
|
+
}
|
|
3224
|
+
]
|
|
3225
|
+
}
|
|
3226
|
+
},
|
|
3227
|
+
{
|
|
3228
|
+
"name": "mint",
|
|
3229
|
+
"docs": [
|
|
3230
|
+
"Token mint being migrated"
|
|
3231
|
+
],
|
|
3232
|
+
"writable": true
|
|
3233
|
+
},
|
|
3234
|
+
{
|
|
3235
|
+
"name": "bonding_curve",
|
|
3236
|
+
"docs": [
|
|
3237
|
+
"Bonding curve being migrated"
|
|
3238
|
+
],
|
|
3239
|
+
"writable": true,
|
|
3240
|
+
"pda": {
|
|
3241
|
+
"seeds": [
|
|
3242
|
+
{
|
|
3243
|
+
"kind": "const",
|
|
3244
|
+
"value": [
|
|
3245
|
+
98,
|
|
3246
|
+
111,
|
|
3247
|
+
110,
|
|
3248
|
+
100,
|
|
3249
|
+
105,
|
|
3250
|
+
110,
|
|
3251
|
+
103,
|
|
3252
|
+
95,
|
|
3253
|
+
99,
|
|
3254
|
+
117,
|
|
3255
|
+
114,
|
|
3256
|
+
118,
|
|
3257
|
+
101
|
|
3258
|
+
]
|
|
3259
|
+
},
|
|
3260
|
+
{
|
|
3261
|
+
"kind": "account",
|
|
3262
|
+
"path": "mint"
|
|
3263
|
+
}
|
|
3264
|
+
]
|
|
3265
|
+
}
|
|
3266
|
+
},
|
|
3267
|
+
{
|
|
3268
|
+
"name": "treasury",
|
|
3269
|
+
"docs": [
|
|
3270
|
+
"Token treasury (reimburses payer for Raydium migration costs)"
|
|
3271
|
+
],
|
|
3272
|
+
"writable": true,
|
|
3273
|
+
"pda": {
|
|
3274
|
+
"seeds": [
|
|
3275
|
+
{
|
|
3276
|
+
"kind": "const",
|
|
3277
|
+
"value": [
|
|
3278
|
+
116,
|
|
3279
|
+
114,
|
|
3280
|
+
101,
|
|
3281
|
+
97,
|
|
3282
|
+
115,
|
|
3283
|
+
117,
|
|
3284
|
+
114,
|
|
3285
|
+
121
|
|
3286
|
+
]
|
|
3287
|
+
},
|
|
3288
|
+
{
|
|
3289
|
+
"kind": "account",
|
|
3290
|
+
"path": "mint"
|
|
3291
|
+
}
|
|
3292
|
+
]
|
|
3293
|
+
}
|
|
3294
|
+
},
|
|
3295
|
+
{
|
|
3296
|
+
"name": "token_vault",
|
|
3297
|
+
"docs": [
|
|
3298
|
+
"Bonding curve token vault (source of tokens for LP)"
|
|
3299
|
+
],
|
|
3300
|
+
"writable": true,
|
|
3301
|
+
"pda": {
|
|
3302
|
+
"seeds": [
|
|
3303
|
+
{
|
|
3304
|
+
"kind": "account",
|
|
3305
|
+
"path": "bonding_curve"
|
|
3306
|
+
},
|
|
3307
|
+
{
|
|
3308
|
+
"kind": "account",
|
|
3309
|
+
"path": "token_2022_program"
|
|
3310
|
+
},
|
|
3311
|
+
{
|
|
3312
|
+
"kind": "account",
|
|
3313
|
+
"path": "mint"
|
|
3314
|
+
}
|
|
3315
|
+
],
|
|
3316
|
+
"program": {
|
|
3317
|
+
"kind": "const",
|
|
3318
|
+
"value": [
|
|
3319
|
+
140,
|
|
3320
|
+
151,
|
|
3321
|
+
37,
|
|
3322
|
+
143,
|
|
3323
|
+
78,
|
|
3324
|
+
36,
|
|
3325
|
+
137,
|
|
3326
|
+
241,
|
|
3327
|
+
187,
|
|
3328
|
+
61,
|
|
3329
|
+
16,
|
|
3330
|
+
41,
|
|
3331
|
+
20,
|
|
3332
|
+
142,
|
|
3333
|
+
13,
|
|
3334
|
+
131,
|
|
3335
|
+
11,
|
|
3336
|
+
90,
|
|
3337
|
+
19,
|
|
3338
|
+
153,
|
|
3339
|
+
218,
|
|
3340
|
+
255,
|
|
3341
|
+
16,
|
|
3342
|
+
132,
|
|
3343
|
+
4,
|
|
3344
|
+
142,
|
|
3345
|
+
123,
|
|
3346
|
+
216,
|
|
3347
|
+
219,
|
|
3348
|
+
233,
|
|
3349
|
+
248,
|
|
3350
|
+
89
|
|
3351
|
+
]
|
|
3352
|
+
}
|
|
3353
|
+
}
|
|
3354
|
+
},
|
|
3355
|
+
{
|
|
3356
|
+
"name": "treasury_token_account",
|
|
3357
|
+
"docs": [
|
|
3358
|
+
"[V13] Treasury's token account - holds vote vault tokens to be returned or burned"
|
|
3359
|
+
],
|
|
3360
|
+
"writable": true,
|
|
3361
|
+
"pda": {
|
|
3362
|
+
"seeds": [
|
|
3363
|
+
{
|
|
3364
|
+
"kind": "account",
|
|
3365
|
+
"path": "treasury"
|
|
3366
|
+
},
|
|
3367
|
+
{
|
|
3368
|
+
"kind": "account",
|
|
3369
|
+
"path": "token_2022_program"
|
|
3370
|
+
},
|
|
3371
|
+
{
|
|
3372
|
+
"kind": "account",
|
|
3373
|
+
"path": "mint"
|
|
3374
|
+
}
|
|
3375
|
+
],
|
|
3376
|
+
"program": {
|
|
3377
|
+
"kind": "const",
|
|
3378
|
+
"value": [
|
|
3379
|
+
140,
|
|
3380
|
+
151,
|
|
3381
|
+
37,
|
|
3382
|
+
143,
|
|
3383
|
+
78,
|
|
3384
|
+
36,
|
|
3385
|
+
137,
|
|
3386
|
+
241,
|
|
3387
|
+
187,
|
|
3388
|
+
61,
|
|
3389
|
+
16,
|
|
3390
|
+
41,
|
|
3391
|
+
20,
|
|
3392
|
+
142,
|
|
3393
|
+
13,
|
|
3394
|
+
131,
|
|
3395
|
+
11,
|
|
3396
|
+
90,
|
|
3397
|
+
19,
|
|
3398
|
+
153,
|
|
3399
|
+
218,
|
|
3400
|
+
255,
|
|
3401
|
+
16,
|
|
3402
|
+
132,
|
|
3403
|
+
4,
|
|
3404
|
+
142,
|
|
3405
|
+
123,
|
|
3406
|
+
216,
|
|
3407
|
+
219,
|
|
3408
|
+
233,
|
|
3409
|
+
248,
|
|
3410
|
+
89
|
|
3411
|
+
]
|
|
3412
|
+
}
|
|
3413
|
+
}
|
|
3414
|
+
},
|
|
3415
|
+
{
|
|
3416
|
+
"name": "treasury_lock_token_account",
|
|
3417
|
+
"docs": [
|
|
3418
|
+
"[V31] Treasury lock's token account — receives vote-return tokens."
|
|
3419
|
+
],
|
|
3420
|
+
"writable": true
|
|
3421
|
+
},
|
|
3422
|
+
{
|
|
3423
|
+
"name": "treasury_lock",
|
|
3424
|
+
"docs": [
|
|
3425
|
+
"[V31] Treasury lock PDA — authority over locked tokens"
|
|
3426
|
+
],
|
|
3427
|
+
"pda": {
|
|
3428
|
+
"seeds": [
|
|
3429
|
+
{
|
|
3430
|
+
"kind": "const",
|
|
3431
|
+
"value": [
|
|
3432
|
+
116,
|
|
3433
|
+
114,
|
|
3434
|
+
101,
|
|
3435
|
+
97,
|
|
3436
|
+
115,
|
|
3437
|
+
117,
|
|
3438
|
+
114,
|
|
3439
|
+
121,
|
|
3440
|
+
95,
|
|
3441
|
+
108,
|
|
3442
|
+
111,
|
|
3443
|
+
99,
|
|
3444
|
+
107
|
|
3445
|
+
]
|
|
3446
|
+
},
|
|
3447
|
+
{
|
|
3448
|
+
"kind": "account",
|
|
3449
|
+
"path": "mint"
|
|
3450
|
+
}
|
|
3451
|
+
]
|
|
3452
|
+
}
|
|
3453
|
+
},
|
|
3454
|
+
{
|
|
3455
|
+
"name": "bc_wsol",
|
|
3456
|
+
"docs": [
|
|
3457
|
+
"[V26] Bonding curve's WSOL ATA — pre-funded by fund_migration_wsol.",
|
|
3458
|
+
"Closed to payer_wsol at start of migration (CPI, no direct lamport manipulation)."
|
|
3459
|
+
],
|
|
3460
|
+
"writable": true
|
|
3461
|
+
},
|
|
3462
|
+
{
|
|
3463
|
+
"name": "payer_wsol",
|
|
3464
|
+
"docs": [
|
|
3465
|
+
"Payer's WSOL account — receives SOL from bc_wsol close, used by Raydium."
|
|
3466
|
+
],
|
|
3467
|
+
"writable": true
|
|
3468
|
+
},
|
|
3469
|
+
{
|
|
3470
|
+
"name": "payer_token",
|
|
3471
|
+
"docs": [
|
|
3472
|
+
"Payer's token account (receives tokens from bonding curve)"
|
|
3473
|
+
],
|
|
3474
|
+
"writable": true
|
|
3475
|
+
},
|
|
3476
|
+
{
|
|
3477
|
+
"name": "raydium_program",
|
|
3478
|
+
"address": "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"
|
|
3479
|
+
},
|
|
3480
|
+
{
|
|
3481
|
+
"name": "amm_config",
|
|
3482
|
+
"docs": [
|
|
3483
|
+
"Raydium AMM config — constrained to prevent pool creation with wrong fee tier"
|
|
3484
|
+
],
|
|
3485
|
+
"address": "D4FPEruKEHrG5TenZ2mpDGEfu1iUvTiqBxvpU8HLBvC2"
|
|
3486
|
+
},
|
|
3487
|
+
{
|
|
3488
|
+
"name": "raydium_authority",
|
|
3489
|
+
"docs": [
|
|
3490
|
+
"Raydium authority PDA"
|
|
3491
|
+
]
|
|
3492
|
+
},
|
|
3493
|
+
{
|
|
3494
|
+
"name": "pool_state",
|
|
3495
|
+
"docs": [
|
|
3496
|
+
"Raydium pool state PDA (created by Raydium via init)"
|
|
3497
|
+
],
|
|
3498
|
+
"writable": true
|
|
3499
|
+
},
|
|
3500
|
+
{
|
|
3501
|
+
"name": "wsol_mint",
|
|
3502
|
+
"docs": [
|
|
3503
|
+
"WSOL mint"
|
|
3504
|
+
],
|
|
3505
|
+
"address": "So11111111111111111111111111111111111111112"
|
|
3506
|
+
},
|
|
3507
|
+
{
|
|
3508
|
+
"name": "token_0_vault",
|
|
3509
|
+
"docs": [
|
|
3510
|
+
"Pool token 0 vault (WSOL or token depending on ordering)"
|
|
3511
|
+
],
|
|
3512
|
+
"writable": true
|
|
3513
|
+
},
|
|
3514
|
+
{
|
|
3515
|
+
"name": "token_1_vault",
|
|
3516
|
+
"docs": [
|
|
3517
|
+
"Pool token 1 vault"
|
|
3518
|
+
],
|
|
3519
|
+
"writable": true
|
|
3520
|
+
},
|
|
3521
|
+
{
|
|
3522
|
+
"name": "lp_mint",
|
|
3523
|
+
"docs": [
|
|
3524
|
+
"LP token mint PDA (created by Raydium via init)"
|
|
3525
|
+
],
|
|
3526
|
+
"writable": true
|
|
3527
|
+
},
|
|
3528
|
+
{
|
|
3529
|
+
"name": "payer_lp_token",
|
|
3530
|
+
"docs": [
|
|
3531
|
+
"Payer's LP token account (receives LP tokens, then burned)"
|
|
3532
|
+
],
|
|
3533
|
+
"writable": true
|
|
3534
|
+
},
|
|
3535
|
+
{
|
|
3536
|
+
"name": "observation_state",
|
|
3537
|
+
"docs": [
|
|
3538
|
+
"Raydium observation state PDA (created by Raydium via init)"
|
|
3539
|
+
],
|
|
3540
|
+
"writable": true
|
|
3541
|
+
},
|
|
3542
|
+
{
|
|
3543
|
+
"name": "create_pool_fee",
|
|
3544
|
+
"docs": [
|
|
3545
|
+
"Raydium fee receiver (pool creation fee)"
|
|
3546
|
+
],
|
|
3547
|
+
"writable": true
|
|
3548
|
+
},
|
|
3549
|
+
{
|
|
3550
|
+
"name": "token_program"
|
|
3551
|
+
},
|
|
3552
|
+
{
|
|
3553
|
+
"name": "token_2022_program"
|
|
3554
|
+
},
|
|
3555
|
+
{
|
|
3556
|
+
"name": "associated_token_program"
|
|
3557
|
+
},
|
|
3558
|
+
{
|
|
3559
|
+
"name": "system_program",
|
|
3560
|
+
"address": "11111111111111111111111111111111"
|
|
3561
|
+
},
|
|
3562
|
+
{
|
|
3563
|
+
"name": "rent",
|
|
3564
|
+
"address": "SysvarRent111111111111111111111111111111111"
|
|
3565
|
+
}
|
|
3566
|
+
],
|
|
3567
|
+
"args": []
|
|
3568
|
+
},
|
|
3569
|
+
{
|
|
3570
|
+
"name": "open_short",
|
|
3571
|
+
"docs": [
|
|
3572
|
+
"[V5] Open or add to a short position.",
|
|
3573
|
+
"Post SOL collateral, borrow tokens from treasury."
|
|
3574
|
+
],
|
|
3575
|
+
"discriminator": [
|
|
3576
|
+
66,
|
|
3577
|
+
191,
|
|
3578
|
+
209,
|
|
3579
|
+
162,
|
|
3580
|
+
3,
|
|
3581
|
+
36,
|
|
3582
|
+
159,
|
|
3583
|
+
99
|
|
3584
|
+
],
|
|
3585
|
+
"accounts": [
|
|
3586
|
+
{
|
|
3587
|
+
"name": "shorter",
|
|
3588
|
+
"writable": true,
|
|
3589
|
+
"signer": true
|
|
3590
|
+
},
|
|
3591
|
+
{
|
|
3592
|
+
"name": "mint"
|
|
3593
|
+
},
|
|
3594
|
+
{
|
|
3595
|
+
"name": "bonding_curve",
|
|
3596
|
+
"pda": {
|
|
3597
|
+
"seeds": [
|
|
3598
|
+
{
|
|
3599
|
+
"kind": "const",
|
|
3600
|
+
"value": [
|
|
3601
|
+
98,
|
|
3602
|
+
111,
|
|
3603
|
+
110,
|
|
3604
|
+
100,
|
|
3605
|
+
105,
|
|
3606
|
+
110,
|
|
3607
|
+
103,
|
|
3608
|
+
95,
|
|
3609
|
+
99,
|
|
3610
|
+
117,
|
|
3611
|
+
114,
|
|
3612
|
+
118,
|
|
3613
|
+
101
|
|
2164
3614
|
]
|
|
2165
3615
|
},
|
|
2166
3616
|
{
|
|
@@ -2171,174 +3621,73 @@
|
|
|
2171
3621
|
}
|
|
2172
3622
|
},
|
|
2173
3623
|
{
|
|
2174
|
-
"name": "
|
|
2175
|
-
"docs": [
|
|
2176
|
-
"Liquidator's token account (receives seized collateral + bonus)"
|
|
2177
|
-
],
|
|
2178
|
-
"writable": true,
|
|
2179
|
-
"pda": {
|
|
2180
|
-
"seeds": [
|
|
2181
|
-
{
|
|
2182
|
-
"kind": "account",
|
|
2183
|
-
"path": "liquidator"
|
|
2184
|
-
},
|
|
2185
|
-
{
|
|
2186
|
-
"kind": "account",
|
|
2187
|
-
"path": "token_program"
|
|
2188
|
-
},
|
|
2189
|
-
{
|
|
2190
|
-
"kind": "account",
|
|
2191
|
-
"path": "mint"
|
|
2192
|
-
}
|
|
2193
|
-
],
|
|
2194
|
-
"program": {
|
|
2195
|
-
"kind": "const",
|
|
2196
|
-
"value": [
|
|
2197
|
-
140,
|
|
2198
|
-
151,
|
|
2199
|
-
37,
|
|
2200
|
-
143,
|
|
2201
|
-
78,
|
|
2202
|
-
36,
|
|
2203
|
-
137,
|
|
2204
|
-
241,
|
|
2205
|
-
187,
|
|
2206
|
-
61,
|
|
2207
|
-
16,
|
|
2208
|
-
41,
|
|
2209
|
-
20,
|
|
2210
|
-
142,
|
|
2211
|
-
13,
|
|
2212
|
-
131,
|
|
2213
|
-
11,
|
|
2214
|
-
90,
|
|
2215
|
-
19,
|
|
2216
|
-
153,
|
|
2217
|
-
218,
|
|
2218
|
-
255,
|
|
2219
|
-
16,
|
|
2220
|
-
132,
|
|
2221
|
-
4,
|
|
2222
|
-
142,
|
|
2223
|
-
123,
|
|
2224
|
-
216,
|
|
2225
|
-
219,
|
|
2226
|
-
233,
|
|
2227
|
-
248,
|
|
2228
|
-
89
|
|
2229
|
-
]
|
|
2230
|
-
}
|
|
2231
|
-
}
|
|
2232
|
-
},
|
|
2233
|
-
{
|
|
2234
|
-
"name": "loan_position",
|
|
2235
|
-
"docs": [
|
|
2236
|
-
"Loan position being liquidated"
|
|
2237
|
-
],
|
|
3624
|
+
"name": "treasury",
|
|
2238
3625
|
"writable": true,
|
|
2239
3626
|
"pda": {
|
|
2240
3627
|
"seeds": [
|
|
2241
3628
|
{
|
|
2242
3629
|
"kind": "const",
|
|
2243
3630
|
"value": [
|
|
2244
|
-
|
|
2245
|
-
|
|
3631
|
+
116,
|
|
3632
|
+
114,
|
|
3633
|
+
101,
|
|
2246
3634
|
97,
|
|
2247
|
-
|
|
3635
|
+
115,
|
|
3636
|
+
117,
|
|
3637
|
+
114,
|
|
3638
|
+
121
|
|
2248
3639
|
]
|
|
2249
3640
|
},
|
|
2250
3641
|
{
|
|
2251
3642
|
"kind": "account",
|
|
2252
3643
|
"path": "mint"
|
|
2253
|
-
},
|
|
2254
|
-
{
|
|
2255
|
-
"kind": "account",
|
|
2256
|
-
"path": "borrower"
|
|
2257
3644
|
}
|
|
2258
3645
|
]
|
|
2259
3646
|
}
|
|
2260
3647
|
},
|
|
2261
3648
|
{
|
|
2262
|
-
"name": "
|
|
2263
|
-
"docs": [
|
|
2264
|
-
"[V27] Raydium pool state — constrained via PDA derivation"
|
|
2265
|
-
]
|
|
2266
|
-
},
|
|
2267
|
-
{
|
|
2268
|
-
"name": "token_vault_0",
|
|
2269
|
-
"docs": [
|
|
2270
|
-
"[V27] Pool token vault 0 — constrained via PDA derivation"
|
|
2271
|
-
]
|
|
2272
|
-
},
|
|
2273
|
-
{
|
|
2274
|
-
"name": "token_vault_1",
|
|
2275
|
-
"docs": [
|
|
2276
|
-
"[V27] Pool token vault 1 — constrained via PDA derivation"
|
|
2277
|
-
]
|
|
2278
|
-
},
|
|
2279
|
-
{
|
|
2280
|
-
"name": "token_program"
|
|
2281
|
-
},
|
|
2282
|
-
{
|
|
2283
|
-
"name": "associated_token_program",
|
|
2284
|
-
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
2285
|
-
},
|
|
2286
|
-
{
|
|
2287
|
-
"name": "system_program",
|
|
2288
|
-
"address": "11111111111111111111111111111111"
|
|
2289
|
-
},
|
|
2290
|
-
{
|
|
2291
|
-
"name": "torch_vault",
|
|
2292
|
-
"docs": [
|
|
2293
|
-
"[V20] Optional: Torch vault — SOL paid from vault, collateral received to vault ATA"
|
|
2294
|
-
],
|
|
2295
|
-
"writable": true,
|
|
2296
|
-
"optional": true
|
|
2297
|
-
},
|
|
2298
|
-
{
|
|
2299
|
-
"name": "vault_wallet_link",
|
|
3649
|
+
"name": "treasury_lock",
|
|
2300
3650
|
"docs": [
|
|
2301
|
-
"
|
|
3651
|
+
"Treasury lock PDA (owns the 300M locked token ATA — lending pool for shorts)"
|
|
2302
3652
|
],
|
|
2303
|
-
"optional": true,
|
|
2304
3653
|
"pda": {
|
|
2305
3654
|
"seeds": [
|
|
2306
3655
|
{
|
|
2307
3656
|
"kind": "const",
|
|
2308
3657
|
"value": [
|
|
2309
|
-
|
|
3658
|
+
116,
|
|
3659
|
+
114,
|
|
3660
|
+
101,
|
|
2310
3661
|
97,
|
|
3662
|
+
115,
|
|
2311
3663
|
117,
|
|
2312
|
-
|
|
2313
|
-
|
|
3664
|
+
114,
|
|
3665
|
+
121,
|
|
2314
3666
|
95,
|
|
2315
|
-
119,
|
|
2316
|
-
97,
|
|
2317
|
-
108,
|
|
2318
3667
|
108,
|
|
2319
|
-
|
|
2320
|
-
|
|
3668
|
+
111,
|
|
3669
|
+
99,
|
|
3670
|
+
107
|
|
2321
3671
|
]
|
|
2322
3672
|
},
|
|
2323
3673
|
{
|
|
2324
3674
|
"kind": "account",
|
|
2325
|
-
"path": "
|
|
3675
|
+
"path": "mint"
|
|
2326
3676
|
}
|
|
2327
3677
|
]
|
|
2328
3678
|
}
|
|
2329
3679
|
},
|
|
2330
3680
|
{
|
|
2331
|
-
"name": "
|
|
3681
|
+
"name": "treasury_lock_token_account",
|
|
2332
3682
|
"docs": [
|
|
2333
|
-
"
|
|
3683
|
+
"Treasury lock's token account (source of borrowed tokens)"
|
|
2334
3684
|
],
|
|
2335
3685
|
"writable": true,
|
|
2336
|
-
"optional": true,
|
|
2337
3686
|
"pda": {
|
|
2338
3687
|
"seeds": [
|
|
2339
3688
|
{
|
|
2340
3689
|
"kind": "account",
|
|
2341
|
-
"path": "
|
|
3690
|
+
"path": "treasury_lock"
|
|
2342
3691
|
},
|
|
2343
3692
|
{
|
|
2344
3693
|
"kind": "account",
|
|
@@ -2387,53 +3736,20 @@
|
|
|
2387
3736
|
]
|
|
2388
3737
|
}
|
|
2389
3738
|
}
|
|
2390
|
-
}
|
|
2391
|
-
],
|
|
2392
|
-
"args": []
|
|
2393
|
-
},
|
|
2394
|
-
{
|
|
2395
|
-
"name": "migrate_to_dex",
|
|
2396
|
-
"docs": [
|
|
2397
|
-
"[V26] Migrate bonded token to Raydium CPMM DEX.",
|
|
2398
|
-
"Permissionless — anyone can call once bonding completes.",
|
|
2399
|
-
"bc_wsol must be pre-funded via fund_migration_wsol.",
|
|
2400
|
-
"Creates a Raydium pool with locked liquidity (LP tokens burned)."
|
|
2401
|
-
],
|
|
2402
|
-
"discriminator": [
|
|
2403
|
-
246,
|
|
2404
|
-
150,
|
|
2405
|
-
122,
|
|
2406
|
-
141,
|
|
2407
|
-
49,
|
|
2408
|
-
26,
|
|
2409
|
-
211,
|
|
2410
|
-
26
|
|
2411
|
-
],
|
|
2412
|
-
"accounts": [
|
|
2413
|
-
{
|
|
2414
|
-
"name": "payer",
|
|
2415
|
-
"docs": [
|
|
2416
|
-
"Anyone can trigger migration (pays rent for new accounts)"
|
|
2417
|
-
],
|
|
2418
|
-
"writable": true,
|
|
2419
|
-
"signer": true
|
|
2420
3739
|
},
|
|
2421
3740
|
{
|
|
2422
|
-
"name": "
|
|
2423
|
-
"
|
|
2424
|
-
"Global config for protocol settings"
|
|
2425
|
-
],
|
|
3741
|
+
"name": "short_config",
|
|
3742
|
+
"writable": true,
|
|
2426
3743
|
"pda": {
|
|
2427
3744
|
"seeds": [
|
|
2428
3745
|
{
|
|
2429
3746
|
"kind": "const",
|
|
2430
3747
|
"value": [
|
|
2431
|
-
|
|
2432
|
-
|
|
3748
|
+
115,
|
|
3749
|
+
104,
|
|
2433
3750
|
111,
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
108,
|
|
3751
|
+
114,
|
|
3752
|
+
116,
|
|
2437
3753
|
95,
|
|
2438
3754
|
99,
|
|
2439
3755
|
111,
|
|
@@ -2442,42 +3758,6 @@
|
|
|
2442
3758
|
105,
|
|
2443
3759
|
103
|
|
2444
3760
|
]
|
|
2445
|
-
}
|
|
2446
|
-
]
|
|
2447
|
-
}
|
|
2448
|
-
},
|
|
2449
|
-
{
|
|
2450
|
-
"name": "mint",
|
|
2451
|
-
"docs": [
|
|
2452
|
-
"Token mint being migrated"
|
|
2453
|
-
],
|
|
2454
|
-
"writable": true
|
|
2455
|
-
},
|
|
2456
|
-
{
|
|
2457
|
-
"name": "bonding_curve",
|
|
2458
|
-
"docs": [
|
|
2459
|
-
"Bonding curve being migrated"
|
|
2460
|
-
],
|
|
2461
|
-
"writable": true,
|
|
2462
|
-
"pda": {
|
|
2463
|
-
"seeds": [
|
|
2464
|
-
{
|
|
2465
|
-
"kind": "const",
|
|
2466
|
-
"value": [
|
|
2467
|
-
98,
|
|
2468
|
-
111,
|
|
2469
|
-
110,
|
|
2470
|
-
100,
|
|
2471
|
-
105,
|
|
2472
|
-
110,
|
|
2473
|
-
103,
|
|
2474
|
-
95,
|
|
2475
|
-
99,
|
|
2476
|
-
117,
|
|
2477
|
-
114,
|
|
2478
|
-
118,
|
|
2479
|
-
101
|
|
2480
|
-
]
|
|
2481
3761
|
},
|
|
2482
3762
|
{
|
|
2483
3763
|
"kind": "account",
|
|
@@ -2487,108 +3767,46 @@
|
|
|
2487
3767
|
}
|
|
2488
3768
|
},
|
|
2489
3769
|
{
|
|
2490
|
-
"name": "
|
|
2491
|
-
"docs": [
|
|
2492
|
-
"Token treasury (reimburses payer for Raydium migration costs)"
|
|
2493
|
-
],
|
|
3770
|
+
"name": "short_position",
|
|
2494
3771
|
"writable": true,
|
|
2495
3772
|
"pda": {
|
|
2496
3773
|
"seeds": [
|
|
2497
3774
|
{
|
|
2498
3775
|
"kind": "const",
|
|
2499
3776
|
"value": [
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
114,
|
|
2507
|
-
121
|
|
2508
|
-
]
|
|
2509
|
-
},
|
|
2510
|
-
{
|
|
2511
|
-
"kind": "account",
|
|
2512
|
-
"path": "mint"
|
|
2513
|
-
}
|
|
2514
|
-
]
|
|
2515
|
-
}
|
|
2516
|
-
},
|
|
2517
|
-
{
|
|
2518
|
-
"name": "token_vault",
|
|
2519
|
-
"docs": [
|
|
2520
|
-
"Bonding curve token vault (source of tokens for LP)"
|
|
2521
|
-
],
|
|
2522
|
-
"writable": true,
|
|
2523
|
-
"pda": {
|
|
2524
|
-
"seeds": [
|
|
2525
|
-
{
|
|
2526
|
-
"kind": "account",
|
|
2527
|
-
"path": "bonding_curve"
|
|
3777
|
+
115,
|
|
3778
|
+
104,
|
|
3779
|
+
111,
|
|
3780
|
+
114,
|
|
3781
|
+
116
|
|
3782
|
+
]
|
|
2528
3783
|
},
|
|
2529
3784
|
{
|
|
2530
3785
|
"kind": "account",
|
|
2531
|
-
"path": "
|
|
3786
|
+
"path": "mint"
|
|
2532
3787
|
},
|
|
2533
3788
|
{
|
|
2534
3789
|
"kind": "account",
|
|
2535
|
-
"path": "
|
|
3790
|
+
"path": "shorter"
|
|
2536
3791
|
}
|
|
2537
|
-
]
|
|
2538
|
-
"program": {
|
|
2539
|
-
"kind": "const",
|
|
2540
|
-
"value": [
|
|
2541
|
-
140,
|
|
2542
|
-
151,
|
|
2543
|
-
37,
|
|
2544
|
-
143,
|
|
2545
|
-
78,
|
|
2546
|
-
36,
|
|
2547
|
-
137,
|
|
2548
|
-
241,
|
|
2549
|
-
187,
|
|
2550
|
-
61,
|
|
2551
|
-
16,
|
|
2552
|
-
41,
|
|
2553
|
-
20,
|
|
2554
|
-
142,
|
|
2555
|
-
13,
|
|
2556
|
-
131,
|
|
2557
|
-
11,
|
|
2558
|
-
90,
|
|
2559
|
-
19,
|
|
2560
|
-
153,
|
|
2561
|
-
218,
|
|
2562
|
-
255,
|
|
2563
|
-
16,
|
|
2564
|
-
132,
|
|
2565
|
-
4,
|
|
2566
|
-
142,
|
|
2567
|
-
123,
|
|
2568
|
-
216,
|
|
2569
|
-
219,
|
|
2570
|
-
233,
|
|
2571
|
-
248,
|
|
2572
|
-
89
|
|
2573
|
-
]
|
|
2574
|
-
}
|
|
3792
|
+
]
|
|
2575
3793
|
}
|
|
2576
3794
|
},
|
|
2577
3795
|
{
|
|
2578
|
-
"name": "
|
|
3796
|
+
"name": "shorter_token_account",
|
|
2579
3797
|
"docs": [
|
|
2580
|
-
"
|
|
3798
|
+
"Shorter's token account (receives borrowed tokens)"
|
|
2581
3799
|
],
|
|
2582
3800
|
"writable": true,
|
|
2583
3801
|
"pda": {
|
|
2584
3802
|
"seeds": [
|
|
2585
3803
|
{
|
|
2586
3804
|
"kind": "account",
|
|
2587
|
-
"path": "
|
|
3805
|
+
"path": "shorter"
|
|
2588
3806
|
},
|
|
2589
3807
|
{
|
|
2590
3808
|
"kind": "account",
|
|
2591
|
-
"path": "
|
|
3809
|
+
"path": "token_program"
|
|
2592
3810
|
},
|
|
2593
3811
|
{
|
|
2594
3812
|
"kind": "account",
|
|
@@ -2635,158 +3853,46 @@
|
|
|
2635
3853
|
}
|
|
2636
3854
|
},
|
|
2637
3855
|
{
|
|
2638
|
-
"name": "
|
|
2639
|
-
"docs": [
|
|
2640
|
-
"[V31] Treasury lock's token account — receives vote-return tokens."
|
|
2641
|
-
],
|
|
2642
|
-
"writable": true
|
|
2643
|
-
},
|
|
2644
|
-
{
|
|
2645
|
-
"name": "treasury_lock",
|
|
2646
|
-
"docs": [
|
|
2647
|
-
"[V31] Treasury lock PDA — authority over locked tokens"
|
|
2648
|
-
],
|
|
2649
|
-
"pda": {
|
|
2650
|
-
"seeds": [
|
|
2651
|
-
{
|
|
2652
|
-
"kind": "const",
|
|
2653
|
-
"value": [
|
|
2654
|
-
116,
|
|
2655
|
-
114,
|
|
2656
|
-
101,
|
|
2657
|
-
97,
|
|
2658
|
-
115,
|
|
2659
|
-
117,
|
|
2660
|
-
114,
|
|
2661
|
-
121,
|
|
2662
|
-
95,
|
|
2663
|
-
108,
|
|
2664
|
-
111,
|
|
2665
|
-
99,
|
|
2666
|
-
107
|
|
2667
|
-
]
|
|
2668
|
-
},
|
|
2669
|
-
{
|
|
2670
|
-
"kind": "account",
|
|
2671
|
-
"path": "mint"
|
|
2672
|
-
}
|
|
2673
|
-
]
|
|
2674
|
-
}
|
|
2675
|
-
},
|
|
2676
|
-
{
|
|
2677
|
-
"name": "bc_wsol",
|
|
2678
|
-
"docs": [
|
|
2679
|
-
"[V26] Bonding curve's WSOL ATA — pre-funded by fund_migration_wsol.",
|
|
2680
|
-
"Closed to payer_wsol at start of migration (CPI, no direct lamport manipulation)."
|
|
2681
|
-
],
|
|
2682
|
-
"writable": true
|
|
2683
|
-
},
|
|
2684
|
-
{
|
|
2685
|
-
"name": "payer_wsol",
|
|
2686
|
-
"docs": [
|
|
2687
|
-
"Payer's WSOL account — receives SOL from bc_wsol close, used by Raydium."
|
|
2688
|
-
],
|
|
2689
|
-
"writable": true
|
|
2690
|
-
},
|
|
2691
|
-
{
|
|
2692
|
-
"name": "payer_token",
|
|
2693
|
-
"docs": [
|
|
2694
|
-
"Payer's token account (receives tokens from bonding curve)"
|
|
2695
|
-
],
|
|
2696
|
-
"writable": true
|
|
2697
|
-
},
|
|
2698
|
-
{
|
|
2699
|
-
"name": "raydium_program",
|
|
2700
|
-
"address": "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"
|
|
2701
|
-
},
|
|
2702
|
-
{
|
|
2703
|
-
"name": "amm_config",
|
|
2704
|
-
"docs": [
|
|
2705
|
-
"Raydium AMM config — constrained to prevent pool creation with wrong fee tier"
|
|
2706
|
-
],
|
|
2707
|
-
"address": "D4FPEruKEHrG5TenZ2mpDGEfu1iUvTiqBxvpU8HLBvC2"
|
|
2708
|
-
},
|
|
2709
|
-
{
|
|
2710
|
-
"name": "raydium_authority",
|
|
2711
|
-
"docs": [
|
|
2712
|
-
"Raydium authority PDA"
|
|
2713
|
-
]
|
|
2714
|
-
},
|
|
2715
|
-
{
|
|
2716
|
-
"name": "pool_state",
|
|
2717
|
-
"docs": [
|
|
2718
|
-
"Raydium pool state PDA (created by Raydium via init)"
|
|
2719
|
-
],
|
|
2720
|
-
"writable": true
|
|
2721
|
-
},
|
|
2722
|
-
{
|
|
2723
|
-
"name": "wsol_mint",
|
|
2724
|
-
"docs": [
|
|
2725
|
-
"WSOL mint"
|
|
2726
|
-
],
|
|
2727
|
-
"address": "So11111111111111111111111111111111111111112"
|
|
2728
|
-
},
|
|
2729
|
-
{
|
|
2730
|
-
"name": "token_0_vault",
|
|
2731
|
-
"docs": [
|
|
2732
|
-
"Pool token 0 vault (WSOL or token depending on ordering)"
|
|
2733
|
-
],
|
|
2734
|
-
"writable": true
|
|
3856
|
+
"name": "pool_state"
|
|
2735
3857
|
},
|
|
2736
3858
|
{
|
|
2737
|
-
"name": "
|
|
2738
|
-
"docs": [
|
|
2739
|
-
"Pool token 1 vault"
|
|
2740
|
-
],
|
|
2741
|
-
"writable": true
|
|
3859
|
+
"name": "token_vault_0"
|
|
2742
3860
|
},
|
|
2743
3861
|
{
|
|
2744
|
-
"name": "
|
|
2745
|
-
"docs": [
|
|
2746
|
-
"LP token mint PDA (created by Raydium via init)"
|
|
2747
|
-
],
|
|
2748
|
-
"writable": true
|
|
3862
|
+
"name": "token_vault_1"
|
|
2749
3863
|
},
|
|
2750
3864
|
{
|
|
2751
|
-
"name": "
|
|
2752
|
-
"
|
|
2753
|
-
|
|
2754
|
-
],
|
|
2755
|
-
"writable": true
|
|
3865
|
+
"name": "torch_vault",
|
|
3866
|
+
"writable": true,
|
|
3867
|
+
"optional": true
|
|
2756
3868
|
},
|
|
2757
3869
|
{
|
|
2758
|
-
"name": "
|
|
2759
|
-
"
|
|
2760
|
-
"Raydium observation state PDA (created by Raydium via init)"
|
|
2761
|
-
],
|
|
2762
|
-
"writable": true
|
|
3870
|
+
"name": "vault_wallet_link",
|
|
3871
|
+
"optional": true
|
|
2763
3872
|
},
|
|
2764
3873
|
{
|
|
2765
|
-
"name": "
|
|
2766
|
-
"
|
|
2767
|
-
|
|
2768
|
-
],
|
|
2769
|
-
"writable": true
|
|
3874
|
+
"name": "vault_token_account",
|
|
3875
|
+
"writable": true,
|
|
3876
|
+
"optional": true
|
|
2770
3877
|
},
|
|
2771
3878
|
{
|
|
2772
3879
|
"name": "token_program"
|
|
2773
3880
|
},
|
|
2774
|
-
{
|
|
2775
|
-
"name": "token_2022_program"
|
|
2776
|
-
},
|
|
2777
|
-
{
|
|
2778
|
-
"name": "associated_token_program"
|
|
2779
|
-
},
|
|
2780
3881
|
{
|
|
2781
3882
|
"name": "system_program",
|
|
2782
3883
|
"address": "11111111111111111111111111111111"
|
|
2783
|
-
},
|
|
2784
|
-
{
|
|
2785
|
-
"name": "rent",
|
|
2786
|
-
"address": "SysvarRent111111111111111111111111111111111"
|
|
2787
3884
|
}
|
|
2788
3885
|
],
|
|
2789
|
-
"args": [
|
|
3886
|
+
"args": [
|
|
3887
|
+
{
|
|
3888
|
+
"name": "args",
|
|
3889
|
+
"type": {
|
|
3890
|
+
"defined": {
|
|
3891
|
+
"name": "OpenShortArgs"
|
|
3892
|
+
}
|
|
3893
|
+
}
|
|
3894
|
+
}
|
|
3895
|
+
]
|
|
2790
3896
|
},
|
|
2791
3897
|
{
|
|
2792
3898
|
"name": "reclaim_failed_token",
|
|
@@ -4782,6 +5888,32 @@
|
|
|
4782
5888
|
73
|
|
4783
5889
|
]
|
|
4784
5890
|
},
|
|
5891
|
+
{
|
|
5892
|
+
"name": "ShortConfig",
|
|
5893
|
+
"discriminator": [
|
|
5894
|
+
222,
|
|
5895
|
+
62,
|
|
5896
|
+
202,
|
|
5897
|
+
64,
|
|
5898
|
+
31,
|
|
5899
|
+
63,
|
|
5900
|
+
147,
|
|
5901
|
+
139
|
|
5902
|
+
]
|
|
5903
|
+
},
|
|
5904
|
+
{
|
|
5905
|
+
"name": "ShortPosition",
|
|
5906
|
+
"discriminator": [
|
|
5907
|
+
110,
|
|
5908
|
+
216,
|
|
5909
|
+
100,
|
|
5910
|
+
57,
|
|
5911
|
+
75,
|
|
5912
|
+
53,
|
|
5913
|
+
168,
|
|
5914
|
+
59
|
|
5915
|
+
]
|
|
5916
|
+
},
|
|
4785
5917
|
{
|
|
4786
5918
|
"name": "StarRecord",
|
|
4787
5919
|
"discriminator": [
|
|
@@ -4902,29 +6034,81 @@
|
|
|
4902
6034
|
]
|
|
4903
6035
|
},
|
|
4904
6036
|
{
|
|
4905
|
-
"name": "LoanRepaid",
|
|
6037
|
+
"name": "LoanRepaid",
|
|
6038
|
+
"discriminator": [
|
|
6039
|
+
202,
|
|
6040
|
+
183,
|
|
6041
|
+
88,
|
|
6042
|
+
60,
|
|
6043
|
+
211,
|
|
6044
|
+
54,
|
|
6045
|
+
142,
|
|
6046
|
+
243
|
|
6047
|
+
]
|
|
6048
|
+
},
|
|
6049
|
+
{
|
|
6050
|
+
"name": "RevivalContribution",
|
|
6051
|
+
"discriminator": [
|
|
6052
|
+
222,
|
|
6053
|
+
122,
|
|
6054
|
+
165,
|
|
6055
|
+
165,
|
|
6056
|
+
149,
|
|
6057
|
+
122,
|
|
6058
|
+
80,
|
|
6059
|
+
240
|
|
6060
|
+
]
|
|
6061
|
+
},
|
|
6062
|
+
{
|
|
6063
|
+
"name": "ShortClosed",
|
|
6064
|
+
"discriminator": [
|
|
6065
|
+
132,
|
|
6066
|
+
24,
|
|
6067
|
+
181,
|
|
6068
|
+
149,
|
|
6069
|
+
231,
|
|
6070
|
+
50,
|
|
6071
|
+
138,
|
|
6072
|
+
206
|
|
6073
|
+
]
|
|
6074
|
+
},
|
|
6075
|
+
{
|
|
6076
|
+
"name": "ShortLiquidated",
|
|
4906
6077
|
"discriminator": [
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
6078
|
+
51,
|
|
6079
|
+
255,
|
|
6080
|
+
184,
|
|
6081
|
+
119,
|
|
6082
|
+
40,
|
|
6083
|
+
135,
|
|
6084
|
+
9,
|
|
6085
|
+
32
|
|
4915
6086
|
]
|
|
4916
6087
|
},
|
|
4917
6088
|
{
|
|
4918
|
-
"name": "
|
|
6089
|
+
"name": "ShortOpened",
|
|
4919
6090
|
"discriminator": [
|
|
4920
6091
|
222,
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
6092
|
+
5,
|
|
6093
|
+
144,
|
|
6094
|
+
66,
|
|
6095
|
+
19,
|
|
6096
|
+
226,
|
|
6097
|
+
99,
|
|
6098
|
+
233
|
|
6099
|
+
]
|
|
6100
|
+
},
|
|
6101
|
+
{
|
|
6102
|
+
"name": "ShortSellingEnabled",
|
|
6103
|
+
"discriminator": [
|
|
6104
|
+
181,
|
|
6105
|
+
221,
|
|
6106
|
+
40,
|
|
6107
|
+
37,
|
|
6108
|
+
69,
|
|
6109
|
+
198,
|
|
6110
|
+
182,
|
|
6111
|
+
171
|
|
4928
6112
|
]
|
|
4929
6113
|
},
|
|
4930
6114
|
{
|
|
@@ -5269,6 +6453,46 @@
|
|
|
5269
6453
|
"code": 6062,
|
|
5270
6454
|
"name": "ClaimBelowMinimum",
|
|
5271
6455
|
"msg": "Claim amount below minimum (0.1 SOL)"
|
|
6456
|
+
},
|
|
6457
|
+
{
|
|
6458
|
+
"code": 6063,
|
|
6459
|
+
"name": "ShortNotEnabled",
|
|
6460
|
+
"msg": "Short selling is not enabled for this token"
|
|
6461
|
+
},
|
|
6462
|
+
{
|
|
6463
|
+
"code": 6064,
|
|
6464
|
+
"name": "ShortTooSmall",
|
|
6465
|
+
"msg": "Short position size below minimum (1,000 tokens)"
|
|
6466
|
+
},
|
|
6467
|
+
{
|
|
6468
|
+
"code": 6065,
|
|
6469
|
+
"name": "ShortCapExceeded",
|
|
6470
|
+
"msg": "Token lending capacity exhausted (short utilization cap reached)"
|
|
6471
|
+
},
|
|
6472
|
+
{
|
|
6473
|
+
"code": 6066,
|
|
6474
|
+
"name": "UserShortCapExceeded",
|
|
6475
|
+
"msg": "Per-user short cap exceeded"
|
|
6476
|
+
},
|
|
6477
|
+
{
|
|
6478
|
+
"code": 6067,
|
|
6479
|
+
"name": "ShortNotLiquidatable",
|
|
6480
|
+
"msg": "Short position is not liquidatable (LTV below threshold)"
|
|
6481
|
+
},
|
|
6482
|
+
{
|
|
6483
|
+
"code": 6068,
|
|
6484
|
+
"name": "NoActiveShort",
|
|
6485
|
+
"msg": "No active short position"
|
|
6486
|
+
},
|
|
6487
|
+
{
|
|
6488
|
+
"code": 6069,
|
|
6489
|
+
"name": "InsufficientTreasuryTokens",
|
|
6490
|
+
"msg": "Treasury has insufficient tokens for short lending"
|
|
6491
|
+
},
|
|
6492
|
+
{
|
|
6493
|
+
"code": 6070,
|
|
6494
|
+
"name": "ShortAlreadyEnabled",
|
|
6495
|
+
"msg": "Short selling already enabled for this token"
|
|
5272
6496
|
}
|
|
5273
6497
|
],
|
|
5274
6498
|
"types": [
|
|
@@ -5780,6 +7004,28 @@
|
|
|
5780
7004
|
]
|
|
5781
7005
|
}
|
|
5782
7006
|
},
|
|
7007
|
+
{
|
|
7008
|
+
"name": "OpenShortArgs",
|
|
7009
|
+
"type": {
|
|
7010
|
+
"kind": "struct",
|
|
7011
|
+
"fields": [
|
|
7012
|
+
{
|
|
7013
|
+
"name": "sol_collateral",
|
|
7014
|
+
"docs": [
|
|
7015
|
+
"SOL to post as collateral (can be 0 if adding debt to existing position)"
|
|
7016
|
+
],
|
|
7017
|
+
"type": "u64"
|
|
7018
|
+
},
|
|
7019
|
+
{
|
|
7020
|
+
"name": "tokens_to_borrow",
|
|
7021
|
+
"docs": [
|
|
7022
|
+
"Tokens to borrow from treasury (can be 0 if just adding collateral)"
|
|
7023
|
+
],
|
|
7024
|
+
"type": "u64"
|
|
7025
|
+
}
|
|
7026
|
+
]
|
|
7027
|
+
}
|
|
7028
|
+
},
|
|
5783
7029
|
{
|
|
5784
7030
|
"name": "ProtocolTreasury",
|
|
5785
7031
|
"docs": [
|
|
@@ -5924,6 +7170,232 @@
|
|
|
5924
7170
|
]
|
|
5925
7171
|
}
|
|
5926
7172
|
},
|
|
7173
|
+
{
|
|
7174
|
+
"name": "ShortClosed",
|
|
7175
|
+
"type": {
|
|
7176
|
+
"kind": "struct",
|
|
7177
|
+
"fields": [
|
|
7178
|
+
{
|
|
7179
|
+
"name": "mint",
|
|
7180
|
+
"type": "pubkey"
|
|
7181
|
+
},
|
|
7182
|
+
{
|
|
7183
|
+
"name": "user",
|
|
7184
|
+
"type": "pubkey"
|
|
7185
|
+
},
|
|
7186
|
+
{
|
|
7187
|
+
"name": "tokens_returned",
|
|
7188
|
+
"type": "u64"
|
|
7189
|
+
},
|
|
7190
|
+
{
|
|
7191
|
+
"name": "interest_paid_tokens",
|
|
7192
|
+
"type": "u64"
|
|
7193
|
+
},
|
|
7194
|
+
{
|
|
7195
|
+
"name": "sol_returned",
|
|
7196
|
+
"type": "u64"
|
|
7197
|
+
},
|
|
7198
|
+
{
|
|
7199
|
+
"name": "fully_closed",
|
|
7200
|
+
"type": "bool"
|
|
7201
|
+
}
|
|
7202
|
+
]
|
|
7203
|
+
}
|
|
7204
|
+
},
|
|
7205
|
+
{
|
|
7206
|
+
"name": "ShortConfig",
|
|
7207
|
+
"docs": [
|
|
7208
|
+
"[V5] Per-token aggregate state for short positions.",
|
|
7209
|
+
"",
|
|
7210
|
+
"Tracks token utilization and position counts. Holds NO SOL —",
|
|
7211
|
+
"short collateral lives in the Treasury PDA, tracked via the",
|
|
7212
|
+
"repurposed `total_burned_from_buyback` field.",
|
|
7213
|
+
"",
|
|
7214
|
+
"Seeds: [\"short_config\", mint.key()]"
|
|
7215
|
+
],
|
|
7216
|
+
"type": {
|
|
7217
|
+
"kind": "struct",
|
|
7218
|
+
"fields": [
|
|
7219
|
+
{
|
|
7220
|
+
"name": "mint",
|
|
7221
|
+
"docs": [
|
|
7222
|
+
"Token mint"
|
|
7223
|
+
],
|
|
7224
|
+
"type": "pubkey"
|
|
7225
|
+
},
|
|
7226
|
+
{
|
|
7227
|
+
"name": "total_tokens_lent",
|
|
7228
|
+
"docs": [
|
|
7229
|
+
"Tokens currently borrowed by all short sellers"
|
|
7230
|
+
],
|
|
7231
|
+
"type": "u64"
|
|
7232
|
+
},
|
|
7233
|
+
{
|
|
7234
|
+
"name": "active_positions",
|
|
7235
|
+
"docs": [
|
|
7236
|
+
"Count of open short positions"
|
|
7237
|
+
],
|
|
7238
|
+
"type": "u64"
|
|
7239
|
+
},
|
|
7240
|
+
{
|
|
7241
|
+
"name": "total_interest_collected",
|
|
7242
|
+
"docs": [
|
|
7243
|
+
"Cumulative interest collected (tokens returned to treasury)"
|
|
7244
|
+
],
|
|
7245
|
+
"type": "u64"
|
|
7246
|
+
},
|
|
7247
|
+
{
|
|
7248
|
+
"name": "bump",
|
|
7249
|
+
"docs": [
|
|
7250
|
+
"PDA bump"
|
|
7251
|
+
],
|
|
7252
|
+
"type": "u8"
|
|
7253
|
+
}
|
|
7254
|
+
]
|
|
7255
|
+
}
|
|
7256
|
+
},
|
|
7257
|
+
{
|
|
7258
|
+
"name": "ShortLiquidated",
|
|
7259
|
+
"type": {
|
|
7260
|
+
"kind": "struct",
|
|
7261
|
+
"fields": [
|
|
7262
|
+
{
|
|
7263
|
+
"name": "mint",
|
|
7264
|
+
"type": "pubkey"
|
|
7265
|
+
},
|
|
7266
|
+
{
|
|
7267
|
+
"name": "borrower",
|
|
7268
|
+
"type": "pubkey"
|
|
7269
|
+
},
|
|
7270
|
+
{
|
|
7271
|
+
"name": "liquidator",
|
|
7272
|
+
"type": "pubkey"
|
|
7273
|
+
},
|
|
7274
|
+
{
|
|
7275
|
+
"name": "tokens_covered",
|
|
7276
|
+
"type": "u64"
|
|
7277
|
+
},
|
|
7278
|
+
{
|
|
7279
|
+
"name": "sol_seized",
|
|
7280
|
+
"type": "u64"
|
|
7281
|
+
},
|
|
7282
|
+
{
|
|
7283
|
+
"name": "bad_debt_tokens",
|
|
7284
|
+
"type": "u64"
|
|
7285
|
+
}
|
|
7286
|
+
]
|
|
7287
|
+
}
|
|
7288
|
+
},
|
|
7289
|
+
{
|
|
7290
|
+
"name": "ShortOpened",
|
|
7291
|
+
"type": {
|
|
7292
|
+
"kind": "struct",
|
|
7293
|
+
"fields": [
|
|
7294
|
+
{
|
|
7295
|
+
"name": "mint",
|
|
7296
|
+
"type": "pubkey"
|
|
7297
|
+
},
|
|
7298
|
+
{
|
|
7299
|
+
"name": "user",
|
|
7300
|
+
"type": "pubkey"
|
|
7301
|
+
},
|
|
7302
|
+
{
|
|
7303
|
+
"name": "sol_collateral",
|
|
7304
|
+
"type": "u64"
|
|
7305
|
+
},
|
|
7306
|
+
{
|
|
7307
|
+
"name": "tokens_borrowed",
|
|
7308
|
+
"type": "u64"
|
|
7309
|
+
},
|
|
7310
|
+
{
|
|
7311
|
+
"name": "ltv_bps",
|
|
7312
|
+
"type": "u16"
|
|
7313
|
+
}
|
|
7314
|
+
]
|
|
7315
|
+
}
|
|
7316
|
+
},
|
|
7317
|
+
{
|
|
7318
|
+
"name": "ShortPosition",
|
|
7319
|
+
"docs": [
|
|
7320
|
+
"[V5] Per-user, per-token short position for margin trading",
|
|
7321
|
+
"",
|
|
7322
|
+
"Created on first open_short. Tracks SOL collateral posted and tokens owed.",
|
|
7323
|
+
"Closed (rent reclaimed) on full close or full liquidation.",
|
|
7324
|
+
"Mirror of LoanPosition but with inverted collateral/debt assets.",
|
|
7325
|
+
"",
|
|
7326
|
+
"Seeds: [\"short\", mint.key(), user.key()]"
|
|
7327
|
+
],
|
|
7328
|
+
"type": {
|
|
7329
|
+
"kind": "struct",
|
|
7330
|
+
"fields": [
|
|
7331
|
+
{
|
|
7332
|
+
"name": "user",
|
|
7333
|
+
"docs": [
|
|
7334
|
+
"Short seller wallet"
|
|
7335
|
+
],
|
|
7336
|
+
"type": "pubkey"
|
|
7337
|
+
},
|
|
7338
|
+
{
|
|
7339
|
+
"name": "mint",
|
|
7340
|
+
"docs": [
|
|
7341
|
+
"Token mint (for PDA derivation)"
|
|
7342
|
+
],
|
|
7343
|
+
"type": "pubkey"
|
|
7344
|
+
},
|
|
7345
|
+
{
|
|
7346
|
+
"name": "sol_collateral",
|
|
7347
|
+
"docs": [
|
|
7348
|
+
"SOL posted as collateral (lamports), held in Treasury"
|
|
7349
|
+
],
|
|
7350
|
+
"type": "u64"
|
|
7351
|
+
},
|
|
7352
|
+
{
|
|
7353
|
+
"name": "tokens_borrowed",
|
|
7354
|
+
"docs": [
|
|
7355
|
+
"Tokens owed to treasury"
|
|
7356
|
+
],
|
|
7357
|
+
"type": "u64"
|
|
7358
|
+
},
|
|
7359
|
+
{
|
|
7360
|
+
"name": "accrued_interest",
|
|
7361
|
+
"docs": [
|
|
7362
|
+
"Interest accumulated in token terms"
|
|
7363
|
+
],
|
|
7364
|
+
"type": "u64"
|
|
7365
|
+
},
|
|
7366
|
+
{
|
|
7367
|
+
"name": "last_update_slot",
|
|
7368
|
+
"docs": [
|
|
7369
|
+
"Last slot when interest was calculated"
|
|
7370
|
+
],
|
|
7371
|
+
"type": "u64"
|
|
7372
|
+
},
|
|
7373
|
+
{
|
|
7374
|
+
"name": "bump",
|
|
7375
|
+
"docs": [
|
|
7376
|
+
"PDA bump"
|
|
7377
|
+
],
|
|
7378
|
+
"type": "u8"
|
|
7379
|
+
}
|
|
7380
|
+
]
|
|
7381
|
+
}
|
|
7382
|
+
},
|
|
7383
|
+
{
|
|
7384
|
+
"name": "ShortSellingEnabled",
|
|
7385
|
+
"type": {
|
|
7386
|
+
"kind": "struct",
|
|
7387
|
+
"fields": [
|
|
7388
|
+
{
|
|
7389
|
+
"name": "mint",
|
|
7390
|
+
"type": "pubkey"
|
|
7391
|
+
},
|
|
7392
|
+
{
|
|
7393
|
+
"name": "authority",
|
|
7394
|
+
"type": "pubkey"
|
|
7395
|
+
}
|
|
7396
|
+
]
|
|
7397
|
+
}
|
|
7398
|
+
},
|
|
5927
7399
|
{
|
|
5928
7400
|
"name": "StarRecord",
|
|
5929
7401
|
"docs": [
|