@pushchain/core 5.1.6 → 5.1.8

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.
Files changed (27) hide show
  1. package/package.json +1 -1
  2. package/src/lib/constants/abi/feeLocker.json +1 -2579
  3. package/src/lib/constants/abi/universalGatewayV0.json +1 -3009
  4. package/src/lib/constants/chain.d.ts +3 -0
  5. package/src/lib/constants/chain.js +54 -1
  6. package/src/lib/constants/tokens.js +25 -0
  7. package/src/lib/generated/uexecutor/v1/types.d.ts +0 -6
  8. package/src/lib/generated/uexecutor/v1/types.js +0 -267
  9. package/src/lib/generated/uexecutor/v2/index.d.ts +1 -1
  10. package/src/lib/generated/uexecutor/v2/index.js +1 -9
  11. package/src/lib/generated/uexecutor/v2/types.d.ts +1 -7
  12. package/src/lib/generated/uexecutor/v2/types.js +1 -287
  13. package/src/lib/generated/v1/tx.d.ts +0 -4
  14. package/src/lib/generated/v1/tx.js +0 -205
  15. package/src/lib/orchestrator/orchestrator.types.d.ts +0 -7
  16. package/src/lib/orchestrator/payload-builders.d.ts +0 -45
  17. package/src/lib/orchestrator/payload-builders.js +0 -110
  18. package/src/lib/progress-hook/progress-hook.js +6 -6
  19. package/src/lib/push-client/push-client.js +12 -11
  20. package/src/lib/universal/account/account.js +10 -2
  21. package/src/lib/vm-client/evm-client.d.ts +1 -1
  22. package/src/lib/vm-client/evm-client.js +2 -1
  23. package/src/lib/vm-client/vm-client.types.d.ts +2 -1
  24. package/src/lib/universal-tx-detector/__tests__/fixtures/builders.d.ts +0 -32
  25. package/src/lib/universal-tx-detector/__tests__/fixtures/builders.js +0 -65
  26. package/src/lib/universal-tx-detector/__tests__/fixtures/scenarios.d.ts +0 -72
  27. package/src/lib/universal-tx-detector/__tests__/fixtures/scenarios.js +0 -669
