@triadxyz/poseidons-protocol 0.5.1 → 0.5.2
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/game/index.js
CHANGED
|
@@ -17,6 +17,8 @@ const chest_1 = __importDefault(require("./chest"));
|
|
|
17
17
|
const wheel_1 = __importDefault(require("./wheel"));
|
|
18
18
|
const sendVersionedTransaction_1 = __importDefault(require("../utils/sendVersionedTransaction"));
|
|
19
19
|
const pda_1 = require("../utils/pda");
|
|
20
|
+
const constants_1 = require("../utils/constants");
|
|
21
|
+
const spl_token_1 = require("@solana/spl-token");
|
|
20
22
|
class Game {
|
|
21
23
|
constructor(program, rpcOptions) {
|
|
22
24
|
this.program = program;
|
|
@@ -55,7 +57,10 @@ class Game {
|
|
|
55
57
|
})
|
|
56
58
|
.accounts({
|
|
57
59
|
signer: this.program.provider.publicKey,
|
|
58
|
-
user: userPDA
|
|
60
|
+
user: userPDA,
|
|
61
|
+
userAta: isUsdc
|
|
62
|
+
? (0, pda_1.getTokenATA)(user.user, constants_1.USDC_MINT, spl_token_1.TOKEN_PROGRAM_ID)
|
|
63
|
+
: undefined
|
|
59
64
|
})
|
|
60
65
|
.instruction());
|
|
61
66
|
}
|
|
@@ -298,31 +298,7 @@
|
|
|
298
298
|
{
|
|
299
299
|
"name": "user_ata",
|
|
300
300
|
"writable": true,
|
|
301
|
-
"optional": true
|
|
302
|
-
"pda": {
|
|
303
|
-
"seeds": [
|
|
304
|
-
{
|
|
305
|
-
"kind": "account",
|
|
306
|
-
"path": "signer"
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
"kind": "account",
|
|
310
|
-
"path": "token_program"
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
"kind": "account",
|
|
314
|
-
"path": "mint"
|
|
315
|
-
}
|
|
316
|
-
],
|
|
317
|
-
"program": {
|
|
318
|
-
"kind": "const",
|
|
319
|
-
"value": [
|
|
320
|
-
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142,
|
|
321
|
-
13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216,
|
|
322
|
-
219, 233, 248, 89
|
|
323
|
-
]
|
|
324
|
-
}
|
|
325
|
-
}
|
|
301
|
+
"optional": true
|
|
326
302
|
},
|
|
327
303
|
{
|
|
328
304
|
"name": "squads_ata",
|
|
@@ -404,59 +404,6 @@ export type PoseidonsProtocol = {
|
|
|
404
404
|
name: 'userAta';
|
|
405
405
|
writable: true;
|
|
406
406
|
optional: true;
|
|
407
|
-
pda: {
|
|
408
|
-
seeds: [
|
|
409
|
-
{
|
|
410
|
-
kind: 'account';
|
|
411
|
-
path: 'signer';
|
|
412
|
-
},
|
|
413
|
-
{
|
|
414
|
-
kind: 'account';
|
|
415
|
-
path: 'tokenProgram';
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
kind: 'account';
|
|
419
|
-
path: 'mint';
|
|
420
|
-
}
|
|
421
|
-
];
|
|
422
|
-
program: {
|
|
423
|
-
kind: 'const';
|
|
424
|
-
value: [
|
|
425
|
-
140,
|
|
426
|
-
151,
|
|
427
|
-
37,
|
|
428
|
-
143,
|
|
429
|
-
78,
|
|
430
|
-
36,
|
|
431
|
-
137,
|
|
432
|
-
241,
|
|
433
|
-
187,
|
|
434
|
-
61,
|
|
435
|
-
16,
|
|
436
|
-
41,
|
|
437
|
-
20,
|
|
438
|
-
142,
|
|
439
|
-
13,
|
|
440
|
-
131,
|
|
441
|
-
11,
|
|
442
|
-
90,
|
|
443
|
-
19,
|
|
444
|
-
153,
|
|
445
|
-
218,
|
|
446
|
-
255,
|
|
447
|
-
16,
|
|
448
|
-
132,
|
|
449
|
-
4,
|
|
450
|
-
142,
|
|
451
|
-
123,
|
|
452
|
-
216,
|
|
453
|
-
219,
|
|
454
|
-
233,
|
|
455
|
-
248,
|
|
456
|
-
89
|
|
457
|
-
];
|
|
458
|
-
};
|
|
459
|
-
};
|
|
460
407
|
},
|
|
461
408
|
{
|
|
462
409
|
name: 'squadsAta';
|