@triadxyz/poseidons-protocol 0.5.0 → 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,30 +298,7 @@
|
|
|
298
298
|
{
|
|
299
299
|
"name": "user_ata",
|
|
300
300
|
"writable": true,
|
|
301
|
-
"
|
|
302
|
-
"seeds": [
|
|
303
|
-
{
|
|
304
|
-
"kind": "account",
|
|
305
|
-
"path": "signer"
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
"kind": "account",
|
|
309
|
-
"path": "token_program"
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
"kind": "account",
|
|
313
|
-
"path": "mint"
|
|
314
|
-
}
|
|
315
|
-
],
|
|
316
|
-
"program": {
|
|
317
|
-
"kind": "const",
|
|
318
|
-
"value": [
|
|
319
|
-
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142,
|
|
320
|
-
13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216,
|
|
321
|
-
219, 233, 248, 89
|
|
322
|
-
]
|
|
323
|
-
}
|
|
324
|
-
}
|
|
301
|
+
"optional": true
|
|
325
302
|
},
|
|
326
303
|
{
|
|
327
304
|
"name": "squads_ata",
|
|
@@ -403,59 +403,7 @@ export type PoseidonsProtocol = {
|
|
|
403
403
|
{
|
|
404
404
|
name: 'userAta';
|
|
405
405
|
writable: true;
|
|
406
|
-
|
|
407
|
-
seeds: [
|
|
408
|
-
{
|
|
409
|
-
kind: 'account';
|
|
410
|
-
path: 'signer';
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
kind: 'account';
|
|
414
|
-
path: 'tokenProgram';
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
kind: 'account';
|
|
418
|
-
path: 'mint';
|
|
419
|
-
}
|
|
420
|
-
];
|
|
421
|
-
program: {
|
|
422
|
-
kind: 'const';
|
|
423
|
-
value: [
|
|
424
|
-
140,
|
|
425
|
-
151,
|
|
426
|
-
37,
|
|
427
|
-
143,
|
|
428
|
-
78,
|
|
429
|
-
36,
|
|
430
|
-
137,
|
|
431
|
-
241,
|
|
432
|
-
187,
|
|
433
|
-
61,
|
|
434
|
-
16,
|
|
435
|
-
41,
|
|
436
|
-
20,
|
|
437
|
-
142,
|
|
438
|
-
13,
|
|
439
|
-
131,
|
|
440
|
-
11,
|
|
441
|
-
90,
|
|
442
|
-
19,
|
|
443
|
-
153,
|
|
444
|
-
218,
|
|
445
|
-
255,
|
|
446
|
-
16,
|
|
447
|
-
132,
|
|
448
|
-
4,
|
|
449
|
-
142,
|
|
450
|
-
123,
|
|
451
|
-
216,
|
|
452
|
-
219,
|
|
453
|
-
233,
|
|
454
|
-
248,
|
|
455
|
-
89
|
|
456
|
-
];
|
|
457
|
-
};
|
|
458
|
-
};
|
|
406
|
+
optional: true;
|
|
459
407
|
},
|
|
460
408
|
{
|
|
461
409
|
name: 'squadsAta';
|