@@ -1,2579 +1 @@
1
- {
2
- "address": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS",
3
- "metadata": {
4
- "name": "pushsolanagateway",
5
- "version": "0.1.0",
6
- "spec": "0.1.0",
7
- "description": "Push Solana Gateway - Universal Gateway for Solana"
8
- },
9
- "instructions": [
10
- {
11
- "name": "add_funds",
12
- "docs": [
13
- "@notice Legacy-compatible add funds event for offchain relayers (pushsolanalocker)"
14
- ],
15
- "discriminator": [
16
- 132,
17
- 237,
18
- 76,
19
- 57,
20
- 80,
21
- 10,
22
- 179,
23
- 138
24
- ],
25
- "accounts": [
26
- {
27
- "name": "config",
28
- "pda": {
29
- "seeds": [
30
- {
31
- "kind": "const",
32
- "value": [
33
- 99,
34
- 111,
35
- 110,
36
- 102,
37
- 105,
38
- 103
39
- ]
40
- }
41
- ]
42
- }
43
- },
44
- {
45
- "name": "vault",
46
- "writable": true,
47
- "pda": {
48
- "seeds": [
49
- {
50
- "kind": "const",
51
- "value": [
52
- 118,
53
- 97,
54
- 117,
55
- 108,
56
- 116
57
- ]
58
- }
59
- ]
60
- }
61
- },
62
- {
63
- "name": "user",
64
- "writable": true,
65
- "signer": true
66
- },
67
- {
68
- "name": "price_update"
69
- },
70
- {
71
- "name": "system_program",
72
- "address": "11111111111111111111111111111111"
73
- }
74
- ],
75
- "args": [
76
- {
77
- "name": "amount",
78
- "type": "u64"
79
- },
80
- {
81
- "name": "transaction_hash",
82
- "type": {
83
- "array": [
84
- "u8",
85
- 32
86
- ]
87
- }
88
- }
89
- ]
90
- },
91
- {
92
- "name": "get_sol_price",
93
- "docs": [
94
- "@notice View function for SOL price (locker-compatible)",
95
- "@dev Anyone can fetch SOL price in USD"
96
- ],
97
- "discriminator": [
98
- 230,
99
- 145,
100
- 206,
101
- 175,
102
- 43,
103
- 184,
104
- 97,
105
- 110
106
- ],
107
- "accounts": [
108
- {
109
- "name": "price_update"
110
- }
111
- ],
112
- "args": [],
113
- "returns": {
114
- "defined": {
115
- "name": "PriceData"
116
- }
117
- }
118
- },
119
- {
120
- "name": "init_tss",
121
- "discriminator": [
122
- 47,
123
- 31,
124
- 100,
125
- 111,
126
- 115,
127
- 2,
128
- 22,
129
- 208
130
- ],
131
- "accounts": [
132
- {
133
- "name": "tss_pda",
134
- "writable": true,
135
- "pda": {
136
- "seeds": [
137
- {
138
- "kind": "const",
139
- "value": [
140
- 116,
141
- 115,
142
- 115
143
- ]
144
- }
145
- ]
146
- }
147
- },
148
- {
149
- "name": "authority",
150
- "writable": true,
151
- "signer": true
152
- },
153
- {
154
- "name": "system_program",
155
- "address": "11111111111111111111111111111111"
156
- }
157
- ],
158
- "args": [
159
- {
160
- "name": "tss_eth_address",
161
- "type": {
162
- "array": [
163
- "u8",
164
- 20
165
- ]
166
- }
167
- },
168
- {
169
- "name": "chain_id",
170
- "type": "u64"
171
- }
172
- ]
173
- },
174
- {
175
- "name": "initialize",
176
- "docs": [
177
- "@notice Initialize the gateway"
178
- ],
179
- "discriminator": [
180
- 175,
181
- 175,
182
- 109,
183
- 31,
184
- 13,
185
- 152,
186
- 155,
187
- 237
188
- ],
189
- "accounts": [
190
- {
191
- "name": "config",
192
- "writable": true,
193
- "pda": {
194
- "seeds": [
195
- {
196
- "kind": "const",
197
- "value": [
198
- 99,
199
- 111,
200
- 110,
201
- 102,
202
- 105,
203
- 103
204
- ]
205
- }
206
- ]
207
- }
208
- },
209
- {
210
- "name": "vault",
211
- "writable": true,
212
- "pda": {
213
- "seeds": [
214
- {
215
- "kind": "const",
216
- "value": [
217
- 118,
218
- 97,
219
- 117,
220
- 108,
221
- 116
222
- ]
223
- }
224
- ]
225
- }
226
- },
227
- {
228
- "name": "admin",
229
- "writable": true,
230
- "signer": true
231
- },
232
- {
233
- "name": "system_program",
234
- "address": "11111111111111111111111111111111"
235
- }
236
- ],
237
- "args": [
238
- {
239
- "name": "admin",
240
- "type": "pubkey"
241
- },
242
- {
243
- "name": "pauser",
244
- "type": "pubkey"
245
- },
246
- {
247
- "name": "tss",
248
- "type": "pubkey"
249
- },
250
- {
251
- "name": "min_cap_usd",
252
- "type": "u128"
253
- },
254
- {
255
- "name": "max_cap_usd",
256
- "type": "u128"
257
- },
258
- {
259
- "name": "pyth_price_feed",
260
- "type": "pubkey"
261
- }
262
- ]
263
- },
264
- {
265
- "name": "pause",
266
- "docs": [
267
- "@notice Pause the gateway"
268
- ],
269
- "discriminator": [
270
- 211,
271
- 22,
272
- 221,
273
- 251,
274
- 74,
275
- 121,
276
- 193,
277
- 47
278
- ],
279
- "accounts": [
280
- {
281
- "name": "config",
282
- "writable": true,
283
- "pda": {
284
- "seeds": [
285
- {
286
- "kind": "const",
287
- "value": [
288
- 99,
289
- 111,
290
- 110,
291
- 102,
292
- 105,
293
- 103
294
- ]
295
- }
296
- ]
297
- }
298
- },
299
- {
300
- "name": "pauser",
301
- "signer": true
302
- }
303
- ],
304
- "args": []
305
- },
306
- {
307
- "name": "remove_whitelist_token",
308
- "docs": [
309
- "@notice Remove token from whitelist"
310
- ],
311
- "discriminator": [
312
- 65,
313
- 182,
314
- 42,
315
- 255,
316
- 198,
317
- 163,
318
- 73,
319
- 46
320
- ],
321
- "accounts": [
322
- {
323
- "name": "config",
324
- "writable": true,
325
- "pda": {
326
- "seeds": [
327
- {
328
- "kind": "const",
329
- "value": [
330
- 99,
331
- 111,
332
- 110,
333
- 102,
334
- 105,
335
- 103
336
- ]
337
- }
338
- ]
339
- }
340
- },
341
- {
342
- "name": "whitelist",
343
- "writable": true,
344
- "pda": {
345
- "seeds": [
346
- {
347
- "kind": "const",
348
- "value": [
349
- 119,
350
- 104,
351
- 105,
352
- 116,
353
- 101,
354
- 108,
355
- 105,
356
- 115,
357
- 116
358
- ]
359
- }
360
- ]
361
- }
362
- },
363
- {
364
- "name": "admin",
365
- "writable": true,
366
- "signer": true
367
- },
368
- {
369
- "name": "system_program",
370
- "address": "11111111111111111111111111111111"
371
- }
372
- ],
373
- "args": [
374
- {
375
- "name": "token",
376
- "type": "pubkey"
377
- }
378
- ]
379
- },
380
- {
381
- "name": "reset_nonce",
382
- "discriminator": [
383
- 104,
384
- 139,
385
- 110,
386
- 85,
387
- 234,
388
- 155,
389
- 132,
390
- 248
391
- ],
392
- "accounts": [
393
- {
394
- "name": "tss_pda",
395
- "writable": true,
396
- "pda": {
397
- "seeds": [
398
- {
399
- "kind": "const",
400
- "value": [
401
- 116,
402
- 115,
403
- 115
404
- ]
405
- }
406
- ]
407
- }
408
- },
409
- {
410
- "name": "authority",
411
- "signer": true
412
- }
413
- ],
414
- "args": [
415
- {
416
- "name": "new_nonce",
417
- "type": "u64"
418
- }
419
- ]
420
- },
421
- {
422
- "name": "revert_withdraw",
423
- "docs": [
424
- "@notice TSS-verified revert withdraw for SOL"
425
- ],
426
- "discriminator": [
427
- 8,
428
- 232,
429
- 107,
430
- 216,
431
- 153,
432
- 25,
433
- 204,
434
- 116
435
- ],
436
- "accounts": [
437
- {
438
- "name": "config",
439
- "pda": {
440
- "seeds": [
441
- {
442
- "kind": "const",
443
- "value": [
444
- 99,
445
- 111,
446
- 110,
447
- 102,
448
- 105,
449
- 103
450
- ]
451
- }
452
- ]
453
- }
454
- },
455
- {
456
- "name": "vault",
457
- "writable": true,
458
- "pda": {
459
- "seeds": [
460
- {
461
- "kind": "const",
462
- "value": [
463
- 118,
464
- 97,
465
- 117,
466
- 108,
467
- 116
468
- ]
469
- }
470
- ]
471
- }
472
- },
473
- {
474
- "name": "tss_pda",
475
- "writable": true,
476
- "pda": {
477
- "seeds": [
478
- {
479
- "kind": "const",
480
- "value": [
481
- 116,
482
- 115,
483
- 115
484
- ]
485
- }
486
- ]
487
- }
488
- },
489
- {
490
- "name": "recipient",
491
- "writable": true
492
- },
493
- {
494
- "name": "system_program",
495
- "address": "11111111111111111111111111111111"
496
- }
497
- ],
498
- "args": [
499
- {
500
- "name": "amount",
501
- "type": "u64"
502
- },
503
- {
504
- "name": "revert_cfg",
505
- "type": {
506
- "defined": {
507
- "name": "RevertSettings"
508
- }
509
- }
510
- },
511
- {
512
- "name": "signature",
513
- "type": {
514
- "array": [
515
- "u8",
516
- 64
517
- ]
518
- }
519
- },
520
- {
521
- "name": "recovery_id",
522
- "type": "u8"
523
- },
524
- {
525
- "name": "message_hash",
526
- "type": {
527
- "array": [
528
- "u8",
529
- 32
530
- ]
531
- }
532
- },
533
- {
534
- "name": "nonce",
535
- "type": "u64"
536
- }
537
- ]
538
- },
539
- {
540
- "name": "revert_withdraw_spl_token",
541
- "docs": [
542
- "@notice TSS-verified revert withdraw for SPL tokens"
543
- ],
544
- "discriminator": [
545
- 172,
546
- 155,
547
- 56,
548
- 3,
549
- 92,
550
- 190,
551
- 159,
552
- 191
553
- ],
554
- "accounts": [
555
- {
556
- "name": "config",
557
- "pda": {
558
- "seeds": [
559
- {
560
- "kind": "const",
561
- "value": [
562
- 99,
563
- 111,
564
- 110,
565
- 102,
566
- 105,
567
- 103
568
- ]
569
- }
570
- ]
571
- }
572
- },
573
- {
574
- "name": "whitelist"
575
- },
576
- {
577
- "name": "vault",
578
- "writable": true,
579
- "pda": {
580
- "seeds": [
581
- {
582
- "kind": "const",
583
- "value": [
584
- 118,
585
- 97,
586
- 117,
587
- 108,
588
- 116
589
- ]
590
- }
591
- ]
592
- }
593
- },
594
- {
595
- "name": "token_vault",
596
- "writable": true
597
- },
598
- {
599
- "name": "tss_pda",
600
- "writable": true,
601
- "pda": {
602
- "seeds": [
603
- {
604
- "kind": "const",
605
- "value": [
606
- 116,
607
- 115,
608
- 115
609
- ]
610
- }
611
- ]
612
- }
613
- },
614
- {
615
- "name": "recipient_token_account",
616
- "writable": true
617
- },
618
- {
619
- "name": "token_mint"
620
- },
621
- {
622
- "name": "token_program",
623
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
624
- }
625
- ],
626
- "args": [
627
- {
628
- "name": "amount",
629
- "type": "u64"
630
- },
631
- {
632
- "name": "revert_cfg",
633
- "type": {
634
- "defined": {
635
- "name": "RevertSettings"
636
- }
637
- }
638
- },
639
- {
640
- "name": "signature",
641
- "type": {
642
- "array": [
643
- "u8",
644
- 64
645
- ]
646
- }
647
- },
648
- {
649
- "name": "recovery_id",
650
- "type": "u8"
651
- },
652
- {
653
- "name": "message_hash",
654
- "type": {
655
- "array": [
656
- "u8",
657
- 32
658
- ]
659
- }
660
- },
661
- {
662
- "name": "nonce",
663
- "type": "u64"
664
- }
665
- ]
666
- },
667
- {
668
- "name": "send_funds",
669
- "docs": [
670
- "@notice Allows initiating a TX for movement of funds from source chain to Push Chain.",
671
- "@dev Supports both native SOL and SPL token deposits.",
672
- "The route emits TxWithFunds event."
673
- ],
674
- "discriminator": [
675
- 84,
676
- 247,
677
- 211,
678
- 40,
679
- 63,
680
- 106,
681
- 15,
682
- 59
683
- ],
684
- "accounts": [
685
- {
686
- "name": "config",
687
- "writable": true,
688
- "pda": {
689
- "seeds": [
690
- {
691
- "kind": "const",
692
- "value": [
693
- 99,
694
- 111,
695
- 110,
696
- 102,
697
- 105,
698
- 103
699
- ]
700
- }
701
- ]
702
- }
703
- },
704
- {
705
- "name": "vault",
706
- "writable": true,
707
- "pda": {
708
- "seeds": [
709
- {
710
- "kind": "const",
711
- "value": [
712
- 118,
713
- 97,
714
- 117,
715
- 108,
716
- 116
717
- ]
718
- }
719
- ]
720
- }
721
- },
722
- {
723
- "name": "token_whitelist",
724
- "pda": {
725
- "seeds": [
726
- {
727
- "kind": "const",
728
- "value": [
729
- 119,
730
- 104,
731
- 105,
732
- 116,
733
- 101,
734
- 108,
735
- 105,
736
- 115,
737
- 116
738
- ]
739
- }
740
- ]
741
- }
742
- },
743
- {
744
- "name": "user_token_account",
745
- "writable": true
746
- },
747
- {
748
- "name": "gateway_token_account",
749
- "writable": true
750
- },
751
- {
752
- "name": "user",
753
- "writable": true,
754
- "signer": true
755
- },
756
- {
757
- "name": "bridge_token"
758
- },
759
- {
760
- "name": "token_program",
761
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
762
- },
763
- {
764
- "name": "system_program",
765
- "address": "11111111111111111111111111111111"
766
- }
767
- ],
768
- "args": [
769
- {
770
- "name": "recipient",
771
- "type": "pubkey"
772
- },
773
- {
774
- "name": "bridge_token",
775
- "type": "pubkey"
776
- },
777
- {
778
- "name": "bridge_amount",
779
- "type": "u64"
780
- },
781
- {
782
- "name": "revert_cfg",
783
- "type": {
784
- "defined": {
785
- "name": "RevertSettings"
786
- }
787
- }
788
- }
789
- ]
790
- },
791
- {
792
- "name": "send_funds_native",
793
- "docs": [
794
- "@notice Allows initiating a TX for movement of native SOL from source chain to Push Chain."
795
- ],
796
- "discriminator": [
797
- 245,
798
- 51,
799
- 222,
800
- 185,
801
- 98,
802
- 79,
803
- 40,
804
- 25
805
- ],
806
- "accounts": [
807
- {
808
- "name": "config",
809
- "writable": true,
810
- "pda": {
811
- "seeds": [
812
- {
813
- "kind": "const",
814
- "value": [
815
- 99,
816
- 111,
817
- 110,
818
- 102,
819
- 105,
820
- 103
821
- ]
822
- }
823
- ]
824
- }
825
- },
826
- {
827
- "name": "vault",
828
- "writable": true,
829
- "pda": {
830
- "seeds": [
831
- {
832
- "kind": "const",
833
- "value": [
834
- 118,
835
- 97,
836
- 117,
837
- 108,
838
- 116
839
- ]
840
- }
841
- ]
842
- }
843
- },
844
- {
845
- "name": "user",
846
- "writable": true,
847
- "signer": true
848
- },
849
- {
850
- "name": "system_program",
851
- "address": "11111111111111111111111111111111"
852
- }
853
- ],
854
- "args": [
855
- {
856
- "name": "recipient",
857
- "type": "pubkey"
858
- },
859
- {
860
- "name": "bridge_amount",
861
- "type": "u64"
862
- },
863
- {
864
- "name": "revert_cfg",
865
- "type": {
866
- "defined": {
867
- "name": "RevertSettings"
868
- }
869
- }
870
- }
871
- ]
872
- },
873
- {
874
- "name": "send_tx_with_funds",
875
- "docs": [
876
- "@notice Allows initiating a TX for movement of funds and payload from source chain to Push Chain.",
877
- "@dev Supports both native SOL and SPL token deposits with payload execution.",
878
- "The route emits both TxWithGas and TxWithFunds events."
879
- ],
880
- "discriminator": [
881
- 224,
882
- 179,
883
- 202,
884
- 222,
885
- 121,
886
- 238,
887
- 38,
888
- 168
889
- ],
890
- "accounts": [
891
- {
892
- "name": "config",
893
- "writable": true,
894
- "pda": {
895
- "seeds": [
896
- {
897
- "kind": "const",
898
- "value": [
899
- 99,
900
- 111,
901
- 110,
902
- 102,
903
- 105,
904
- 103
905
- ]
906
- }
907
- ]
908
- }
909
- },
910
- {
911
- "name": "vault",
912
- "writable": true,
913
- "pda": {
914
- "seeds": [
915
- {
916
- "kind": "const",
917
- "value": [
918
- 118,
919
- 97,
920
- 117,
921
- 108,
922
- 116
923
- ]
924
- }
925
- ]
926
- }
927
- },
928
- {
929
- "name": "token_whitelist",
930
- "pda": {
931
- "seeds": [
932
- {
933
- "kind": "const",
934
- "value": [
935
- 119,
936
- 104,
937
- 105,
938
- 116,
939
- 101,
940
- 108,
941
- 105,
942
- 115,
943
- 116
944
- ]
945
- }
946
- ]
947
- }
948
- },
949
- {
950
- "name": "user_token_account",
951
- "writable": true
952
- },
953
- {
954
- "name": "gateway_token_account",
955
- "writable": true
956
- },
957
- {
958
- "name": "user",
959
- "writable": true,
960
- "signer": true
961
- },
962
- {
963
- "name": "price_update"
964
- },
965
- {
966
- "name": "bridge_token"
967
- },
968
- {
969
- "name": "token_program",
970
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
971
- },
972
- {
973
- "name": "system_program",
974
- "address": "11111111111111111111111111111111"
975
- }
976
- ],
977
- "args": [
978
- {
979
- "name": "bridge_token",
980
- "type": "pubkey"
981
- },
982
- {
983
- "name": "bridge_amount",
984
- "type": "u64"
985
- },
986
- {
987
- "name": "payload",
988
- "type": {
989
- "defined": {
990
- "name": "UniversalPayload"
991
- }
992
- }
993
- },
994
- {
995
- "name": "revert_cfg",
996
- "type": {
997
- "defined": {
998
- "name": "RevertSettings"
999
- }
1000
- }
1001
- },
1002
- {
1003
- "name": "gas_amount",
1004
- "type": "u64"
1005
- },
1006
- {
1007
- "name": "signature_data",
1008
- "type": {
1009
- "array": [
1010
- "u8",
1011
- 32
1012
- ]
1013
- }
1014
- }
1015
- ]
1016
- },
1017
- {
1018
- "name": "send_tx_with_gas",
1019
- "docs": [
1020
- "@notice Allows initiating a TX for funding UEA with gas deposits from source chain.",
1021
- "@dev Supports only native SOL deposits for gas funding.",
1022
- "The route emits TxWithGas event - important for Instant TX Route."
1023
- ],
1024
- "discriminator": [
1025
- 220,
1026
- 10,
1027
- 179,
1028
- 127,
1029
- 41,
1030
- 153,
1031
- 193,
1032
- 213
1033
- ],
1034
- "accounts": [
1035
- {
1036
- "name": "config",
1037
- "writable": true,
1038
- "pda": {
1039
- "seeds": [
1040
- {
1041
- "kind": "const",
1042
- "value": [
1043
- 99,
1044
- 111,
1045
- 110,
1046
- 102,
1047
- 105,
1048
- 103
1049
- ]
1050
- }
1051
- ]
1052
- }
1053
- },
1054
- {
1055
- "name": "vault",
1056
- "writable": true,
1057
- "pda": {
1058
- "seeds": [
1059
- {
1060
- "kind": "const",
1061
- "value": [
1062
- 118,
1063
- 97,
1064
- 117,
1065
- 108,
1066
- 116
1067
- ]
1068
- }
1069
- ]
1070
- }
1071
- },
1072
- {
1073
- "name": "user",
1074
- "writable": true,
1075
- "signer": true
1076
- },
1077
- {
1078
- "name": "price_update"
1079
- },
1080
- {
1081
- "name": "system_program",
1082
- "address": "11111111111111111111111111111111"
1083
- }
1084
- ],
1085
- "args": [
1086
- {
1087
- "name": "payload",
1088
- "type": {
1089
- "defined": {
1090
- "name": "UniversalPayload"
1091
- }
1092
- }
1093
- },
1094
- {
1095
- "name": "revert_cfg",
1096
- "type": {
1097
- "defined": {
1098
- "name": "RevertSettings"
1099
- }
1100
- }
1101
- },
1102
- {
1103
- "name": "amount",
1104
- "type": "u64"
1105
- }
1106
- ]
1107
- },
1108
- {
1109
- "name": "set_caps_usd",
1110
- "docs": [
1111
- "@notice Set USD caps"
1112
- ],
1113
- "discriminator": [
1114
- 136,
1115
- 160,
1116
- 17,
1117
- 54,
1118
- 239,
1119
- 108,
1120
- 125,
1121
- 129
1122
- ],
1123
- "accounts": [
1124
- {
1125
- "name": "config",
1126
- "writable": true,
1127
- "pda": {
1128
- "seeds": [
1129
- {
1130
- "kind": "const",
1131
- "value": [
1132
- 99,
1133
- 111,
1134
- 110,
1135
- 102,
1136
- 105,
1137
- 103
1138
- ]
1139
- }
1140
- ]
1141
- }
1142
- },
1143
- {
1144
- "name": "admin",
1145
- "signer": true
1146
- }
1147
- ],
1148
- "args": [
1149
- {
1150
- "name": "min_cap",
1151
- "type": "u128"
1152
- },
1153
- {
1154
- "name": "max_cap",
1155
- "type": "u128"
1156
- }
1157
- ]
1158
- },
1159
- {
1160
- "name": "set_pyth_confidence_threshold",
1161
- "docs": [
1162
- "@notice Set Pyth confidence threshold"
1163
- ],
1164
- "discriminator": [
1165
- 213,
1166
- 69,
1167
- 242,
1168
- 123,
1169
- 122,
1170
- 165,
1171
- 125,
1172
- 21
1173
- ],
1174
- "accounts": [
1175
- {
1176
- "name": "config",
1177
- "writable": true,
1178
- "pda": {
1179
- "seeds": [
1180
- {
1181
- "kind": "const",
1182
- "value": [
1183
- 99,
1184
- 111,
1185
- 110,
1186
- 102,
1187
- 105,
1188
- 103
1189
- ]
1190
- }
1191
- ]
1192
- }
1193
- },
1194
- {
1195
- "name": "admin",
1196
- "signer": true
1197
- }
1198
- ],
1199
- "args": [
1200
- {
1201
- "name": "threshold",
1202
- "type": "u64"
1203
- }
1204
- ]
1205
- },
1206
- {
1207
- "name": "set_pyth_price_feed",
1208
- "docs": [
1209
- "@notice Set Pyth price feed"
1210
- ],
1211
- "discriminator": [
1212
- 202,
1213
- 185,
1214
- 109,
1215
- 150,
1216
- 255,
1217
- 130,
1218
- 210,
1219
- 208
1220
- ],
1221
- "accounts": [
1222
- {
1223
- "name": "config",
1224
- "writable": true,
1225
- "pda": {
1226
- "seeds": [
1227
- {
1228
- "kind": "const",
1229
- "value": [
1230
- 99,
1231
- 111,
1232
- 110,
1233
- 102,
1234
- 105,
1235
- 103
1236
- ]
1237
- }
1238
- ]
1239
- }
1240
- },
1241
- {
1242
- "name": "admin",
1243
- "signer": true
1244
- }
1245
- ],
1246
- "args": [
1247
- {
1248
- "name": "price_feed",
1249
- "type": "pubkey"
1250
- }
1251
- ]
1252
- },
1253
- {
1254
- "name": "set_tss_address",
1255
- "docs": [
1256
- "@notice Set TSS address"
1257
- ],
1258
- "discriminator": [
1259
- 158,
1260
- 254,
1261
- 147,
1262
- 0,
1263
- 154,
1264
- 3,
1265
- 56,
1266
- 50
1267
- ],
1268
- "accounts": [
1269
- {
1270
- "name": "config",
1271
- "writable": true,
1272
- "pda": {
1273
- "seeds": [
1274
- {
1275
- "kind": "const",
1276
- "value": [
1277
- 99,
1278
- 111,
1279
- 110,
1280
- 102,
1281
- 105,
1282
- 103
1283
- ]
1284
- }
1285
- ]
1286
- }
1287
- },
1288
- {
1289
- "name": "admin",
1290
- "signer": true
1291
- }
1292
- ],
1293
- "args": [
1294
- {
1295
- "name": "new_tss",
1296
- "type": "pubkey"
1297
- }
1298
- ]
1299
- },
1300
- {
1301
- "name": "unpause",
1302
- "docs": [
1303
- "@notice Unpause the gateway"
1304
- ],
1305
- "discriminator": [
1306
- 169,
1307
- 144,
1308
- 4,
1309
- 38,
1310
- 10,
1311
- 141,
1312
- 188,
1313
- 255
1314
- ],
1315
- "accounts": [
1316
- {
1317
- "name": "config",
1318
- "writable": true,
1319
- "pda": {
1320
- "seeds": [
1321
- {
1322
- "kind": "const",
1323
- "value": [
1324
- 99,
1325
- 111,
1326
- 110,
1327
- 102,
1328
- 105,
1329
- 103
1330
- ]
1331
- }
1332
- ]
1333
- }
1334
- },
1335
- {
1336
- "name": "pauser",
1337
- "signer": true
1338
- }
1339
- ],
1340
- "args": []
1341
- },
1342
- {
1343
- "name": "update_tss",
1344
- "discriminator": [
1345
- 227,
1346
- 136,
1347
- 3,
1348
- 242,
1349
- 177,
1350
- 168,
1351
- 10,
1352
- 160
1353
- ],
1354
- "accounts": [
1355
- {
1356
- "name": "tss_pda",
1357
- "writable": true,
1358
- "pda": {
1359
- "seeds": [
1360
- {
1361
- "kind": "const",
1362
- "value": [
1363
- 116,
1364
- 115,
1365
- 115
1366
- ]
1367
- }
1368
- ]
1369
- }
1370
- },
1371
- {
1372
- "name": "authority",
1373
- "signer": true
1374
- }
1375
- ],
1376
- "args": [
1377
- {
1378
- "name": "tss_eth_address",
1379
- "type": {
1380
- "array": [
1381
- "u8",
1382
- 20
1383
- ]
1384
- }
1385
- },
1386
- {
1387
- "name": "chain_id",
1388
- "type": "u64"
1389
- }
1390
- ]
1391
- },
1392
- {
1393
- "name": "whitelist_token",
1394
- "docs": [
1395
- "@notice Whitelist a token"
1396
- ],
1397
- "discriminator": [
1398
- 6,
1399
- 141,
1400
- 83,
1401
- 167,
1402
- 31,
1403
- 6,
1404
- 2,
1405
- 224
1406
- ],
1407
- "accounts": [
1408
- {
1409
- "name": "config",
1410
- "writable": true,
1411
- "pda": {
1412
- "seeds": [
1413
- {
1414
- "kind": "const",
1415
- "value": [
1416
- 99,
1417
- 111,
1418
- 110,
1419
- 102,
1420
- 105,
1421
- 103
1422
- ]
1423
- }
1424
- ]
1425
- }
1426
- },
1427
- {
1428
- "name": "whitelist",
1429
- "writable": true,
1430
- "pda": {
1431
- "seeds": [
1432
- {
1433
- "kind": "const",
1434
- "value": [
1435
- 119,
1436
- 104,
1437
- 105,
1438
- 116,
1439
- 101,
1440
- 108,
1441
- 105,
1442
- 115,
1443
- 116
1444
- ]
1445
- }
1446
- ]
1447
- }
1448
- },
1449
- {
1450
- "name": "admin",
1451
- "writable": true,
1452
- "signer": true
1453
- },
1454
- {
1455
- "name": "system_program",
1456
- "address": "11111111111111111111111111111111"
1457
- }
1458
- ],
1459
- "args": [
1460
- {
1461
- "name": "token",
1462
- "type": "pubkey"
1463
- }
1464
- ]
1465
- },
1466
- {
1467
- "name": "withdraw_spl_token_tss",
1468
- "docs": [
1469
- "@notice TSS-verified withdraw of SPL tokens"
1470
- ],
1471
- "discriminator": [
1472
- 238,
1473
- 209,
1474
- 47,
1475
- 229,
1476
- 44,
1477
- 234,
1478
- 138,
1479
- 198
1480
- ],
1481
- "accounts": [
1482
- {
1483
- "name": "config",
1484
- "pda": {
1485
- "seeds": [
1486
- {
1487
- "kind": "const",
1488
- "value": [
1489
- 99,
1490
- 111,
1491
- 110,
1492
- 102,
1493
- 105,
1494
- 103
1495
- ]
1496
- }
1497
- ]
1498
- }
1499
- },
1500
- {
1501
- "name": "whitelist"
1502
- },
1503
- {
1504
- "name": "vault",
1505
- "writable": true,
1506
- "pda": {
1507
- "seeds": [
1508
- {
1509
- "kind": "const",
1510
- "value": [
1511
- 118,
1512
- 97,
1513
- 117,
1514
- 108,
1515
- 116
1516
- ]
1517
- }
1518
- ]
1519
- }
1520
- },
1521
- {
1522
- "name": "token_vault",
1523
- "writable": true
1524
- },
1525
- {
1526
- "name": "tss_pda",
1527
- "writable": true,
1528
- "pda": {
1529
- "seeds": [
1530
- {
1531
- "kind": "const",
1532
- "value": [
1533
- 116,
1534
- 115,
1535
- 115
1536
- ]
1537
- }
1538
- ]
1539
- }
1540
- },
1541
- {
1542
- "name": "recipient_token_account",
1543
- "writable": true
1544
- },
1545
- {
1546
- "name": "token_mint"
1547
- },
1548
- {
1549
- "name": "token_program",
1550
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1551
- }
1552
- ],
1553
- "args": [
1554
- {
1555
- "name": "amount",
1556
- "type": "u64"
1557
- },
1558
- {
1559
- "name": "signature",
1560
- "type": {
1561
- "array": [
1562
- "u8",
1563
- 64
1564
- ]
1565
- }
1566
- },
1567
- {
1568
- "name": "recovery_id",
1569
- "type": "u8"
1570
- },
1571
- {
1572
- "name": "message_hash",
1573
- "type": {
1574
- "array": [
1575
- "u8",
1576
- 32
1577
- ]
1578
- }
1579
- },
1580
- {
1581
- "name": "nonce",
1582
- "type": "u64"
1583
- }
1584
- ]
1585
- },
1586
- {
1587
- "name": "withdraw_tss",
1588
- "docs": [
1589
- "@notice TSS-verified withdraw of native SOL"
1590
- ],
1591
- "discriminator": [
1592
- 112,
1593
- 51,
1594
- 93,
1595
- 250,
1596
- 136,
1597
- 175,
1598
- 118,
1599
- 100
1600
- ],
1601
- "accounts": [
1602
- {
1603
- "name": "config",
1604
- "pda": {
1605
- "seeds": [
1606
- {
1607
- "kind": "const",
1608
- "value": [
1609
- 99,
1610
- 111,
1611
- 110,
1612
- 102,
1613
- 105,
1614
- 103
1615
- ]
1616
- }
1617
- ]
1618
- }
1619
- },
1620
- {
1621
- "name": "vault",
1622
- "writable": true,
1623
- "pda": {
1624
- "seeds": [
1625
- {
1626
- "kind": "const",
1627
- "value": [
1628
- 118,
1629
- 97,
1630
- 117,
1631
- 108,
1632
- 116
1633
- ]
1634
- }
1635
- ]
1636
- }
1637
- },
1638
- {
1639
- "name": "tss_pda",
1640
- "writable": true,
1641
- "pda": {
1642
- "seeds": [
1643
- {
1644
- "kind": "const",
1645
- "value": [
1646
- 116,
1647
- 115,
1648
- 115
1649
- ]
1650
- }
1651
- ]
1652
- }
1653
- },
1654
- {
1655
- "name": "recipient",
1656
- "writable": true
1657
- },
1658
- {
1659
- "name": "system_program",
1660
- "address": "11111111111111111111111111111111"
1661
- }
1662
- ],
1663
- "args": [
1664
- {
1665
- "name": "amount",
1666
- "type": "u64"
1667
- },
1668
- {
1669
- "name": "signature",
1670
- "type": {
1671
- "array": [
1672
- "u8",
1673
- 64
1674
- ]
1675
- }
1676
- },
1677
- {
1678
- "name": "recovery_id",
1679
- "type": "u8"
1680
- },
1681
- {
1682
- "name": "message_hash",
1683
- "type": {
1684
- "array": [
1685
- "u8",
1686
- 32
1687
- ]
1688
- }
1689
- },
1690
- {
1691
- "name": "nonce",
1692
- "type": "u64"
1693
- }
1694
- ]
1695
- }
1696
- ],
1697
- "accounts": [
1698
- {
1699
- "name": "Config",
1700
- "discriminator": [
1701
- 155,
1702
- 12,
1703
- 170,
1704
- 224,
1705
- 30,
1706
- 250,
1707
- 204,
1708
- 130
1709
- ]
1710
- },
1711
- {
1712
- "name": "PriceUpdateV2",
1713
- "discriminator": [
1714
- 34,
1715
- 241,
1716
- 35,
1717
- 99,
1718
- 157,
1719
- 126,
1720
- 244,
1721
- 205
1722
- ]
1723
- },
1724
- {
1725
- "name": "TokenWhitelist",
1726
- "discriminator": [
1727
- 105,
1728
- 240,
1729
- 104,
1730
- 47,
1731
- 95,
1732
- 13,
1733
- 48,
1734
- 78
1735
- ]
1736
- },
1737
- {
1738
- "name": "TssPda",
1739
- "discriminator": [
1740
- 121,
1741
- 138,
1742
- 162,
1743
- 251,
1744
- 127,
1745
- 95,
1746
- 238,
1747
- 135
1748
- ]
1749
- }
1750
- ],
1751
- "events": [
1752
- {
1753
- "name": "CapsUpdated",
1754
- "discriminator": [
1755
- 147,
1756
- 181,
1757
- 117,
1758
- 249,
1759
- 72,
1760
- 147,
1761
- 156,
1762
- 255
1763
- ]
1764
- },
1765
- {
1766
- "name": "FundsAddedEvent",
1767
- "discriminator": [
1768
- 127,
1769
- 31,
1770
- 108,
1771
- 255,
1772
- 187,
1773
- 19,
1774
- 70,
1775
- 68
1776
- ]
1777
- },
1778
- {
1779
- "name": "TSSAddressUpdated",
1780
- "discriminator": [
1781
- 157,
1782
- 148,
1783
- 149,
1784
- 250,
1785
- 42,
1786
- 118,
1787
- 17,
1788
- 232
1789
- ]
1790
- },
1791
- {
1792
- "name": "TokenRemovedFromWhitelist",
1793
- "discriminator": [
1794
- 200,
1795
- 69,
1796
- 55,
1797
- 209,
1798
- 167,
1799
- 225,
1800
- 117,
1801
- 11
1802
- ]
1803
- },
1804
- {
1805
- "name": "TokenWhitelisted",
1806
- "discriminator": [
1807
- 65,
1808
- 3,
1809
- 231,
1810
- 165,
1811
- 235,
1812
- 116,
1813
- 154,
1814
- 51
1815
- ]
1816
- },
1817
- {
1818
- "name": "TxWithFunds",
1819
- "discriminator": [
1820
- 43,
1821
- 31,
1822
- 31,
1823
- 2,
1824
- 4,
1825
- 236,
1826
- 107,
1827
- 255
1828
- ]
1829
- },
1830
- {
1831
- "name": "TxWithGas",
1832
- "discriminator": [
1833
- 182,
1834
- 110,
1835
- 243,
1836
- 17,
1837
- 145,
1838
- 36,
1839
- 153,
1840
- 15
1841
- ]
1842
- },
1843
- {
1844
- "name": "WithdrawFunds",
1845
- "discriminator": [
1846
- 4,
1847
- 77,
1848
- 4,
1849
- 28,
1850
- 115,
1851
- 6,
1852
- 39,
1853
- 233
1854
- ]
1855
- }
1856
- ],
1857
- "errors": [
1858
- {
1859
- "code": 6000,
1860
- "name": "PausedError",
1861
- "msg": "Contract is paused"
1862
- },
1863
- {
1864
- "code": 6001,
1865
- "name": "Unauthorized",
1866
- "msg": "Unauthorized access"
1867
- },
1868
- {
1869
- "code": 6002,
1870
- "name": "InvalidAmount",
1871
- "msg": "Invalid amount"
1872
- },
1873
- {
1874
- "code": 6003,
1875
- "name": "InvalidRecipient",
1876
- "msg": "Invalid recipient"
1877
- },
1878
- {
1879
- "code": 6004,
1880
- "name": "BelowMinCap",
1881
- "msg": "Amount below minimum cap"
1882
- },
1883
- {
1884
- "code": 6005,
1885
- "name": "AboveMaxCap",
1886
- "msg": "Amount above maximum cap"
1887
- },
1888
- {
1889
- "code": 6006,
1890
- "name": "ZeroAddress",
1891
- "msg": "Zero address not allowed"
1892
- },
1893
- {
1894
- "code": 6007,
1895
- "name": "InvalidCapRange",
1896
- "msg": "Invalid cap range"
1897
- },
1898
- {
1899
- "code": 6008,
1900
- "name": "InvalidPayload",
1901
- "msg": "Invalid payload"
1902
- },
1903
- {
1904
- "code": 6009,
1905
- "name": "DeadlineExceeded",
1906
- "msg": "Deadline exceeded"
1907
- },
1908
- {
1909
- "code": 6010,
1910
- "name": "InvalidPrice",
1911
- "msg": "Invalid price data"
1912
- },
1913
- {
1914
- "code": 6011,
1915
- "name": "TokenAlreadyWhitelisted",
1916
- "msg": "Token already whitelisted"
1917
- },
1918
- {
1919
- "code": 6012,
1920
- "name": "TokenNotWhitelisted",
1921
- "msg": "Token not whitelisted"
1922
- },
1923
- {
1924
- "code": 6013,
1925
- "name": "TokenTransferFailed",
1926
- "msg": "Token transfer failed"
1927
- },
1928
- {
1929
- "code": 6014,
1930
- "name": "InvalidTokenVault",
1931
- "msg": "Invalid token vault"
1932
- },
1933
- {
1934
- "code": 6015,
1935
- "name": "InvalidOwner",
1936
- "msg": "Invalid owner"
1937
- },
1938
- {
1939
- "code": 6016,
1940
- "name": "SlippageExceededOrExpired",
1941
- "msg": "Slippage exceeded or expired"
1942
- },
1943
- {
1944
- "code": 6017,
1945
- "name": "Paused",
1946
- "msg": "Contract is paused"
1947
- },
1948
- {
1949
- "code": 6018,
1950
- "name": "InvalidInput",
1951
- "msg": "Invalid input"
1952
- },
1953
- {
1954
- "code": 6019,
1955
- "name": "InvalidMint",
1956
- "msg": "Invalid mint"
1957
- },
1958
- {
1959
- "code": 6020,
1960
- "name": "InsufficientBalance",
1961
- "msg": "Insufficient balance"
1962
- },
1963
- {
1964
- "code": 6021,
1965
- "name": "InvalidToken",
1966
- "msg": "Invalid token"
1967
- }
1968
- ],
1969
- "types": [
1970
- {
1971
- "name": "CapsUpdated",
1972
- "type": {
1973
- "kind": "struct",
1974
- "fields": [
1975
- {
1976
- "name": "min_cap_usd",
1977
- "type": "u128"
1978
- },
1979
- {
1980
- "name": "max_cap_usd",
1981
- "type": "u128"
1982
- }
1983
- ]
1984
- }
1985
- },
1986
- {
1987
- "name": "Config",
1988
- "docs": [
1989
- "Gateway configuration state (authorities, caps, oracle).",
1990
- "PDA: `[b\"config\"]`. Holds USD caps (8 decimals) for gas-route deposits and oracle config."
1991
- ],
1992
- "type": {
1993
- "kind": "struct",
1994
- "fields": [
1995
- {
1996
- "name": "admin",
1997
- "type": "pubkey"
1998
- },
1999
- {
2000
- "name": "tss_address",
2001
- "type": "pubkey"
2002
- },
2003
- {
2004
- "name": "pauser",
2005
- "type": "pubkey"
2006
- },
2007
- {
2008
- "name": "min_cap_universal_tx_usd",
2009
- "type": "u128"
2010
- },
2011
- {
2012
- "name": "max_cap_universal_tx_usd",
2013
- "type": "u128"
2014
- },
2015
- {
2016
- "name": "paused",
2017
- "type": "bool"
2018
- },
2019
- {
2020
- "name": "bump",
2021
- "type": "u8"
2022
- },
2023
- {
2024
- "name": "vault_bump",
2025
- "type": "u8"
2026
- },
2027
- {
2028
- "name": "pyth_price_feed",
2029
- "type": "pubkey"
2030
- },
2031
- {
2032
- "name": "pyth_confidence_threshold",
2033
- "type": "u64"
2034
- }
2035
- ]
2036
- }
2037
- },
2038
- {
2039
- "name": "FundsAddedEvent",
2040
- "docs": [
2041
- "Legacy event for fee-abstraction route (locker-compatible).",
2042
- "Matches `pushsolanalocker` `FundsAddedEvent` exactly for offchain compatibility."
2043
- ],
2044
- "type": {
2045
- "kind": "struct",
2046
- "fields": [
2047
- {
2048
- "name": "user",
2049
- "type": "pubkey"
2050
- },
2051
- {
2052
- "name": "sol_amount",
2053
- "type": "u64"
2054
- },
2055
- {
2056
- "name": "usd_equivalent",
2057
- "type": "i128"
2058
- },
2059
- {
2060
- "name": "usd_exponent",
2061
- "type": "i32"
2062
- },
2063
- {
2064
- "name": "transaction_hash",
2065
- "type": {
2066
- "array": [
2067
- "u8",
2068
- 32
2069
- ]
2070
- }
2071
- }
2072
- ]
2073
- }
2074
- },
2075
- {
2076
- "name": "PriceData",
2077
- "type": {
2078
- "kind": "struct",
2079
- "fields": [
2080
- {
2081
- "name": "price",
2082
- "type": "i64"
2083
- },
2084
- {
2085
- "name": "exponent",
2086
- "type": "i32"
2087
- },
2088
- {
2089
- "name": "publish_time",
2090
- "type": "i64"
2091
- },
2092
- {
2093
- "name": "confidence",
2094
- "type": "u64"
2095
- }
2096
- ]
2097
- }
2098
- },
2099
- {
2100
- "name": "PriceFeedMessage",
2101
- "repr": {
2102
- "kind": "c"
2103
- },
2104
- "type": {
2105
- "kind": "struct",
2106
- "fields": [
2107
- {
2108
- "name": "feed_id",
2109
- "docs": [
2110
- "`FeedId` but avoid the type alias because of compatibility issues with Anchor's `idl-build` feature."
2111
- ],
2112
- "type": {
2113
- "array": [
2114
- "u8",
2115
- 32
2116
- ]
2117
- }
2118
- },
2119
- {
2120
- "name": "price",
2121
- "type": "i64"
2122
- },
2123
- {
2124
- "name": "conf",
2125
- "type": "u64"
2126
- },
2127
- {
2128
- "name": "exponent",
2129
- "type": "i32"
2130
- },
2131
- {
2132
- "name": "publish_time",
2133
- "docs": [
2134
- "The timestamp of this price update in seconds"
2135
- ],
2136
- "type": "i64"
2137
- },
2138
- {
2139
- "name": "prev_publish_time",
2140
- "docs": [
2141
- "The timestamp of the previous price update. This field is intended to allow users to",
2142
- "identify the single unique price update for any moment in time:",
2143
- "for any time t, the unique update is the one such that prev_publish_time < t <= publish_time.",
2144
- "",
2145
- "Note that there may not be such an update while we are migrating to the new message-sending logic,",
2146
- "as some price updates on pythnet may not be sent to other chains (because the message-sending",
2147
- "logic may not have triggered). We can solve this problem by making the message-sending mandatory",
2148
- "(which we can do once publishers have migrated over).",
2149
- "",
2150
- "Additionally, this field may be equal to publish_time if the message is sent on a slot where",
2151
- "where the aggregation was unsuccesful. This problem will go away once all publishers have",
2152
- "migrated over to a recent version of pyth-agent."
2153
- ],
2154
- "type": "i64"
2155
- },
2156
- {
2157
- "name": "ema_price",
2158
- "type": "i64"
2159
- },
2160
- {
2161
- "name": "ema_conf",
2162
- "type": "u64"
2163
- }
2164
- ]
2165
- }
2166
- },
2167
- {
2168
- "name": "PriceUpdateV2",
2169
- "docs": [
2170
- "A price update account. This account is used by the Pyth Receiver program to store a verified price update from a Pyth price feed.",
2171
- "It contains:",
2172
- "- `write_authority`: The write authority for this account. This authority can close this account to reclaim rent or update the account to contain a different price update.",
2173
- "- `verification_level`: The [`VerificationLevel`] of this price update. This represents how many Wormhole guardian signatures have been verified for this price update.",
2174
- "- `price_message`: The actual price update.",
2175
- "- `posted_slot`: The slot at which this price update was posted."
2176
- ],
2177
- "type": {
2178
- "kind": "struct",
2179
- "fields": [
2180
- {
2181
- "name": "write_authority",
2182
- "type": "pubkey"
2183
- },
2184
- {
2185
- "name": "verification_level",
2186
- "type": {
2187
- "defined": {
2188
- "name": "VerificationLevel"
2189
- }
2190
- }
2191
- },
2192
- {
2193
- "name": "price_message",
2194
- "type": {
2195
- "defined": {
2196
- "name": "PriceFeedMessage"
2197
- }
2198
- }
2199
- },
2200
- {
2201
- "name": "posted_slot",
2202
- "type": "u64"
2203
- }
2204
- ]
2205
- }
2206
- },
2207
- {
2208
- "name": "RevertSettings",
2209
- "docs": [
2210
- "Revert settings for failed transactions (parity with EVM `RevertSettings`)."
2211
- ],
2212
- "type": {
2213
- "kind": "struct",
2214
- "fields": [
2215
- {
2216
- "name": "fund_recipient",
2217
- "type": "pubkey"
2218
- },
2219
- {
2220
- "name": "revert_msg",
2221
- "type": "bytes"
2222
- }
2223
- ]
2224
- }
2225
- },
2226
- {
2227
- "name": "TSSAddressUpdated",
2228
- "type": {
2229
- "kind": "struct",
2230
- "fields": [
2231
- {
2232
- "name": "old_tss",
2233
- "type": "pubkey"
2234
- },
2235
- {
2236
- "name": "new_tss",
2237
- "type": "pubkey"
2238
- }
2239
- ]
2240
- }
2241
- },
2242
- {
2243
- "name": "TokenRemovedFromWhitelist",
2244
- "type": {
2245
- "kind": "struct",
2246
- "fields": [
2247
- {
2248
- "name": "token_address",
2249
- "type": "pubkey"
2250
- }
2251
- ]
2252
- }
2253
- },
2254
- {
2255
- "name": "TokenWhitelist",
2256
- "docs": [
2257
- "SPL token whitelist state.",
2258
- "PDA: `[b\"whitelist\"]`. Simple list of supported SPL mints."
2259
- ],
2260
- "type": {
2261
- "kind": "struct",
2262
- "fields": [
2263
- {
2264
- "name": "tokens",
2265
- "type": {
2266
- "vec": "pubkey"
2267
- }
2268
- },
2269
- {
2270
- "name": "bump",
2271
- "type": "u8"
2272
- }
2273
- ]
2274
- }
2275
- },
2276
- {
2277
- "name": "TokenWhitelisted",
2278
- "type": {
2279
- "kind": "struct",
2280
- "fields": [
2281
- {
2282
- "name": "token_address",
2283
- "type": "pubkey"
2284
- }
2285
- ]
2286
- }
2287
- },
2288
- {
2289
- "name": "TssPda",
2290
- "docs": [
2291
- "TSS state PDA for ECDSA verification (Ethereum-style secp256k1).",
2292
- "Stores 20-byte ETH address, chain id, and replay-protection nonce."
2293
- ],
2294
- "type": {
2295
- "kind": "struct",
2296
- "fields": [
2297
- {
2298
- "name": "tss_eth_address",
2299
- "type": {
2300
- "array": [
2301
- "u8",
2302
- 20
2303
- ]
2304
- }
2305
- },
2306
- {
2307
- "name": "chain_id",
2308
- "type": "u64"
2309
- },
2310
- {
2311
- "name": "nonce",
2312
- "type": "u64"
2313
- },
2314
- {
2315
- "name": "authority",
2316
- "type": "pubkey"
2317
- },
2318
- {
2319
- "name": "bump",
2320
- "type": "u8"
2321
- }
2322
- ]
2323
- }
2324
- },
2325
- {
2326
- "name": "TxType",
2327
- "docs": [
2328
- "Transaction types matching the EVM Universal Gateway `TX_TYPE`.",
2329
- "Kept 1:1 for relayer/event parity with the EVM implementation."
2330
- ],
2331
- "type": {
2332
- "kind": "enum",
2333
- "variants": [
2334
- {
2335
- "name": "Gas"
2336
- },
2337
- {
2338
- "name": "GasAndPayload"
2339
- },
2340
- {
2341
- "name": "Funds"
2342
- },
2343
- {
2344
- "name": "FundsAndPayload"
2345
- }
2346
- ]
2347
- }
2348
- },
2349
- {
2350
- "name": "TxWithFunds",
2351
- "docs": [
2352
- "FUNDS deposit event (parity with EVM `TxWithFunds`). Emitted for FUNDS-only and FUNDS+PAYLOAD routes."
2353
- ],
2354
- "type": {
2355
- "kind": "struct",
2356
- "fields": [
2357
- {
2358
- "name": "sender",
2359
- "type": "pubkey"
2360
- },
2361
- {
2362
- "name": "recipient",
2363
- "type": "pubkey"
2364
- },
2365
- {
2366
- "name": "bridge_amount",
2367
- "type": "u64"
2368
- },
2369
- {
2370
- "name": "gas_amount",
2371
- "type": "u64"
2372
- },
2373
- {
2374
- "name": "bridge_token",
2375
- "type": "pubkey"
2376
- },
2377
- {
2378
- "name": "data",
2379
- "type": "bytes"
2380
- },
2381
- {
2382
- "name": "revert_cfg",
2383
- "type": {
2384
- "defined": {
2385
- "name": "RevertSettings"
2386
- }
2387
- }
2388
- },
2389
- {
2390
- "name": "tx_type",
2391
- "type": {
2392
- "defined": {
2393
- "name": "TxType"
2394
- }
2395
- }
2396
- },
2397
- {
2398
- "name": "signature_data",
2399
- "type": {
2400
- "array": [
2401
- "u8",
2402
- 32
2403
- ]
2404
- }
2405
- }
2406
- ]
2407
- }
2408
- },
2409
- {
2410
- "name": "TxWithGas",
2411
- "docs": [
2412
- "GAS deposit event (parity with EVM `TxWithGas`). Emitted for gas funding on both GAS and GAS+PAYLOAD routes."
2413
- ],
2414
- "type": {
2415
- "kind": "struct",
2416
- "fields": [
2417
- {
2418
- "name": "sender",
2419
- "type": "pubkey"
2420
- },
2421
- {
2422
- "name": "payload_hash",
2423
- "type": {
2424
- "array": [
2425
- "u8",
2426
- 32
2427
- ]
2428
- }
2429
- },
2430
- {
2431
- "name": "native_token_deposited",
2432
- "type": "u64"
2433
- },
2434
- {
2435
- "name": "revert_cfg",
2436
- "type": {
2437
- "defined": {
2438
- "name": "RevertSettings"
2439
- }
2440
- }
2441
- },
2442
- {
2443
- "name": "tx_type",
2444
- "type": {
2445
- "defined": {
2446
- "name": "TxType"
2447
- }
2448
- }
2449
- }
2450
- ]
2451
- }
2452
- },
2453
- {
2454
- "name": "UniversalPayload",
2455
- "docs": [
2456
- "Universal payload for cross-chain execution (parity with EVM `UniversalPayload`).",
2457
- "Serialized and hashed for event parity with EVM (payload bytes/hash)."
2458
- ],
2459
- "type": {
2460
- "kind": "struct",
2461
- "fields": [
2462
- {
2463
- "name": "to",
2464
- "type": "pubkey"
2465
- },
2466
- {
2467
- "name": "value",
2468
- "type": "u64"
2469
- },
2470
- {
2471
- "name": "data",
2472
- "type": "bytes"
2473
- },
2474
- {
2475
- "name": "gas_limit",
2476
- "type": "u64"
2477
- },
2478
- {
2479
- "name": "max_fee_per_gas",
2480
- "type": "u64"
2481
- },
2482
- {
2483
- "name": "max_priority_fee_per_gas",
2484
- "type": "u64"
2485
- },
2486
- {
2487
- "name": "nonce",
2488
- "type": "u64"
2489
- },
2490
- {
2491
- "name": "deadline",
2492
- "type": "i64"
2493
- },
2494
- {
2495
- "name": "v_type",
2496
- "type": {
2497
- "defined": {
2498
- "name": "VerificationType"
2499
- }
2500
- }
2501
- }
2502
- ]
2503
- }
2504
- },
2505
- {
2506
- "name": "VerificationLevel",
2507
- "docs": [
2508
- "Pyth price updates are bridged to all blockchains via Wormhole.",
2509
- "Using the price updates on another chain requires verifying the signatures of the Wormhole guardians.",
2510
- "The usual process is to check the signatures for two thirds of the total number of guardians, but this can be cumbersome on Solana because of the transaction size limits,",
2511
- "so we also allow for partial verification.",
2512
- "",
2513
- "This enum represents how much a price update has been verified:",
2514
- "- If `Full`, we have verified the signatures for two thirds of the current guardians.",
2515
- "- If `Partial`, only `num_signatures` guardian signatures have been checked.",
2516
- "",
2517
- "# Warning",
2518
- "Using partially verified price updates is dangerous, as it lowers the threshold of guardians that need to collude to produce a malicious price update."
2519
- ],
2520
- "type": {
2521
- "kind": "enum",
2522
- "variants": [
2523
- {
2524
- "name": "Partial",
2525
- "fields": [
2526
- {
2527
- "name": "num_signatures",
2528
- "type": "u8"
2529
- }
2530
- ]
2531
- },
2532
- {
2533
- "name": "Full"
2534
- }
2535
- ]
2536
- }
2537
- },
2538
- {
2539
- "name": "VerificationType",
2540
- "docs": [
2541
- "Verification types for payload execution (parity with EVM)."
2542
- ],
2543
- "type": {
2544
- "kind": "enum",
2545
- "variants": [
2546
- {
2547
- "name": "SignedVerification"
2548
- },
2549
- {
2550
- "name": "UniversalTxVerification"
2551
- }
2552
- ]
2553
- }
2554
- },
2555
- {
2556
- "name": "WithdrawFunds",
2557
- "docs": [
2558
- "Withdraw event (parity with EVM `WithdrawFunds`)."
2559
- ],
2560
- "type": {
2561
- "kind": "struct",
2562
- "fields": [
2563
- {
2564
- "name": "recipient",
2565
- "type": "pubkey"
2566
- },
2567
- {
2568
- "name": "amount",
2569
- "type": "u64"
2570
- },
2571
- {
2572
- "name": "token",
2573
- "type": "pubkey"
2574
- }
2575
- ]
2576
- }
2577
- }
2578
- ]
2579
- }
1
+ { "address": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", "metadata": { "name": "pushsolanagateway", "version": "0.1.0", "spec": "0.1.0", "description": "Push Solana Gateway - Universal Gateway for Solana" }, "instructions": [{ "name": "add_funds", "docs": ["@notice Legacy-compatible add funds event for offchain relayers (pushsolanalocker)"], "discriminator": [132, 237, 76, 57, 80, 10, 179, 138], "accounts": [{ "name": "config", "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "vault", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }] } }, { "name": "user", "writable": true, "signer": true }, { "name": "price_update" }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "amount", "type": "u64" }, { "name": "transaction_hash", "type": { "array": ["u8", 32] } }] }, { "name": "get_sol_price", "docs": ["@notice View function for SOL price (locker-compatible)", "@dev Anyone can fetch SOL price in USD"], "discriminator": [230, 145, 206, 175, 43, 184, 97, 110], "accounts": [{ "name": "price_update" }], "args": [], "returns": { "defined": { "name": "PriceData" } } }, { "name": "init_tss", "discriminator": [47, 31, 100, 111, 115, 2, 22, 208], "accounts": [{ "name": "tss_pda", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] } }, { "name": "authority", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "tss_eth_address", "type": { "array": ["u8", 20] } }, { "name": "chain_id", "type": "u64" }] }, { "name": "initialize", "docs": ["@notice Initialize the gateway"], "discriminator": [175, 175, 109, 31, 13, 152, 155, 237], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "vault", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }] } }, { "name": "admin", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "admin", "type": "pubkey" }, { "name": "pauser", "type": "pubkey" }, { "name": "tss", "type": "pubkey" }, { "name": "min_cap_usd", "type": "u128" }, { "name": "max_cap_usd", "type": "u128" }, { "name": "pyth_price_feed", "type": "pubkey" }] }, { "name": "pause", "docs": ["@notice Pause the gateway"], "discriminator": [211, 22, 221, 251, 74, 121, 193, 47], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "pauser", "signer": true }], "args": [] }, { "name": "remove_whitelist_token", "docs": ["@notice Remove token from whitelist"], "discriminator": [65, 182, 42, 255, 198, 163, 73, 46], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "whitelist", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [119, 104, 105, 116, 101, 108, 105, 115, 116] }] } }, { "name": "admin", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "token", "type": "pubkey" }] }, { "name": "reset_nonce", "discriminator": [104, 139, 110, 85, 234, 155, 132, 248], "accounts": [{ "name": "tss_pda", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] } }, { "name": "authority", "signer": true }], "args": [{ "name": "new_nonce", "type": "u64" }] }, { "name": "revert_withdraw", "docs": ["@notice TSS-verified revert withdraw for SOL"], "discriminator": [8, 232, 107, 216, 153, 25, 204, 116], "accounts": [{ "name": "config", "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "vault", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }] } }, { "name": "tss_pda", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] } }, { "name": "recipient", "writable": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "amount", "type": "u64" }, { "name": "revert_cfg", "type": { "defined": { "name": "RevertSettings" } } }, { "name": "signature", "type": { "array": ["u8", 64] } }, { "name": "recovery_id", "type": "u8" }, { "name": "message_hash", "type": { "array": ["u8", 32] } }, { "name": "nonce", "type": "u64" }] }, { "name": "revert_withdraw_spl_token", "docs": ["@notice TSS-verified revert withdraw for SPL tokens"], "discriminator": [172, 155, 56, 3, 92, 190, 159, 191], "accounts": [{ "name": "config", "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "whitelist" }, { "name": "vault", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }] } }, { "name": "token_vault", "writable": true }, { "name": "tss_pda", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] } }, { "name": "recipient_token_account", "writable": true }, { "name": "token_mint" }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }], "args": [{ "name": "amount", "type": "u64" }, { "name": "revert_cfg", "type": { "defined": { "name": "RevertSettings" } } }, { "name": "signature", "type": { "array": ["u8", 64] } }, { "name": "recovery_id", "type": "u8" }, { "name": "message_hash", "type": { "array": ["u8", 32] } }, { "name": "nonce", "type": "u64" }] }, { "name": "send_funds", "docs": ["@notice Allows initiating a TX for movement of funds from source chain to Push Chain.", "@dev Supports both native SOL and SPL token deposits.", "The route emits TxWithFunds event."], "discriminator": [84, 247, 211, 40, 63, 106, 15, 59], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "vault", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }] } }, { "name": "token_whitelist", "pda": { "seeds": [{ "kind": "const", "value": [119, 104, 105, 116, 101, 108, 105, 115, 116] }] } }, { "name": "user_token_account", "writable": true }, { "name": "gateway_token_account", "writable": true }, { "name": "user", "writable": true, "signer": true }, { "name": "bridge_token" }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "recipient", "type": "pubkey" }, { "name": "bridge_token", "type": "pubkey" }, { "name": "bridge_amount", "type": "u64" }, { "name": "revert_cfg", "type": { "defined": { "name": "RevertSettings" } } }] }, { "name": "send_funds_native", "docs": ["@notice Allows initiating a TX for movement of native SOL from source chain to Push Chain."], "discriminator": [245, 51, 222, 185, 98, 79, 40, 25], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "vault", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }] } }, { "name": "user", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "recipient", "type": "pubkey" }, { "name": "bridge_amount", "type": "u64" }, { "name": "revert_cfg", "type": { "defined": { "name": "RevertSettings" } } }] }, { "name": "send_tx_with_funds", "docs": ["@notice Allows initiating a TX for movement of funds and payload from source chain to Push Chain.", "@dev Supports both native SOL and SPL token deposits with payload execution.", "The route emits both TxWithGas and TxWithFunds events."], "discriminator": [224, 179, 202, 222, 121, 238, 38, 168], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "vault", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }] } }, { "name": "token_whitelist", "pda": { "seeds": [{ "kind": "const", "value": [119, 104, 105, 116, 101, 108, 105, 115, 116] }] } }, { "name": "user_token_account", "writable": true }, { "name": "gateway_token_account", "writable": true }, { "name": "user", "writable": true, "signer": true }, { "name": "price_update" }, { "name": "bridge_token" }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "bridge_token", "type": "pubkey" }, { "name": "bridge_amount", "type": "u64" }, { "name": "payload", "type": { "defined": { "name": "UniversalPayload" } } }, { "name": "revert_cfg", "type": { "defined": { "name": "RevertSettings" } } }, { "name": "gas_amount", "type": "u64" }, { "name": "signature_data", "type": { "array": ["u8", 32] } }] }, { "name": "send_tx_with_gas", "docs": ["@notice Allows initiating a TX for funding UEA with gas deposits from source chain.", "@dev Supports only native SOL deposits for gas funding.", "The route emits TxWithGas event - important for Instant TX Route."], "discriminator": [220, 10, 179, 127, 41, 153, 193, 213], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "vault", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }] } }, { "name": "user", "writable": true, "signer": true }, { "name": "price_update" }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "payload", "type": { "defined": { "name": "UniversalPayload" } } }, { "name": "revert_cfg", "type": { "defined": { "name": "RevertSettings" } } }, { "name": "amount", "type": "u64" }] }, { "name": "set_caps_usd", "docs": ["@notice Set USD caps"], "discriminator": [136, 160, 17, 54, 239, 108, 125, 129], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "admin", "signer": true }], "args": [{ "name": "min_cap", "type": "u128" }, { "name": "max_cap", "type": "u128" }] }, { "name": "set_pyth_confidence_threshold", "docs": ["@notice Set Pyth confidence threshold"], "discriminator": [213, 69, 242, 123, 122, 165, 125, 21], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "admin", "signer": true }], "args": [{ "name": "threshold", "type": "u64" }] }, { "name": "set_pyth_price_feed", "docs": ["@notice Set Pyth price feed"], "discriminator": [202, 185, 109, 150, 255, 130, 210, 208], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "admin", "signer": true }], "args": [{ "name": "price_feed", "type": "pubkey" }] }, { "name": "set_tss_address", "docs": ["@notice Set TSS address"], "discriminator": [158, 254, 147, 0, 154, 3, 56, 50], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "admin", "signer": true }], "args": [{ "name": "new_tss", "type": "pubkey" }] }, { "name": "unpause", "docs": ["@notice Unpause the gateway"], "discriminator": [169, 144, 4, 38, 10, 141, 188, 255], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "pauser", "signer": true }], "args": [] }, { "name": "update_tss", "discriminator": [227, 136, 3, 242, 177, 168, 10, 160], "accounts": [{ "name": "tss_pda", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] } }, { "name": "authority", "signer": true }], "args": [{ "name": "tss_eth_address", "type": { "array": ["u8", 20] } }, { "name": "chain_id", "type": "u64" }] }, { "name": "whitelist_token", "docs": ["@notice Whitelist a token"], "discriminator": [6, 141, 83, 167, 31, 6, 2, 224], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "whitelist", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [119, 104, 105, 116, 101, 108, 105, 115, 116] }] } }, { "name": "admin", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "token", "type": "pubkey" }] }, { "name": "withdraw_spl_token_tss", "docs": ["@notice TSS-verified withdraw of SPL tokens"], "discriminator": [238, 209, 47, 229, 44, 234, 138, 198], "accounts": [{ "name": "config", "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "whitelist" }, { "name": "vault", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }] } }, { "name": "token_vault", "writable": true }, { "name": "tss_pda", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] } }, { "name": "recipient_token_account", "writable": true }, { "name": "token_mint" }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }], "args": [{ "name": "amount", "type": "u64" }, { "name": "signature", "type": { "array": ["u8", 64] } }, { "name": "recovery_id", "type": "u8" }, { "name": "message_hash", "type": { "array": ["u8", 32] } }, { "name": "nonce", "type": "u64" }] }, { "name": "withdraw_tss", "docs": ["@notice TSS-verified withdraw of native SOL"], "discriminator": [112, 51, 93, 250, 136, 175, 118, 100], "accounts": [{ "name": "config", "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "vault", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }] } }, { "name": "tss_pda", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115] }] } }, { "name": "recipient", "writable": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "amount", "type": "u64" }, { "name": "signature", "type": { "array": ["u8", 64] } }, { "name": "recovery_id", "type": "u8" }, { "name": "message_hash", "type": { "array": ["u8", 32] } }, { "name": "nonce", "type": "u64" }] }], "accounts": [{ "name": "Config", "discriminator": [155, 12, 170, 224, 30, 250, 204, 130] }, { "name": "PriceUpdateV2", "discriminator": [34, 241, 35, 99, 157, 126, 244, 205] }, { "name": "TokenWhitelist", "discriminator": [105, 240, 104, 47, 95, 13, 48, 78] }, { "name": "TssPda", "discriminator": [121, 138, 162, 251, 127, 95, 238, 135] }], "events": [{ "name": "CapsUpdated", "discriminator": [147, 181, 117, 249, 72, 147, 156, 255] }, { "name": "FundsAddedEvent", "discriminator": [127, 31, 108, 255, 187, 19, 70, 68] }, { "name": "TSSAddressUpdated", "discriminator": [157, 148, 149, 250, 42, 118, 17, 232] }, { "name": "TokenRemovedFromWhitelist", "discriminator": [200, 69, 55, 209, 167, 225, 117, 11] }, { "name": "TokenWhitelisted", "discriminator": [65, 3, 231, 165, 235, 116, 154, 51] }, { "name": "TxWithFunds", "discriminator": [43, 31, 31, 2, 4, 236, 107, 255] }, { "name": "TxWithGas", "discriminator": [182, 110, 243, 17, 145, 36, 153, 15] }, { "name": "WithdrawFunds", "discriminator": [4, 77, 4, 28, 115, 6, 39, 233] }], "errors": [{ "code": 6000, "name": "PausedError", "msg": "Contract is paused" }, { "code": 6001, "name": "Unauthorized", "msg": "Unauthorized access" }, { "code": 6002, "name": "InvalidAmount", "msg": "Invalid amount" }, { "code": 6003, "name": "InvalidRecipient", "msg": "Invalid recipient" }, { "code": 6004, "name": "BelowMinCap", "msg": "Amount below minimum cap" }, { "code": 6005, "name": "AboveMaxCap", "msg": "Amount above maximum cap" }, { "code": 6006, "name": "ZeroAddress", "msg": "Zero address not allowed" }, { "code": 6007, "name": "InvalidCapRange", "msg": "Invalid cap range" }, { "code": 6008, "name": "InvalidPayload", "msg": "Invalid payload" }, { "code": 6009, "name": "DeadlineExceeded", "msg": "Deadline exceeded" }, { "code": 6010, "name": "InvalidPrice", "msg": "Invalid price data" }, { "code": 6011, "name": "TokenAlreadyWhitelisted", "msg": "Token already whitelisted" }, { "code": 6012, "name": "TokenNotWhitelisted", "msg": "Token not whitelisted" }, { "code": 6013, "name": "TokenTransferFailed", "msg": "Token transfer failed" }, { "code": 6014, "name": "InvalidTokenVault", "msg": "Invalid token vault" }, { "code": 6015, "name": "InvalidOwner", "msg": "Invalid owner" }, { "code": 6016, "name": "SlippageExceededOrExpired", "msg": "Slippage exceeded or expired" }, { "code": 6017, "name": "Paused", "msg": "Contract is paused" }, { "code": 6018, "name": "InvalidInput", "msg": "Invalid input" }, { "code": 6019, "name": "InvalidMint", "msg": "Invalid mint" }, { "code": 6020, "name": "InsufficientBalance", "msg": "Insufficient balance" }, { "code": 6021, "name": "InvalidToken", "msg": "Invalid token" }], "types": [{ "name": "CapsUpdated", "type": { "kind": "struct", "fields": [{ "name": "min_cap_usd", "type": "u128" }, { "name": "max_cap_usd", "type": "u128" }] } }, { "name": "Config", "docs": ["Gateway configuration state (authorities, caps, oracle).", "PDA: `[b\"config\"]`. Holds USD caps (8 decimals) for gas-route deposits and oracle config."], "type": { "kind": "struct", "fields": [{ "name": "admin", "type": "pubkey" }, { "name": "tss_address", "type": "pubkey" }, { "name": "pauser", "type": "pubkey" }, { "name": "min_cap_universal_tx_usd", "type": "u128" }, { "name": "max_cap_universal_tx_usd", "type": "u128" }, { "name": "paused", "type": "bool" }, { "name": "bump", "type": "u8" }, { "name": "vault_bump", "type": "u8" }, { "name": "pyth_price_feed", "type": "pubkey" }, { "name": "pyth_confidence_threshold", "type": "u64" }] } }, { "name": "FundsAddedEvent", "docs": ["Legacy event for fee-abstraction route (locker-compatible).", "Matches `pushsolanalocker` `FundsAddedEvent` exactly for offchain compatibility."], "type": { "kind": "struct", "fields": [{ "name": "user", "type": "pubkey" }, { "name": "sol_amount", "type": "u64" }, { "name": "usd_equivalent", "type": "i128" }, { "name": "usd_exponent", "type": "i32" }, { "name": "transaction_hash", "type": { "array": ["u8", 32] } }] } }, { "name": "PriceData", "type": { "kind": "struct", "fields": [{ "name": "price", "type": "i64" }, { "name": "exponent", "type": "i32" }, { "name": "publish_time", "type": "i64" }, { "name": "confidence", "type": "u64" }] } }, { "name": "PriceFeedMessage", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [{ "name": "feed_id", "docs": ["`FeedId` but avoid the type alias because of compatibility issues with Anchor's `idl-build` feature."], "type": { "array": ["u8", 32] } }, { "name": "price", "type": "i64" }, { "name": "conf", "type": "u64" }, { "name": "exponent", "type": "i32" }, { "name": "publish_time", "docs": ["The timestamp of this price update in seconds"], "type": "i64" }, { "name": "prev_publish_time", "docs": ["The timestamp of the previous price update. This field is intended to allow users to", "identify the single unique price update for any moment in time:", "for any time t, the unique update is the one such that prev_publish_time < t <= publish_time.", "", "Note that there may not be such an update while we are migrating to the new message-sending logic,", "as some price updates on pythnet may not be sent to other chains (because the message-sending", "logic may not have triggered). We can solve this problem by making the message-sending mandatory", "(which we can do once publishers have migrated over).", "", "Additionally, this field may be equal to publish_time if the message is sent on a slot where", "where the aggregation was unsuccesful. This problem will go away once all publishers have", "migrated over to a recent version of pyth-agent."], "type": "i64" }, { "name": "ema_price", "type": "i64" }, { "name": "ema_conf", "type": "u64" }] } }, { "name": "PriceUpdateV2", "docs": ["A price update account. This account is used by the Pyth Receiver program to store a verified price update from a Pyth price feed.", "It contains:", "- `write_authority`: The write authority for this account. This authority can close this account to reclaim rent or update the account to contain a different price update.", "- `verification_level`: The [`VerificationLevel`] of this price update. This represents how many Wormhole guardian signatures have been verified for this price update.", "- `price_message`: The actual price update.", "- `posted_slot`: The slot at which this price update was posted."], "type": { "kind": "struct", "fields": [{ "name": "write_authority", "type": "pubkey" }, { "name": "verification_level", "type": { "defined": { "name": "VerificationLevel" } } }, { "name": "price_message", "type": { "defined": { "name": "PriceFeedMessage" } } }, { "name": "posted_slot", "type": "u64" }] } }, { "name": "RevertSettings", "docs": ["Revert settings for failed transactions (parity with EVM `RevertSettings`)."], "type": { "kind": "struct", "fields": [{ "name": "fund_recipient", "type": "pubkey" }, { "name": "revert_msg", "type": "bytes" }] } }, { "name": "TSSAddressUpdated", "type": { "kind": "struct", "fields": [{ "name": "old_tss", "type": "pubkey" }, { "name": "new_tss", "type": "pubkey" }] } }, { "name": "TokenRemovedFromWhitelist", "type": { "kind": "struct", "fields": [{ "name": "token_address", "type": "pubkey" }] } }, { "name": "TokenWhitelist", "docs": ["SPL token whitelist state.", "PDA: `[b\"whitelist\"]`. Simple list of supported SPL mints."], "type": { "kind": "struct", "fields": [{ "name": "tokens", "type": { "vec": "pubkey" } }, { "name": "bump", "type": "u8" }] } }, { "name": "TokenWhitelisted", "type": { "kind": "struct", "fields": [{ "name": "token_address", "type": "pubkey" }] } }, { "name": "TssPda", "docs": ["TSS state PDA for ECDSA verification (Ethereum-style secp256k1).", "Stores 20-byte ETH address, chain id, and replay-protection nonce."], "type": { "kind": "struct", "fields": [{ "name": "tss_eth_address", "type": { "array": ["u8", 20] } }, { "name": "chain_id", "type": "u64" }, { "name": "nonce", "type": "u64" }, { "name": "authority", "type": "pubkey" }, { "name": "bump", "type": "u8" }] } }, { "name": "TxType", "docs": ["Transaction types matching the EVM Universal Gateway `TX_TYPE`.", "Kept 1:1 for relayer/event parity with the EVM implementation."], "type": { "kind": "enum", "variants": [{ "name": "Gas" }, { "name": "GasAndPayload" }, { "name": "Funds" }, { "name": "FundsAndPayload" }] } }, { "name": "TxWithFunds", "docs": ["FUNDS deposit event (parity with EVM `TxWithFunds`). Emitted for FUNDS-only and FUNDS+PAYLOAD routes."], "type": { "kind": "struct", "fields": [{ "name": "sender", "type": "pubkey" }, { "name": "recipient", "type": "pubkey" }, { "name": "bridge_amount", "type": "u64" }, { "name": "gas_amount", "type": "u64" }, { "name": "bridge_token", "type": "pubkey" }, { "name": "data", "type": "bytes" }, { "name": "revert_cfg", "type": { "defined": { "name": "RevertSettings" } } }, { "name": "tx_type", "type": { "defined": { "name": "TxType" } } }, { "name": "signature_data", "type": { "array": ["u8", 32] } }] } }, { "name": "TxWithGas", "docs": ["GAS deposit event (parity with EVM `TxWithGas`). Emitted for gas funding on both GAS and GAS+PAYLOAD routes."], "type": { "kind": "struct", "fields": [{ "name": "sender", "type": "pubkey" }, { "name": "payload_hash", "type": { "array": ["u8", 32] } }, { "name": "native_token_deposited", "type": "u64" }, { "name": "revert_cfg", "type": { "defined": { "name": "RevertSettings" } } }, { "name": "tx_type", "type": { "defined": { "name": "TxType" } } }] } }, { "name": "UniversalPayload", "docs": ["Universal payload for cross-chain execution (parity with EVM `UniversalPayload`).", "Serialized and hashed for event parity with EVM (payload bytes/hash)."], "type": { "kind": "struct", "fields": [{ "name": "to", "type": "pubkey" }, { "name": "value", "type": "u64" }, { "name": "data", "type": "bytes" }, { "name": "gas_limit", "type": "u64" }, { "name": "max_fee_per_gas", "type": "u64" }, { "name": "max_priority_fee_per_gas", "type": "u64" }, { "name": "nonce", "type": "u64" }, { "name": "deadline", "type": "i64" }, { "name": "v_type", "type": { "defined": { "name": "VerificationType" } } }] } }, { "name": "VerificationLevel", "docs": ["Pyth price updates are bridged to all blockchains via Wormhole.", "Using the price updates on another chain requires verifying the signatures of the Wormhole guardians.", "The usual process is to check the signatures for two thirds of the total number of guardians, but this can be cumbersome on Solana because of the transaction size limits,", "so we also allow for partial verification.", "", "This enum represents how much a price update has been verified:", "- If `Full`, we have verified the signatures for two thirds of the current guardians.", "- If `Partial`, only `num_signatures` guardian signatures have been checked.", "", "# Warning", "Using partially verified price updates is dangerous, as it lowers the threshold of guardians that need to collude to produce a malicious price update."], "type": { "kind": "enum", "variants": [{ "name": "Partial", "fields": [{ "name": "num_signatures", "type": "u8" }] }, { "name": "Full" }] } }, { "name": "VerificationType", "docs": ["Verification types for payload execution (parity with EVM)."], "type": { "kind": "enum", "variants": [{ "name": "SignedVerification" }, { "name": "UniversalTxVerification" }] } }, { "name": "WithdrawFunds", "docs": ["Withdraw event (parity with EVM `WithdrawFunds`)."], "type": { "kind": "struct", "fields": [{ "name": "recipient", "type": "pubkey" }, { "name": "amount", "type": "u64" }, { "name": "token", "type": "pubkey" }] } }] }