@pushchain/core 5.1.7 → 5.1.9

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 (30) 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/internals/cascade.js +3 -3
  16. package/src/lib/orchestrator/internals/route-handlers.js +5 -5
  17. package/src/lib/orchestrator/orchestrator.types.d.ts +0 -7
  18. package/src/lib/orchestrator/payload-builders.d.ts +0 -45
  19. package/src/lib/orchestrator/payload-builders.js +1 -111
  20. package/src/lib/push-client/push-client.js +12 -11
  21. package/src/lib/universal/account/account.js +10 -2
  22. package/src/lib/utils.d.ts +14 -10
  23. package/src/lib/utils.js +45 -23
  24. package/src/lib/vm-client/evm-client.d.ts +1 -1
  25. package/src/lib/vm-client/evm-client.js +2 -1
  26. package/src/lib/vm-client/vm-client.types.d.ts +2 -1
  27. package/src/lib/universal-tx-detector/__tests__/fixtures/builders.d.ts +0 -32
  28. package/src/lib/universal-tx-detector/__tests__/fixtures/builders.js +0 -65
  29. package/src/lib/universal-tx-detector/__tests__/fixtures/scenarios.d.ts +0 -72
  30. package/src/lib/universal-tx-detector/__tests__/fixtures/scenarios.js +0 -669
@@ -1,3009 +1 @@
1
- {
2
- "address": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS",
3
- "metadata": {
4
- "name": "universal_gateway",
5
- "version": "0.1.0",
6
- "spec": "0.1.0",
7
- "description": "Universal Gateway for Solana - Cross-chain bridge and transaction router"
8
- },
9
- "instructions": [
10
- {
11
- "name": "finalize_universal_tx",
12
- "docs": [
13
- "@notice Unified outbound entrypoint: withdraw (mode 1) or execute (mode 2)",
14
- "@param instruction_id 1=withdraw (vault→CEA→recipient), 2=execute (vault→CEA→CPI)"
15
- ],
16
- "discriminator": [
17
- 222,
18
- 91,
19
- 238,
20
- 150,
21
- 75,
22
- 216,
23
- 2,
24
- 80
25
- ],
26
- "accounts": [
27
- {
28
- "name": "caller",
29
- "writable": true,
30
- "signer": true
31
- },
32
- {
33
- "name": "config",
34
- "pda": {
35
- "seeds": [
36
- {
37
- "kind": "const",
38
- "value": [
39
- 99,
40
- 111,
41
- 110,
42
- 102,
43
- 105,
44
- 103
45
- ]
46
- }
47
- ]
48
- }
49
- },
50
- {
51
- "name": "vault_sol",
52
- "docs": [
53
- "Vault SOL PDA - holds all bridged SOL"
54
- ],
55
- "writable": true,
56
- "pda": {
57
- "seeds": [
58
- {
59
- "kind": "const",
60
- "value": [
61
- 118,
62
- 97,
63
- 117,
64
- 108,
65
- 116
66
- ]
67
- }
68
- ]
69
- }
70
- },
71
- {
72
- "name": "cea_authority",
73
- "docs": [
74
- "CEA (Chain Executor Account) - persistent identity per Push Chain user",
75
- "This PDA represents the user on Solana and can sign for target programs",
76
- "Auto-created by Solana on first transfer, persists across transactions"
77
- ],
78
- "writable": true,
79
- "pda": {
80
- "seeds": [
81
- {
82
- "kind": "const",
83
- "value": [
84
- 112,
85
- 117,
86
- 115,
87
- 104,
88
- 95,
89
- 105,
90
- 100,
91
- 101,
92
- 110,
93
- 116,
94
- 105,
95
- 116,
96
- 121
97
- ]
98
- },
99
- {
100
- "kind": "arg",
101
- "path": "push_account"
102
- }
103
- ]
104
- }
105
- },
106
- {
107
- "name": "tss_pda",
108
- "writable": true,
109
- "pda": {
110
- "seeds": [
111
- {
112
- "kind": "const",
113
- "value": [
114
- 116,
115
- 115,
116
- 115,
117
- 112,
118
- 100,
119
- 97,
120
- 95,
121
- 118,
122
- 50
123
- ]
124
- }
125
- ]
126
- }
127
- },
128
- {
129
- "name": "executed_sub_tx",
130
- "docs": [
131
- "Executed transaction tracker (replay protection)",
132
- "Relayer pays for this account creation and gets reimbursed via gas_fee"
133
- ],
134
- "writable": true,
135
- "pda": {
136
- "seeds": [
137
- {
138
- "kind": "const",
139
- "value": [
140
- 101,
141
- 120,
142
- 101,
143
- 99,
144
- 117,
145
- 116,
146
- 101,
147
- 100,
148
- 95,
149
- 115,
150
- 117,
151
- 98,
152
- 95,
153
- 116,
154
- 120
155
- ]
156
- },
157
- {
158
- "kind": "arg",
159
- "path": "sub_tx_id"
160
- }
161
- ]
162
- }
163
- },
164
- {
165
- "name": "system_program",
166
- "address": "11111111111111111111111111111111"
167
- },
168
- {
169
- "name": "destination_program",
170
- "docs": [
171
- "Pass system program id for withdraw, it's ignored"
172
- ]
173
- },
174
- {
175
- "name": "recipient",
176
- "writable": true,
177
- "optional": true
178
- },
179
- {
180
- "name": "vault_ata",
181
- "docs": [
182
- "Vault ATA for this mint — always initialized (deposit path guarantees existence)"
183
- ],
184
- "writable": true,
185
- "optional": true
186
- },
187
- {
188
- "name": "cea_ata",
189
- "writable": true,
190
- "optional": true
191
- },
192
- {
193
- "name": "mint",
194
- "optional": true
195
- },
196
- {
197
- "name": "token_program",
198
- "optional": true,
199
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
200
- },
201
- {
202
- "name": "rent",
203
- "optional": true,
204
- "address": "SysvarRent111111111111111111111111111111111"
205
- },
206
- {
207
- "name": "associated_token_program",
208
- "optional": true,
209
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
210
- },
211
- {
212
- "name": "recipient_ata",
213
- "writable": true,
214
- "optional": true
215
- },
216
- {
217
- "name": "rate_limit_config",
218
- "optional": true,
219
- "pda": {
220
- "seeds": [
221
- {
222
- "kind": "const",
223
- "value": [
224
- 114,
225
- 97,
226
- 116,
227
- 101,
228
- 95,
229
- 108,
230
- 105,
231
- 109,
232
- 105,
233
- 116,
234
- 95,
235
- 99,
236
- 111,
237
- 110,
238
- 102,
239
- 105,
240
- 103
241
- ]
242
- }
243
- ]
244
- }
245
- },
246
- {
247
- "name": "token_rate_limit",
248
- "docs": [
249
- "Token-specific rate limit state (CEA withdrawal path only)"
250
- ],
251
- "writable": true,
252
- "optional": true
253
- }
254
- ],
255
- "args": [
256
- {
257
- "name": "instruction_id",
258
- "type": "u8"
259
- },
260
- {
261
- "name": "sub_tx_id",
262
- "type": {
263
- "array": [
264
- "u8",
265
- 32
266
- ]
267
- }
268
- },
269
- {
270
- "name": "universal_tx_id",
271
- "type": {
272
- "array": [
273
- "u8",
274
- 32
275
- ]
276
- }
277
- },
278
- {
279
- "name": "amount",
280
- "type": "u64"
281
- },
282
- {
283
- "name": "push_account",
284
- "type": {
285
- "array": [
286
- "u8",
287
- 20
288
- ]
289
- }
290
- },
291
- {
292
- "name": "writable_flags",
293
- "type": "bytes"
294
- },
295
- {
296
- "name": "ix_data",
297
- "type": "bytes"
298
- },
299
- {
300
- "name": "gas_fee",
301
- "type": "u64"
302
- },
303
- {
304
- "name": "signature",
305
- "type": {
306
- "array": [
307
- "u8",
308
- 64
309
- ]
310
- }
311
- },
312
- {
313
- "name": "recovery_id",
314
- "type": "u8"
315
- },
316
- {
317
- "name": "message_hash",
318
- "type": {
319
- "array": [
320
- "u8",
321
- 32
322
- ]
323
- }
324
- }
325
- ]
326
- },
327
- {
328
- "name": "get_sol_price",
329
- "docs": [
330
- "@notice View function for SOL price (locker-compatible)"
331
- ],
332
- "discriminator": [
333
- 230,
334
- 145,
335
- 206,
336
- 175,
337
- 43,
338
- 184,
339
- 97,
340
- 110
341
- ],
342
- "accounts": [
343
- {
344
- "name": "price_update"
345
- }
346
- ],
347
- "args": [],
348
- "returns": {
349
- "defined": {
350
- "name": "PriceData"
351
- }
352
- }
353
- },
354
- {
355
- "name": "init_tss",
356
- "discriminator": [
357
- 47,
358
- 31,
359
- 100,
360
- 111,
361
- 115,
362
- 2,
363
- 22,
364
- 208
365
- ],
366
- "accounts": [
367
- {
368
- "name": "tss_pda",
369
- "writable": true,
370
- "pda": {
371
- "seeds": [
372
- {
373
- "kind": "const",
374
- "value": [
375
- 116,
376
- 115,
377
- 115,
378
- 112,
379
- 100,
380
- 97,
381
- 95,
382
- 118,
383
- 50
384
- ]
385
- }
386
- ]
387
- }
388
- },
389
- {
390
- "name": "config",
391
- "pda": {
392
- "seeds": [
393
- {
394
- "kind": "const",
395
- "value": [
396
- 99,
397
- 111,
398
- 110,
399
- 102,
400
- 105,
401
- 103
402
- ]
403
- }
404
- ]
405
- }
406
- },
407
- {
408
- "name": "authority",
409
- "writable": true,
410
- "signer": true
411
- },
412
- {
413
- "name": "system_program",
414
- "address": "11111111111111111111111111111111"
415
- }
416
- ],
417
- "args": [
418
- {
419
- "name": "tss_eth_address",
420
- "type": {
421
- "array": [
422
- "u8",
423
- 20
424
- ]
425
- }
426
- },
427
- {
428
- "name": "chain_id",
429
- "type": "string"
430
- }
431
- ]
432
- },
433
- {
434
- "name": "initialize",
435
- "docs": [
436
- "@notice Initialize the gateway"
437
- ],
438
- "discriminator": [
439
- 175,
440
- 175,
441
- 109,
442
- 31,
443
- 13,
444
- 152,
445
- 155,
446
- 237
447
- ],
448
- "accounts": [
449
- {
450
- "name": "config",
451
- "writable": true,
452
- "pda": {
453
- "seeds": [
454
- {
455
- "kind": "const",
456
- "value": [
457
- 99,
458
- 111,
459
- 110,
460
- 102,
461
- 105,
462
- 103
463
- ]
464
- }
465
- ]
466
- }
467
- },
468
- {
469
- "name": "vault",
470
- "writable": true,
471
- "pda": {
472
- "seeds": [
473
- {
474
- "kind": "const",
475
- "value": [
476
- 118,
477
- 97,
478
- 117,
479
- 108,
480
- 116
481
- ]
482
- }
483
- ]
484
- }
485
- },
486
- {
487
- "name": "admin",
488
- "writable": true,
489
- "signer": true
490
- },
491
- {
492
- "name": "system_program",
493
- "address": "11111111111111111111111111111111"
494
- }
495
- ],
496
- "args": [
497
- {
498
- "name": "admin",
499
- "type": "pubkey"
500
- },
501
- {
502
- "name": "pauser",
503
- "type": "pubkey"
504
- },
505
- {
506
- "name": "tss",
507
- "type": "pubkey"
508
- },
509
- {
510
- "name": "min_cap_usd",
511
- "type": "u128"
512
- },
513
- {
514
- "name": "max_cap_usd",
515
- "type": "u128"
516
- },
517
- {
518
- "name": "pyth_price_feed",
519
- "type": "pubkey"
520
- }
521
- ]
522
- },
523
- {
524
- "name": "pause",
525
- "docs": [
526
- "@notice Pause the gateway"
527
- ],
528
- "discriminator": [
529
- 211,
530
- 22,
531
- 221,
532
- 251,
533
- 74,
534
- 121,
535
- 193,
536
- 47
537
- ],
538
- "accounts": [
539
- {
540
- "name": "config",
541
- "writable": true,
542
- "pda": {
543
- "seeds": [
544
- {
545
- "kind": "const",
546
- "value": [
547
- 99,
548
- 111,
549
- 110,
550
- 102,
551
- 105,
552
- 103
553
- ]
554
- }
555
- ]
556
- }
557
- },
558
- {
559
- "name": "pauser",
560
- "signer": true
561
- }
562
- ],
563
- "args": []
564
- },
565
- {
566
- "name": "rescue_funds",
567
- "docs": [
568
- "@notice TSS-verified emergency rescue of locked funds from vault.",
569
- "SOL path: token_mint = None. SPL path: token_mint = Some.",
570
- "Replay-protected via ExecutedSubTx PDA"
571
- ],
572
- "discriminator": [
573
- 238,
574
- 204,
575
- 8,
576
- 81,
577
- 89,
578
- 43,
579
- 193,
580
- 103
581
- ],
582
- "accounts": [
583
- {
584
- "name": "config",
585
- "pda": {
586
- "seeds": [
587
- {
588
- "kind": "const",
589
- "value": [
590
- 99,
591
- 111,
592
- 110,
593
- 102,
594
- 105,
595
- 103
596
- ]
597
- }
598
- ]
599
- }
600
- },
601
- {
602
- "name": "vault",
603
- "writable": true,
604
- "pda": {
605
- "seeds": [
606
- {
607
- "kind": "const",
608
- "value": [
609
- 118,
610
- 97,
611
- 117,
612
- 108,
613
- 116
614
- ]
615
- }
616
- ]
617
- }
618
- },
619
- {
620
- "name": "fee_vault",
621
- "docs": [
622
- "Fee vault — relayer gas reimbursement source."
623
- ],
624
- "writable": true,
625
- "pda": {
626
- "seeds": [
627
- {
628
- "kind": "const",
629
- "value": [
630
- 102,
631
- 101,
632
- 101,
633
- 95,
634
- 118,
635
- 97,
636
- 117,
637
- 108,
638
- 116
639
- ]
640
- }
641
- ]
642
- }
643
- },
644
- {
645
- "name": "tss_pda",
646
- "writable": true,
647
- "pda": {
648
- "seeds": [
649
- {
650
- "kind": "const",
651
- "value": [
652
- 116,
653
- 115,
654
- 115,
655
- 112,
656
- 100,
657
- 97,
658
- 95,
659
- 118,
660
- 50
661
- ]
662
- }
663
- ]
664
- }
665
- },
666
- {
667
- "name": "recipient",
668
- "docs": [
669
- "recipient_token_account.owner and used as the canonical identity in the TSS message."
670
- ],
671
- "writable": true
672
- },
673
- {
674
- "name": "executed_sub_tx",
675
- "docs": [
676
- "Replay protection (EVM parity: isExecuted[subTxId])."
677
- ],
678
- "writable": true,
679
- "pda": {
680
- "seeds": [
681
- {
682
- "kind": "const",
683
- "value": [
684
- 101,
685
- 120,
686
- 101,
687
- 99,
688
- 117,
689
- 116,
690
- 101,
691
- 100,
692
- 95,
693
- 115,
694
- 117,
695
- 98,
696
- 95,
697
- 116,
698
- 120
699
- ]
700
- },
701
- {
702
- "kind": "arg",
703
- "path": "sub_tx_id"
704
- }
705
- ]
706
- }
707
- },
708
- {
709
- "name": "caller",
710
- "docs": [
711
- "The caller/relayer — pays transaction fees, receives gas_fee reimbursement."
712
- ],
713
- "writable": true,
714
- "signer": true
715
- },
716
- {
717
- "name": "system_program",
718
- "address": "11111111111111111111111111111111"
719
- },
720
- {
721
- "name": "token_vault",
722
- "docs": [
723
- "Vault ATA for this mint — holds bridged SPL tokens."
724
- ],
725
- "writable": true,
726
- "optional": true
727
- },
728
- {
729
- "name": "recipient_token_account",
730
- "docs": [
731
- "Recipient token account — must be owned by recipient and match token_mint."
732
- ],
733
- "writable": true,
734
- "optional": true
735
- },
736
- {
737
- "name": "token_mint",
738
- "optional": true
739
- },
740
- {
741
- "name": "token_program",
742
- "optional": true,
743
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
744
- }
745
- ],
746
- "args": [
747
- {
748
- "name": "sub_tx_id",
749
- "type": {
750
- "array": [
751
- "u8",
752
- 32
753
- ]
754
- }
755
- },
756
- {
757
- "name": "universal_tx_id",
758
- "type": {
759
- "array": [
760
- "u8",
761
- 32
762
- ]
763
- }
764
- },
765
- {
766
- "name": "amount",
767
- "type": "u64"
768
- },
769
- {
770
- "name": "gas_fee",
771
- "type": "u64"
772
- },
773
- {
774
- "name": "signature",
775
- "type": {
776
- "array": [
777
- "u8",
778
- 64
779
- ]
780
- }
781
- },
782
- {
783
- "name": "recovery_id",
784
- "type": "u8"
785
- },
786
- {
787
- "name": "message_hash",
788
- "type": {
789
- "array": [
790
- "u8",
791
- 32
792
- ]
793
- }
794
- }
795
- ]
796
- },
797
- {
798
- "name": "revert_universal_tx",
799
- "docs": [
800
- "@notice TSS-verified unified revert (SOL and SPL) — EVM parity: `revertUniversalTx`.",
801
- "SOL path: token_mint = None. SPL path: token_mint = Some."
802
- ],
803
- "discriminator": [
804
- 124,
805
- 49,
806
- 81,
807
- 233,
808
- 23,
809
- 147,
810
- 82,
811
- 122
812
- ],
813
- "accounts": [
814
- {
815
- "name": "config",
816
- "pda": {
817
- "seeds": [
818
- {
819
- "kind": "const",
820
- "value": [
821
- 99,
822
- 111,
823
- 110,
824
- 102,
825
- 105,
826
- 103
827
- ]
828
- }
829
- ]
830
- }
831
- },
832
- {
833
- "name": "vault",
834
- "writable": true,
835
- "pda": {
836
- "seeds": [
837
- {
838
- "kind": "const",
839
- "value": [
840
- 118,
841
- 97,
842
- 117,
843
- 108,
844
- 116
845
- ]
846
- }
847
- ]
848
- }
849
- },
850
- {
851
- "name": "fee_vault",
852
- "docs": [
853
- "Fee vault — relayer gas reimbursement source."
854
- ],
855
- "writable": true,
856
- "pda": {
857
- "seeds": [
858
- {
859
- "kind": "const",
860
- "value": [
861
- 102,
862
- 101,
863
- 101,
864
- 95,
865
- 118,
866
- 97,
867
- 117,
868
- 108,
869
- 116
870
- ]
871
- }
872
- ]
873
- }
874
- },
875
- {
876
- "name": "tss_pda",
877
- "writable": true,
878
- "pda": {
879
- "seeds": [
880
- {
881
- "kind": "const",
882
- "value": [
883
- 116,
884
- 115,
885
- 115,
886
- 112,
887
- 100,
888
- 97,
889
- 95,
890
- 118,
891
- 50
892
- ]
893
- }
894
- ]
895
- }
896
- },
897
- {
898
- "name": "recipient",
899
- "docs": [
900
- "recipient_token_account.owner and used as canonical identity in TSS message."
901
- ],
902
- "writable": true
903
- },
904
- {
905
- "name": "executed_sub_tx",
906
- "docs": [
907
- "Replay protection (EVM parity: isExecuted[subTxId])."
908
- ],
909
- "writable": true,
910
- "pda": {
911
- "seeds": [
912
- {
913
- "kind": "const",
914
- "value": [
915
- 101,
916
- 120,
917
- 101,
918
- 99,
919
- 117,
920
- 116,
921
- 101,
922
- 100,
923
- 95,
924
- 115,
925
- 117,
926
- 98,
927
- 95,
928
- 116,
929
- 120
930
- ]
931
- },
932
- {
933
- "kind": "arg",
934
- "path": "sub_tx_id"
935
- }
936
- ]
937
- }
938
- },
939
- {
940
- "name": "caller",
941
- "docs": [
942
- "The caller/relayer — pays transaction fees, receives gas_fee reimbursement."
943
- ],
944
- "writable": true,
945
- "signer": true
946
- },
947
- {
948
- "name": "system_program",
949
- "address": "11111111111111111111111111111111"
950
- },
951
- {
952
- "name": "token_vault",
953
- "docs": [
954
- "Vault ATA for this mint — holds bridged SPL tokens."
955
- ],
956
- "writable": true,
957
- "optional": true
958
- },
959
- {
960
- "name": "recipient_token_account",
961
- "docs": [
962
- "Recipient token account — must be owned by recipient and match token_mint."
963
- ],
964
- "writable": true,
965
- "optional": true
966
- },
967
- {
968
- "name": "token_mint",
969
- "optional": true
970
- },
971
- {
972
- "name": "token_program",
973
- "optional": true,
974
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
975
- }
976
- ],
977
- "args": [
978
- {
979
- "name": "sub_tx_id",
980
- "type": {
981
- "array": [
982
- "u8",
983
- 32
984
- ]
985
- }
986
- },
987
- {
988
- "name": "universal_tx_id",
989
- "type": {
990
- "array": [
991
- "u8",
992
- 32
993
- ]
994
- }
995
- },
996
- {
997
- "name": "amount",
998
- "type": "u64"
999
- },
1000
- {
1001
- "name": "revert_instruction",
1002
- "type": {
1003
- "defined": {
1004
- "name": "RevertInstructions"
1005
- }
1006
- }
1007
- },
1008
- {
1009
- "name": "gas_fee",
1010
- "type": "u64"
1011
- },
1012
- {
1013
- "name": "signature",
1014
- "type": {
1015
- "array": [
1016
- "u8",
1017
- 64
1018
- ]
1019
- }
1020
- },
1021
- {
1022
- "name": "recovery_id",
1023
- "type": "u8"
1024
- },
1025
- {
1026
- "name": "message_hash",
1027
- "type": {
1028
- "array": [
1029
- "u8",
1030
- 32
1031
- ]
1032
- }
1033
- }
1034
- ]
1035
- },
1036
- {
1037
- "name": "send_universal_tx",
1038
- "docs": [
1039
- "@notice Universal transaction entrypoint with internal routing (EVM parity).",
1040
- "@dev Native amount parameter mirrors `msg.value` on EVM chains.",
1041
- "All routing (gas / funds / batching) is handled inside the deposit module."
1042
- ],
1043
- "discriminator": [
1044
- 145,
1045
- 19,
1046
- 164,
1047
- 55,
1048
- 165,
1049
- 220,
1050
- 23,
1051
- 97
1052
- ],
1053
- "accounts": [
1054
- {
1055
- "name": "config",
1056
- "pda": {
1057
- "seeds": [
1058
- {
1059
- "kind": "const",
1060
- "value": [
1061
- 99,
1062
- 111,
1063
- 110,
1064
- 102,
1065
- 105,
1066
- 103
1067
- ]
1068
- }
1069
- ]
1070
- }
1071
- },
1072
- {
1073
- "name": "vault",
1074
- "writable": true,
1075
- "pda": {
1076
- "seeds": [
1077
- {
1078
- "kind": "const",
1079
- "value": [
1080
- 118,
1081
- 97,
1082
- 117,
1083
- 108,
1084
- 116
1085
- ]
1086
- }
1087
- ]
1088
- }
1089
- },
1090
- {
1091
- "name": "fee_vault",
1092
- "docs": [
1093
- "Fee vault: receives the flat protocol fee per inbound tx.",
1094
- "Separate from bridge vault to preserve the 1:1 bridge invariant."
1095
- ],
1096
- "writable": true,
1097
- "pda": {
1098
- "seeds": [
1099
- {
1100
- "kind": "const",
1101
- "value": [
1102
- 102,
1103
- 101,
1104
- 101,
1105
- 95,
1106
- 118,
1107
- 97,
1108
- 117,
1109
- 108,
1110
- 116
1111
- ]
1112
- }
1113
- ]
1114
- }
1115
- },
1116
- {
1117
- "name": "user_token_account",
1118
- "docs": [
1119
- "Only required for SPL token routes; can be omitted (pass null) on native SOL routes."
1120
- ],
1121
- "writable": true,
1122
- "optional": true
1123
- },
1124
- {
1125
- "name": "gateway_token_account",
1126
- "docs": [
1127
- "Only required for SPL token routes; can be omitted (pass null) on native SOL routes."
1128
- ],
1129
- "writable": true,
1130
- "optional": true
1131
- },
1132
- {
1133
- "name": "user",
1134
- "writable": true,
1135
- "signer": true
1136
- },
1137
- {
1138
- "name": "price_update"
1139
- },
1140
- {
1141
- "name": "rate_limit_config",
1142
- "docs": [
1143
- "Rate limit config - REQUIRED for universal entrypoint"
1144
- ],
1145
- "writable": true,
1146
- "pda": {
1147
- "seeds": [
1148
- {
1149
- "kind": "const",
1150
- "value": [
1151
- 114,
1152
- 97,
1153
- 116,
1154
- 101,
1155
- 95,
1156
- 108,
1157
- 105,
1158
- 109,
1159
- 105,
1160
- 116,
1161
- 95,
1162
- 99,
1163
- 111,
1164
- 110,
1165
- 102,
1166
- 105,
1167
- 103
1168
- ]
1169
- }
1170
- ]
1171
- }
1172
- },
1173
- {
1174
- "name": "token_rate_limit",
1175
- "docs": [
1176
- "Token rate limit - REQUIRED for universal entrypoint",
1177
- "NOTE: For native SOL, use Pubkey::default() as the token_mint when deriving this PDA"
1178
- ],
1179
- "writable": true
1180
- },
1181
- {
1182
- "name": "token_program",
1183
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1184
- },
1185
- {
1186
- "name": "system_program",
1187
- "address": "11111111111111111111111111111111"
1188
- }
1189
- ],
1190
- "args": [
1191
- {
1192
- "name": "req",
1193
- "type": {
1194
- "defined": {
1195
- "name": "UniversalTxRequest"
1196
- }
1197
- }
1198
- },
1199
- {
1200
- "name": "native_amount",
1201
- "type": "u64"
1202
- }
1203
- ]
1204
- },
1205
- {
1206
- "name": "set_authorities",
1207
- "docs": [
1208
- "@notice Update admin and/or pauser authority."
1209
- ],
1210
- "discriminator": [
1211
- 124,
1212
- 254,
1213
- 44,
1214
- 240,
1215
- 197,
1216
- 70,
1217
- 190,
1218
- 107
1219
- ],
1220
- "accounts": [
1221
- {
1222
- "name": "config",
1223
- "writable": true,
1224
- "pda": {
1225
- "seeds": [
1226
- {
1227
- "kind": "const",
1228
- "value": [
1229
- 99,
1230
- 111,
1231
- 110,
1232
- 102,
1233
- 105,
1234
- 103
1235
- ]
1236
- }
1237
- ]
1238
- }
1239
- },
1240
- {
1241
- "name": "admin",
1242
- "signer": true
1243
- }
1244
- ],
1245
- "args": [
1246
- {
1247
- "name": "new_admin",
1248
- "type": {
1249
- "option": "pubkey"
1250
- }
1251
- },
1252
- {
1253
- "name": "new_pauser",
1254
- "type": {
1255
- "option": "pubkey"
1256
- }
1257
- }
1258
- ]
1259
- },
1260
- {
1261
- "name": "set_block_usd_cap",
1262
- "docs": [
1263
- "@notice Set block-based USD cap for rate limiting"
1264
- ],
1265
- "discriminator": [
1266
- 205,
1267
- 253,
1268
- 33,
1269
- 164,
1270
- 220,
1271
- 216,
1272
- 42,
1273
- 50
1274
- ],
1275
- "accounts": [
1276
- {
1277
- "name": "config",
1278
- "writable": true,
1279
- "pda": {
1280
- "seeds": [
1281
- {
1282
- "kind": "const",
1283
- "value": [
1284
- 99,
1285
- 111,
1286
- 110,
1287
- 102,
1288
- 105,
1289
- 103
1290
- ]
1291
- }
1292
- ]
1293
- }
1294
- },
1295
- {
1296
- "name": "rate_limit_config",
1297
- "writable": true,
1298
- "pda": {
1299
- "seeds": [
1300
- {
1301
- "kind": "const",
1302
- "value": [
1303
- 114,
1304
- 97,
1305
- 116,
1306
- 101,
1307
- 95,
1308
- 108,
1309
- 105,
1310
- 109,
1311
- 105,
1312
- 116,
1313
- 95,
1314
- 99,
1315
- 111,
1316
- 110,
1317
- 102,
1318
- 105,
1319
- 103
1320
- ]
1321
- }
1322
- ]
1323
- }
1324
- },
1325
- {
1326
- "name": "admin",
1327
- "writable": true,
1328
- "signer": true
1329
- },
1330
- {
1331
- "name": "system_program",
1332
- "address": "11111111111111111111111111111111"
1333
- }
1334
- ],
1335
- "args": [
1336
- {
1337
- "name": "block_usd_cap",
1338
- "type": "u128"
1339
- }
1340
- ]
1341
- },
1342
- {
1343
- "name": "set_caps_usd",
1344
- "docs": [
1345
- "@notice Set USD caps"
1346
- ],
1347
- "discriminator": [
1348
- 136,
1349
- 160,
1350
- 17,
1351
- 54,
1352
- 239,
1353
- 108,
1354
- 125,
1355
- 129
1356
- ],
1357
- "accounts": [
1358
- {
1359
- "name": "config",
1360
- "writable": true,
1361
- "pda": {
1362
- "seeds": [
1363
- {
1364
- "kind": "const",
1365
- "value": [
1366
- 99,
1367
- 111,
1368
- 110,
1369
- 102,
1370
- 105,
1371
- 103
1372
- ]
1373
- }
1374
- ]
1375
- }
1376
- },
1377
- {
1378
- "name": "admin",
1379
- "signer": true
1380
- }
1381
- ],
1382
- "args": [
1383
- {
1384
- "name": "min_cap",
1385
- "type": "u128"
1386
- },
1387
- {
1388
- "name": "max_cap",
1389
- "type": "u128"
1390
- }
1391
- ]
1392
- },
1393
- {
1394
- "name": "set_protocol_fee",
1395
- "docs": [
1396
- "@notice Set flat protocol fee (lamports) for inbound send_universal_tx.",
1397
- "Not gated by `!config.paused` so the admin can disable fees during an emergency pause."
1398
- ],
1399
- "discriminator": [
1400
- 173,
1401
- 239,
1402
- 83,
1403
- 242,
1404
- 136,
1405
- 43,
1406
- 144,
1407
- 217
1408
- ],
1409
- "accounts": [
1410
- {
1411
- "name": "config",
1412
- "pda": {
1413
- "seeds": [
1414
- {
1415
- "kind": "const",
1416
- "value": [
1417
- 99,
1418
- 111,
1419
- 110,
1420
- 102,
1421
- 105,
1422
- 103
1423
- ]
1424
- }
1425
- ]
1426
- }
1427
- },
1428
- {
1429
- "name": "fee_vault",
1430
- "writable": true,
1431
- "pda": {
1432
- "seeds": [
1433
- {
1434
- "kind": "const",
1435
- "value": [
1436
- 102,
1437
- 101,
1438
- 101,
1439
- 95,
1440
- 118,
1441
- 97,
1442
- 117,
1443
- 108,
1444
- 116
1445
- ]
1446
- }
1447
- ]
1448
- }
1449
- },
1450
- {
1451
- "name": "admin",
1452
- "writable": true,
1453
- "signer": true
1454
- },
1455
- {
1456
- "name": "system_program",
1457
- "address": "11111111111111111111111111111111"
1458
- }
1459
- ],
1460
- "args": [
1461
- {
1462
- "name": "fee_lamports",
1463
- "type": "u64"
1464
- }
1465
- ]
1466
- },
1467
- {
1468
- "name": "set_pyth_confidence_threshold",
1469
- "docs": [
1470
- "@notice Set Pyth confidence threshold"
1471
- ],
1472
- "discriminator": [
1473
- 213,
1474
- 69,
1475
- 242,
1476
- 123,
1477
- 122,
1478
- 165,
1479
- 125,
1480
- 21
1481
- ],
1482
- "accounts": [
1483
- {
1484
- "name": "config",
1485
- "writable": true,
1486
- "pda": {
1487
- "seeds": [
1488
- {
1489
- "kind": "const",
1490
- "value": [
1491
- 99,
1492
- 111,
1493
- 110,
1494
- 102,
1495
- 105,
1496
- 103
1497
- ]
1498
- }
1499
- ]
1500
- }
1501
- },
1502
- {
1503
- "name": "admin",
1504
- "signer": true
1505
- }
1506
- ],
1507
- "args": [
1508
- {
1509
- "name": "threshold",
1510
- "type": "u64"
1511
- }
1512
- ]
1513
- },
1514
- {
1515
- "name": "set_pyth_price_feed",
1516
- "docs": [
1517
- "@notice Set Pyth price feed"
1518
- ],
1519
- "discriminator": [
1520
- 202,
1521
- 185,
1522
- 109,
1523
- 150,
1524
- 255,
1525
- 130,
1526
- 210,
1527
- 208
1528
- ],
1529
- "accounts": [
1530
- {
1531
- "name": "config",
1532
- "writable": true,
1533
- "pda": {
1534
- "seeds": [
1535
- {
1536
- "kind": "const",
1537
- "value": [
1538
- 99,
1539
- 111,
1540
- 110,
1541
- 102,
1542
- 105,
1543
- 103
1544
- ]
1545
- }
1546
- ]
1547
- }
1548
- },
1549
- {
1550
- "name": "admin",
1551
- "signer": true
1552
- }
1553
- ],
1554
- "args": [
1555
- {
1556
- "name": "price_feed",
1557
- "type": "pubkey"
1558
- }
1559
- ]
1560
- },
1561
- {
1562
- "name": "set_token_rate_limit",
1563
- "docs": [
1564
- "@notice Set token-specific rate limit threshold"
1565
- ],
1566
- "discriminator": [
1567
- 67,
1568
- 225,
1569
- 226,
1570
- 248,
1571
- 119,
1572
- 98,
1573
- 18,
1574
- 68
1575
- ],
1576
- "accounts": [
1577
- {
1578
- "name": "config",
1579
- "writable": true,
1580
- "pda": {
1581
- "seeds": [
1582
- {
1583
- "kind": "const",
1584
- "value": [
1585
- 99,
1586
- 111,
1587
- 110,
1588
- 102,
1589
- 105,
1590
- 103
1591
- ]
1592
- }
1593
- ]
1594
- }
1595
- },
1596
- {
1597
- "name": "token_rate_limit",
1598
- "writable": true,
1599
- "pda": {
1600
- "seeds": [
1601
- {
1602
- "kind": "const",
1603
- "value": [
1604
- 114,
1605
- 97,
1606
- 116,
1607
- 101,
1608
- 95,
1609
- 108,
1610
- 105,
1611
- 109,
1612
- 105,
1613
- 116
1614
- ]
1615
- },
1616
- {
1617
- "kind": "account",
1618
- "path": "token_mint"
1619
- }
1620
- ]
1621
- }
1622
- },
1623
- {
1624
- "name": "token_mint"
1625
- },
1626
- {
1627
- "name": "admin",
1628
- "writable": true,
1629
- "signer": true
1630
- },
1631
- {
1632
- "name": "system_program",
1633
- "address": "11111111111111111111111111111111"
1634
- }
1635
- ],
1636
- "args": [
1637
- {
1638
- "name": "limit_threshold",
1639
- "type": "u128"
1640
- }
1641
- ]
1642
- },
1643
- {
1644
- "name": "unpause",
1645
- "docs": [
1646
- "@notice Unpause the gateway"
1647
- ],
1648
- "discriminator": [
1649
- 169,
1650
- 144,
1651
- 4,
1652
- 38,
1653
- 10,
1654
- 141,
1655
- 188,
1656
- 255
1657
- ],
1658
- "accounts": [
1659
- {
1660
- "name": "config",
1661
- "writable": true,
1662
- "pda": {
1663
- "seeds": [
1664
- {
1665
- "kind": "const",
1666
- "value": [
1667
- 99,
1668
- 111,
1669
- 110,
1670
- 102,
1671
- 105,
1672
- 103
1673
- ]
1674
- }
1675
- ]
1676
- }
1677
- },
1678
- {
1679
- "name": "pauser",
1680
- "signer": true
1681
- }
1682
- ],
1683
- "args": []
1684
- },
1685
- {
1686
- "name": "update_epoch_duration",
1687
- "docs": [
1688
- "@notice Update epoch duration for rate limiting"
1689
- ],
1690
- "discriminator": [
1691
- 145,
1692
- 173,
1693
- 2,
1694
- 249,
1695
- 226,
1696
- 157,
1697
- 29,
1698
- 104
1699
- ],
1700
- "accounts": [
1701
- {
1702
- "name": "config",
1703
- "writable": true,
1704
- "pda": {
1705
- "seeds": [
1706
- {
1707
- "kind": "const",
1708
- "value": [
1709
- 99,
1710
- 111,
1711
- 110,
1712
- 102,
1713
- 105,
1714
- 103
1715
- ]
1716
- }
1717
- ]
1718
- }
1719
- },
1720
- {
1721
- "name": "rate_limit_config",
1722
- "writable": true,
1723
- "pda": {
1724
- "seeds": [
1725
- {
1726
- "kind": "const",
1727
- "value": [
1728
- 114,
1729
- 97,
1730
- 116,
1731
- 101,
1732
- 95,
1733
- 108,
1734
- 105,
1735
- 109,
1736
- 105,
1737
- 116,
1738
- 95,
1739
- 99,
1740
- 111,
1741
- 110,
1742
- 102,
1743
- 105,
1744
- 103
1745
- ]
1746
- }
1747
- ]
1748
- }
1749
- },
1750
- {
1751
- "name": "admin",
1752
- "writable": true,
1753
- "signer": true
1754
- },
1755
- {
1756
- "name": "system_program",
1757
- "address": "11111111111111111111111111111111"
1758
- }
1759
- ],
1760
- "args": [
1761
- {
1762
- "name": "epoch_duration_sec",
1763
- "type": "u64"
1764
- }
1765
- ]
1766
- },
1767
- {
1768
- "name": "update_tss",
1769
- "discriminator": [
1770
- 227,
1771
- 136,
1772
- 3,
1773
- 242,
1774
- 177,
1775
- 168,
1776
- 10,
1777
- 160
1778
- ],
1779
- "accounts": [
1780
- {
1781
- "name": "tss_pda",
1782
- "writable": true,
1783
- "pda": {
1784
- "seeds": [
1785
- {
1786
- "kind": "const",
1787
- "value": [
1788
- 116,
1789
- 115,
1790
- 115,
1791
- 112,
1792
- 100,
1793
- 97,
1794
- 95,
1795
- 118,
1796
- 50
1797
- ]
1798
- }
1799
- ]
1800
- }
1801
- },
1802
- {
1803
- "name": "config",
1804
- "pda": {
1805
- "seeds": [
1806
- {
1807
- "kind": "const",
1808
- "value": [
1809
- 99,
1810
- 111,
1811
- 110,
1812
- 102,
1813
- 105,
1814
- 103
1815
- ]
1816
- }
1817
- ]
1818
- }
1819
- },
1820
- {
1821
- "name": "authority",
1822
- "signer": true
1823
- }
1824
- ],
1825
- "args": [
1826
- {
1827
- "name": "tss_eth_address",
1828
- "type": {
1829
- "array": [
1830
- "u8",
1831
- 20
1832
- ]
1833
- }
1834
- },
1835
- {
1836
- "name": "chain_id",
1837
- "type": "string"
1838
- }
1839
- ]
1840
- }
1841
- ],
1842
- "accounts": [
1843
- {
1844
- "name": "Config",
1845
- "discriminator": [
1846
- 155,
1847
- 12,
1848
- 170,
1849
- 224,
1850
- 30,
1851
- 250,
1852
- 204,
1853
- 130
1854
- ]
1855
- },
1856
- {
1857
- "name": "ExecutedSubTx",
1858
- "discriminator": [
1859
- 221,
1860
- 204,
1861
- 118,
1862
- 83,
1863
- 194,
1864
- 194,
1865
- 141,
1866
- 237
1867
- ]
1868
- },
1869
- {
1870
- "name": "FeeVault",
1871
- "discriminator": [
1872
- 192,
1873
- 178,
1874
- 69,
1875
- 232,
1876
- 58,
1877
- 149,
1878
- 157,
1879
- 132
1880
- ]
1881
- },
1882
- {
1883
- "name": "PriceUpdateV2",
1884
- "discriminator": [
1885
- 34,
1886
- 241,
1887
- 35,
1888
- 99,
1889
- 157,
1890
- 126,
1891
- 244,
1892
- 205
1893
- ]
1894
- },
1895
- {
1896
- "name": "RateLimitConfig",
1897
- "discriminator": [
1898
- 172,
1899
- 233,
1900
- 8,
1901
- 17,
1902
- 15,
1903
- 174,
1904
- 216,
1905
- 176
1906
- ]
1907
- },
1908
- {
1909
- "name": "TokenRateLimit",
1910
- "discriminator": [
1911
- 129,
1912
- 99,
1913
- 70,
1914
- 230,
1915
- 57,
1916
- 181,
1917
- 132,
1918
- 97
1919
- ]
1920
- },
1921
- {
1922
- "name": "TssPda",
1923
- "discriminator": [
1924
- 121,
1925
- 138,
1926
- 162,
1927
- 251,
1928
- 127,
1929
- 95,
1930
- 238,
1931
- 135
1932
- ]
1933
- }
1934
- ],
1935
- "events": [
1936
- {
1937
- "name": "BlockUsdCapUpdated",
1938
- "discriminator": [
1939
- 69,
1940
- 44,
1941
- 151,
1942
- 48,
1943
- 36,
1944
- 74,
1945
- 176,
1946
- 194
1947
- ]
1948
- },
1949
- {
1950
- "name": "CapsUpdated",
1951
- "discriminator": [
1952
- 147,
1953
- 181,
1954
- 117,
1955
- 249,
1956
- 72,
1957
- 147,
1958
- 156,
1959
- 255
1960
- ]
1961
- },
1962
- {
1963
- "name": "EpochDurationUpdated",
1964
- "discriminator": [
1965
- 167,
1966
- 122,
1967
- 82,
1968
- 178,
1969
- 133,
1970
- 191,
1971
- 19,
1972
- 129
1973
- ]
1974
- },
1975
- {
1976
- "name": "FundsRescued",
1977
- "discriminator": [
1978
- 159,
1979
- 37,
1980
- 6,
1981
- 93,
1982
- 98,
1983
- 122,
1984
- 176,
1985
- 210
1986
- ]
1987
- },
1988
- {
1989
- "name": "ProtocolFeeCollected",
1990
- "discriminator": [
1991
- 149,
1992
- 0,
1993
- 167,
1994
- 154,
1995
- 105,
1996
- 146,
1997
- 209,
1998
- 134
1999
- ]
2000
- },
2001
- {
2002
- "name": "ProtocolFeeReimbursed",
2003
- "discriminator": [
2004
- 109,
2005
- 145,
2006
- 191,
2007
- 216,
2008
- 237,
2009
- 169,
2010
- 121,
2011
- 222
2012
- ]
2013
- },
2014
- {
2015
- "name": "ProtocolFeeUpdated",
2016
- "discriminator": [
2017
- 172,
2018
- 56,
2019
- 83,
2020
- 113,
2021
- 219,
2022
- 69,
2023
- 69,
2024
- 105
2025
- ]
2026
- },
2027
- {
2028
- "name": "RevertUniversalTx",
2029
- "discriminator": [
2030
- 249,
2031
- 74,
2032
- 39,
2033
- 203,
2034
- 149,
2035
- 54,
2036
- 48,
2037
- 186
2038
- ]
2039
- },
2040
- {
2041
- "name": "TokenRateLimitUpdated",
2042
- "discriminator": [
2043
- 73,
2044
- 75,
2045
- 54,
2046
- 189,
2047
- 59,
2048
- 130,
2049
- 39,
2050
- 59
2051
- ]
2052
- },
2053
- {
2054
- "name": "UniversalTx",
2055
- "discriminator": [
2056
- 108,
2057
- 154,
2058
- 216,
2059
- 41,
2060
- 181,
2061
- 234,
2062
- 29,
2063
- 124
2064
- ]
2065
- },
2066
- {
2067
- "name": "UniversalTxFinalized",
2068
- "discriminator": [
2069
- 179,
2070
- 64,
2071
- 150,
2072
- 112,
2073
- 117,
2074
- 140,
2075
- 156,
2076
- 37
2077
- ]
2078
- }
2079
- ],
2080
- "errors": [
2081
- {
2082
- "code": 6000,
2083
- "name": "Unauthorized",
2084
- "msg": "Unauthorized access"
2085
- },
2086
- {
2087
- "code": 6001,
2088
- "name": "InvalidAmount",
2089
- "msg": "Invalid amount"
2090
- },
2091
- {
2092
- "code": 6002,
2093
- "name": "InvalidRecipient",
2094
- "msg": "Invalid recipient"
2095
- },
2096
- {
2097
- "code": 6003,
2098
- "name": "BelowMinCap",
2099
- "msg": "Amount below minimum cap"
2100
- },
2101
- {
2102
- "code": 6004,
2103
- "name": "AboveMaxCap",
2104
- "msg": "Amount above maximum cap"
2105
- },
2106
- {
2107
- "code": 6005,
2108
- "name": "ZeroAddress",
2109
- "msg": "Zero address not allowed"
2110
- },
2111
- {
2112
- "code": 6006,
2113
- "name": "InvalidCapRange",
2114
- "msg": "Invalid cap range"
2115
- },
2116
- {
2117
- "code": 6007,
2118
- "name": "InvalidPrice",
2119
- "msg": "Invalid price data"
2120
- },
2121
- {
2122
- "code": 6008,
2123
- "name": "InvalidOwner",
2124
- "msg": "Invalid owner"
2125
- },
2126
- {
2127
- "code": 6009,
2128
- "name": "Paused",
2129
- "msg": "Contract is paused"
2130
- },
2131
- {
2132
- "code": 6010,
2133
- "name": "InvalidInput",
2134
- "msg": "Invalid input"
2135
- },
2136
- {
2137
- "code": 6011,
2138
- "name": "InvalidTxType",
2139
- "msg": "Invalid transaction type"
2140
- },
2141
- {
2142
- "code": 6012,
2143
- "name": "InvalidMint",
2144
- "msg": "Invalid mint"
2145
- },
2146
- {
2147
- "code": 6013,
2148
- "name": "InsufficientBalance",
2149
- "msg": "Insufficient balance"
2150
- },
2151
- {
2152
- "code": 6014,
2153
- "name": "InvalidToken",
2154
- "msg": "Invalid token"
2155
- },
2156
- {
2157
- "code": 6015,
2158
- "name": "BlockUsdCapExceeded",
2159
- "msg": "Block USD cap exceeded"
2160
- },
2161
- {
2162
- "code": 6016,
2163
- "name": "RateLimitExceeded",
2164
- "msg": "Rate limit exceeded"
2165
- },
2166
- {
2167
- "code": 6017,
2168
- "name": "InvalidAccount",
2169
- "msg": "Invalid account"
2170
- },
2171
- {
2172
- "code": 6018,
2173
- "name": "NotSupported",
2174
- "msg": "Token not supported"
2175
- },
2176
- {
2177
- "code": 6019,
2178
- "name": "MessageHashMismatch",
2179
- "msg": "Message hash mismatch"
2180
- },
2181
- {
2182
- "code": 6020,
2183
- "name": "TssAuthFailed",
2184
- "msg": "TSS authentication failed"
2185
- },
2186
- {
2187
- "code": 6021,
2188
- "name": "AccountListLengthMismatch",
2189
- "msg": "Account list length mismatch"
2190
- },
2191
- {
2192
- "code": 6022,
2193
- "name": "AccountPubkeyMismatch",
2194
- "msg": "Account pubkey mismatch"
2195
- },
2196
- {
2197
- "code": 6023,
2198
- "name": "AccountWritableFlagMismatch",
2199
- "msg": "Account writable flag mismatch"
2200
- },
2201
- {
2202
- "code": 6024,
2203
- "name": "UnexpectedOuterSigner",
2204
- "msg": "Unexpected outer signer in remaining accounts"
2205
- },
2206
- {
2207
- "code": 6025,
2208
- "name": "InvalidProgram",
2209
- "msg": "Destination program is not executable"
2210
- },
2211
- {
2212
- "code": 6026,
2213
- "name": "InvalidInstruction",
2214
- "msg": "Invalid instruction"
2215
- },
2216
- {
2217
- "code": 6027,
2218
- "name": "InsufficientProtocolFee",
2219
- "msg": "Insufficient protocol fee"
2220
- },
2221
- {
2222
- "code": 6028,
2223
- "name": "InsufficientFeePool",
2224
- "msg": "Fee vault has insufficient balance to reimburse relayer"
2225
- }
2226
- ],
2227
- "types": [
2228
- {
2229
- "name": "BlockUsdCapUpdated",
2230
- "type": {
2231
- "kind": "struct",
2232
- "fields": [
2233
- {
2234
- "name": "block_usd_cap",
2235
- "type": "u128"
2236
- }
2237
- ]
2238
- }
2239
- },
2240
- {
2241
- "name": "CapsUpdated",
2242
- "type": {
2243
- "kind": "struct",
2244
- "fields": [
2245
- {
2246
- "name": "min_cap_usd",
2247
- "type": "u128"
2248
- },
2249
- {
2250
- "name": "max_cap_usd",
2251
- "type": "u128"
2252
- }
2253
- ]
2254
- }
2255
- },
2256
- {
2257
- "name": "Config",
2258
- "docs": [
2259
- "Gateway configuration state (authorities, caps, oracle).",
2260
- "PDA: `[b\"config\"]`. Holds USD caps (8 decimals) for gas-route deposits and oracle config."
2261
- ],
2262
- "type": {
2263
- "kind": "struct",
2264
- "fields": [
2265
- {
2266
- "name": "admin",
2267
- "type": "pubkey"
2268
- },
2269
- {
2270
- "name": "tss_address",
2271
- "docs": [
2272
- "Legacy field — reserved for account layout compatibility.",
2273
- "Cannot be removed without a migration because it is part of the deployed on-chain layout."
2274
- ],
2275
- "type": "pubkey"
2276
- },
2277
- {
2278
- "name": "pauser",
2279
- "type": "pubkey"
2280
- },
2281
- {
2282
- "name": "min_cap_universal_tx_usd",
2283
- "type": "u128"
2284
- },
2285
- {
2286
- "name": "max_cap_universal_tx_usd",
2287
- "type": "u128"
2288
- },
2289
- {
2290
- "name": "paused",
2291
- "type": "bool"
2292
- },
2293
- {
2294
- "name": "bump",
2295
- "type": "u8"
2296
- },
2297
- {
2298
- "name": "vault_bump",
2299
- "type": "u8"
2300
- },
2301
- {
2302
- "name": "pyth_price_feed",
2303
- "type": "pubkey"
2304
- },
2305
- {
2306
- "name": "pyth_confidence_threshold",
2307
- "type": "u64"
2308
- }
2309
- ]
2310
- }
2311
- },
2312
- {
2313
- "name": "EpochDurationUpdated",
2314
- "type": {
2315
- "kind": "struct",
2316
- "fields": [
2317
- {
2318
- "name": "epoch_duration_sec",
2319
- "type": "u64"
2320
- }
2321
- ]
2322
- }
2323
- },
2324
- {
2325
- "name": "EpochUsage",
2326
- "docs": [
2327
- "Epoch usage tracking for rate limiting (matching EVM EpochUsage struct)"
2328
- ],
2329
- "type": {
2330
- "kind": "struct",
2331
- "fields": [
2332
- {
2333
- "name": "epoch",
2334
- "type": "u64"
2335
- },
2336
- {
2337
- "name": "used",
2338
- "type": "u128"
2339
- }
2340
- ]
2341
- }
2342
- },
2343
- {
2344
- "name": "ExecutedSubTx",
2345
- "docs": [
2346
- "Executed transaction tracker (parity with EVM `isExecuted[subTxID]` mapping).",
2347
- "PDA: `[b\"executed_sub_tx\", sub_tx_id]`.",
2348
- "Account existence = transaction executed (replay protection via `init` constraint)."
2349
- ],
2350
- "type": {
2351
- "kind": "struct",
2352
- "fields": []
2353
- }
2354
- },
2355
- {
2356
- "name": "FeeVault",
2357
- "docs": [
2358
- "Fee vault: holds protocol fee lamports and the per-tx fee config.",
2359
- "PDA: `[b\"fee_vault\"]`.",
2360
- "Lamports above rent-exempt minimum = spendable relayer reimbursement pool.",
2361
- "Vault (bridge funds) is never touched by fee logic — 1:1 invariant is structurally enforced."
2362
- ],
2363
- "type": {
2364
- "kind": "struct",
2365
- "fields": [
2366
- {
2367
- "name": "protocol_fee_lamports",
2368
- "type": "u64"
2369
- },
2370
- {
2371
- "name": "bump",
2372
- "type": "u8"
2373
- }
2374
- ]
2375
- }
2376
- },
2377
- {
2378
- "name": "FundsRescued",
2379
- "docs": [
2380
- "Emitted when locked funds are rescued back to recipient via TSS-verified rescue instruction."
2381
- ],
2382
- "type": {
2383
- "kind": "struct",
2384
- "fields": [
2385
- {
2386
- "name": "sub_tx_id",
2387
- "type": {
2388
- "array": [
2389
- "u8",
2390
- 32
2391
- ]
2392
- }
2393
- },
2394
- {
2395
- "name": "universal_tx_id",
2396
- "type": {
2397
- "array": [
2398
- "u8",
2399
- 32
2400
- ]
2401
- }
2402
- },
2403
- {
2404
- "name": "token",
2405
- "type": "pubkey"
2406
- },
2407
- {
2408
- "name": "amount",
2409
- "type": "u64"
2410
- },
2411
- {
2412
- "name": "revert_instruction",
2413
- "type": {
2414
- "defined": {
2415
- "name": "RevertInstructions"
2416
- }
2417
- }
2418
- }
2419
- ]
2420
- }
2421
- },
2422
- {
2423
- "name": "PriceData",
2424
- "type": {
2425
- "kind": "struct",
2426
- "fields": [
2427
- {
2428
- "name": "price",
2429
- "type": "i64"
2430
- },
2431
- {
2432
- "name": "exponent",
2433
- "type": "i32"
2434
- },
2435
- {
2436
- "name": "publish_time",
2437
- "type": "i64"
2438
- },
2439
- {
2440
- "name": "confidence",
2441
- "type": "u64"
2442
- }
2443
- ]
2444
- }
2445
- },
2446
- {
2447
- "name": "PriceFeedMessage",
2448
- "repr": {
2449
- "kind": "c"
2450
- },
2451
- "type": {
2452
- "kind": "struct",
2453
- "fields": [
2454
- {
2455
- "name": "feed_id",
2456
- "docs": [
2457
- "`FeedId` but avoid the type alias because of compatibility issues with Anchor's `idl-build` feature."
2458
- ],
2459
- "type": {
2460
- "array": [
2461
- "u8",
2462
- 32
2463
- ]
2464
- }
2465
- },
2466
- {
2467
- "name": "price",
2468
- "type": "i64"
2469
- },
2470
- {
2471
- "name": "conf",
2472
- "type": "u64"
2473
- },
2474
- {
2475
- "name": "exponent",
2476
- "type": "i32"
2477
- },
2478
- {
2479
- "name": "publish_time",
2480
- "docs": [
2481
- "The timestamp of this price update in seconds"
2482
- ],
2483
- "type": "i64"
2484
- },
2485
- {
2486
- "name": "prev_publish_time",
2487
- "docs": [
2488
- "The timestamp of the previous price update. This field is intended to allow users to",
2489
- "identify the single unique price update for any moment in time:",
2490
- "for any time t, the unique update is the one such that prev_publish_time < t <= publish_time.",
2491
- "",
2492
- "Note that there may not be such an update while we are migrating to the new message-sending logic,",
2493
- "as some price updates on pythnet may not be sent to other chains (because the message-sending",
2494
- "logic may not have triggered). We can solve this problem by making the message-sending mandatory",
2495
- "(which we can do once publishers have migrated over).",
2496
- "",
2497
- "Additionally, this field may be equal to publish_time if the message is sent on a slot where",
2498
- "where the aggregation was unsuccesful. This problem will go away once all publishers have",
2499
- "migrated over to a recent version of pyth-agent."
2500
- ],
2501
- "type": "i64"
2502
- },
2503
- {
2504
- "name": "ema_price",
2505
- "type": "i64"
2506
- },
2507
- {
2508
- "name": "ema_conf",
2509
- "type": "u64"
2510
- }
2511
- ]
2512
- }
2513
- },
2514
- {
2515
- "name": "PriceUpdateV2",
2516
- "docs": [
2517
- "A price update account. This account is used by the Pyth Receiver program to store a verified price update from a Pyth price feed.",
2518
- "It contains:",
2519
- "- `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.",
2520
- "- `verification_level`: The [`VerificationLevel`] of this price update. This represents how many Wormhole guardian signatures have been verified for this price update.",
2521
- "- `price_message`: The actual price update.",
2522
- "- `posted_slot`: The slot at which this price update was posted."
2523
- ],
2524
- "type": {
2525
- "kind": "struct",
2526
- "fields": [
2527
- {
2528
- "name": "write_authority",
2529
- "type": "pubkey"
2530
- },
2531
- {
2532
- "name": "verification_level",
2533
- "type": {
2534
- "defined": {
2535
- "name": "VerificationLevel"
2536
- }
2537
- }
2538
- },
2539
- {
2540
- "name": "price_message",
2541
- "type": {
2542
- "defined": {
2543
- "name": "PriceFeedMessage"
2544
- }
2545
- }
2546
- },
2547
- {
2548
- "name": "posted_slot",
2549
- "type": "u64"
2550
- }
2551
- ]
2552
- }
2553
- },
2554
- {
2555
- "name": "ProtocolFeeCollected",
2556
- "type": {
2557
- "kind": "struct",
2558
- "fields": [
2559
- {
2560
- "name": "payer",
2561
- "type": "pubkey"
2562
- },
2563
- {
2564
- "name": "amount_lamports",
2565
- "type": "u64"
2566
- },
2567
- {
2568
- "name": "native_amount_before",
2569
- "type": "u64"
2570
- },
2571
- {
2572
- "name": "native_amount_after",
2573
- "type": "u64"
2574
- }
2575
- ]
2576
- }
2577
- },
2578
- {
2579
- "name": "ProtocolFeeReimbursed",
2580
- "type": {
2581
- "kind": "struct",
2582
- "fields": [
2583
- {
2584
- "name": "sub_tx_id",
2585
- "type": {
2586
- "array": [
2587
- "u8",
2588
- 32
2589
- ]
2590
- }
2591
- },
2592
- {
2593
- "name": "relayer",
2594
- "type": "pubkey"
2595
- },
2596
- {
2597
- "name": "amount_lamports",
2598
- "type": "u64"
2599
- }
2600
- ]
2601
- }
2602
- },
2603
- {
2604
- "name": "ProtocolFeeUpdated",
2605
- "type": {
2606
- "kind": "struct",
2607
- "fields": [
2608
- {
2609
- "name": "new_fee_lamports",
2610
- "type": "u64"
2611
- }
2612
- ]
2613
- }
2614
- },
2615
- {
2616
- "name": "RateLimitConfig",
2617
- "docs": [
2618
- "Rate limiting configuration (separate account for backward compatibility)",
2619
- "PDA: `[b\"rate_limit_config\"]`. Stores global rate limiting settings."
2620
- ],
2621
- "type": {
2622
- "kind": "struct",
2623
- "fields": [
2624
- {
2625
- "name": "block_usd_cap",
2626
- "type": "u128"
2627
- },
2628
- {
2629
- "name": "epoch_duration_sec",
2630
- "type": "u64"
2631
- },
2632
- {
2633
- "name": "last_slot",
2634
- "type": "u64"
2635
- },
2636
- {
2637
- "name": "consumed_usd_in_block",
2638
- "type": "u128"
2639
- },
2640
- {
2641
- "name": "bump",
2642
- "type": "u8"
2643
- }
2644
- ]
2645
- }
2646
- },
2647
- {
2648
- "name": "RevertInstructions",
2649
- "docs": [
2650
- "Revert instructions for failed transactions (parity with EVM `RevertInstructions`)."
2651
- ],
2652
- "type": {
2653
- "kind": "struct",
2654
- "fields": [
2655
- {
2656
- "name": "revert_recipient",
2657
- "type": "pubkey"
2658
- },
2659
- {
2660
- "name": "revert_msg",
2661
- "type": "bytes"
2662
- }
2663
- ]
2664
- }
2665
- },
2666
- {
2667
- "name": "RevertUniversalTx",
2668
- "docs": [
2669
- "Revert withdraw event (parity with EVM `RevertUniversalTx`)."
2670
- ],
2671
- "type": {
2672
- "kind": "struct",
2673
- "fields": [
2674
- {
2675
- "name": "sub_tx_id",
2676
- "type": {
2677
- "array": [
2678
- "u8",
2679
- 32
2680
- ]
2681
- }
2682
- },
2683
- {
2684
- "name": "universal_tx_id",
2685
- "type": {
2686
- "array": [
2687
- "u8",
2688
- 32
2689
- ]
2690
- }
2691
- },
2692
- {
2693
- "name": "revert_recipient",
2694
- "type": "pubkey"
2695
- },
2696
- {
2697
- "name": "token",
2698
- "type": "pubkey"
2699
- },
2700
- {
2701
- "name": "amount",
2702
- "type": "u64"
2703
- },
2704
- {
2705
- "name": "revert_instruction",
2706
- "type": {
2707
- "defined": {
2708
- "name": "RevertInstructions"
2709
- }
2710
- }
2711
- }
2712
- ]
2713
- }
2714
- },
2715
- {
2716
- "name": "TokenRateLimit",
2717
- "docs": [
2718
- "Token-specific rate limiting state (matching EVM implementation)",
2719
- "PDA: `[b\"rate_limit\", token_mint]`. Tracks epoch-based usage per token."
2720
- ],
2721
- "type": {
2722
- "kind": "struct",
2723
- "fields": [
2724
- {
2725
- "name": "token_mint",
2726
- "type": "pubkey"
2727
- },
2728
- {
2729
- "name": "limit_threshold",
2730
- "type": "u128"
2731
- },
2732
- {
2733
- "name": "epoch_usage",
2734
- "type": {
2735
- "defined": {
2736
- "name": "EpochUsage"
2737
- }
2738
- }
2739
- },
2740
- {
2741
- "name": "bump",
2742
- "type": "u8"
2743
- }
2744
- ]
2745
- }
2746
- },
2747
- {
2748
- "name": "TokenRateLimitUpdated",
2749
- "type": {
2750
- "kind": "struct",
2751
- "fields": [
2752
- {
2753
- "name": "token_mint",
2754
- "type": "pubkey"
2755
- },
2756
- {
2757
- "name": "limit_threshold",
2758
- "type": "u128"
2759
- }
2760
- ]
2761
- }
2762
- },
2763
- {
2764
- "name": "TssPda",
2765
- "docs": [
2766
- "TSS state PDA for ECDSA verification (Ethereum-style secp256k1).",
2767
- "Stores 20-byte ETH address and chain id (Solana cluster pubkey as String)."
2768
- ],
2769
- "type": {
2770
- "kind": "struct",
2771
- "fields": [
2772
- {
2773
- "name": "tss_eth_address",
2774
- "type": {
2775
- "array": [
2776
- "u8",
2777
- 20
2778
- ]
2779
- }
2780
- },
2781
- {
2782
- "name": "chain_id",
2783
- "type": "string"
2784
- },
2785
- {
2786
- "name": "authority",
2787
- "docs": [
2788
- "Legacy field — set at init_tss but no longer used for authorization.",
2789
- "update_tss now checks config.admin. Kept for account layout compatibility."
2790
- ],
2791
- "type": "pubkey"
2792
- },
2793
- {
2794
- "name": "bump",
2795
- "type": "u8"
2796
- }
2797
- ]
2798
- }
2799
- },
2800
- {
2801
- "name": "TxType",
2802
- "docs": [
2803
- "Transaction types matching the EVM Universal Gateway `TX_TYPE`.",
2804
- "Kept 1:1 for relayer/event parity with the EVM implementation."
2805
- ],
2806
- "type": {
2807
- "kind": "enum",
2808
- "variants": [
2809
- {
2810
- "name": "Gas"
2811
- },
2812
- {
2813
- "name": "GasAndPayload"
2814
- },
2815
- {
2816
- "name": "Funds"
2817
- },
2818
- {
2819
- "name": "FundsAndPayload"
2820
- }
2821
- ]
2822
- }
2823
- },
2824
- {
2825
- "name": "UniversalTx",
2826
- "docs": [
2827
- "Universal transaction event (parity with EVM V0 `UniversalTx`).",
2828
- "Single event for both gas funding and funds movement."
2829
- ],
2830
- "type": {
2831
- "kind": "struct",
2832
- "fields": [
2833
- {
2834
- "name": "sender",
2835
- "type": "pubkey"
2836
- },
2837
- {
2838
- "name": "recipient",
2839
- "type": {
2840
- "array": [
2841
- "u8",
2842
- 20
2843
- ]
2844
- }
2845
- },
2846
- {
2847
- "name": "token",
2848
- "type": "pubkey"
2849
- },
2850
- {
2851
- "name": "amount",
2852
- "type": "u64"
2853
- },
2854
- {
2855
- "name": "payload",
2856
- "type": "bytes"
2857
- },
2858
- {
2859
- "name": "revert_recipient",
2860
- "type": "pubkey"
2861
- },
2862
- {
2863
- "name": "tx_type",
2864
- "type": {
2865
- "defined": {
2866
- "name": "TxType"
2867
- }
2868
- }
2869
- },
2870
- {
2871
- "name": "signature_data",
2872
- "type": "bytes"
2873
- },
2874
- {
2875
- "name": "from_cea",
2876
- "type": "bool"
2877
- }
2878
- ]
2879
- }
2880
- },
2881
- {
2882
- "name": "UniversalTxFinalized",
2883
- "docs": [
2884
- "Execute event (parity with EVM `UniversalTxFinalized`)."
2885
- ],
2886
- "type": {
2887
- "kind": "struct",
2888
- "fields": [
2889
- {
2890
- "name": "sub_tx_id",
2891
- "type": {
2892
- "array": [
2893
- "u8",
2894
- 32
2895
- ]
2896
- }
2897
- },
2898
- {
2899
- "name": "universal_tx_id",
2900
- "type": {
2901
- "array": [
2902
- "u8",
2903
- 32
2904
- ]
2905
- }
2906
- },
2907
- {
2908
- "name": "push_account",
2909
- "type": {
2910
- "array": [
2911
- "u8",
2912
- 20
2913
- ]
2914
- }
2915
- },
2916
- {
2917
- "name": "target",
2918
- "type": "pubkey"
2919
- },
2920
- {
2921
- "name": "token",
2922
- "type": "pubkey"
2923
- },
2924
- {
2925
- "name": "amount",
2926
- "type": "u64"
2927
- },
2928
- {
2929
- "name": "payload",
2930
- "type": "bytes"
2931
- }
2932
- ]
2933
- }
2934
- },
2935
- {
2936
- "name": "UniversalTxRequest",
2937
- "docs": [
2938
- "Universal transaction request (parity with EVM `UniversalTxRequest`)."
2939
- ],
2940
- "type": {
2941
- "kind": "struct",
2942
- "fields": [
2943
- {
2944
- "name": "recipient",
2945
- "type": {
2946
- "array": [
2947
- "u8",
2948
- 20
2949
- ]
2950
- }
2951
- },
2952
- {
2953
- "name": "token",
2954
- "type": "pubkey"
2955
- },
2956
- {
2957
- "name": "amount",
2958
- "type": "u64"
2959
- },
2960
- {
2961
- "name": "payload",
2962
- "type": "bytes"
2963
- },
2964
- {
2965
- "name": "revert_recipient",
2966
- "type": "pubkey"
2967
- },
2968
- {
2969
- "name": "signature_data",
2970
- "type": "bytes"
2971
- }
2972
- ]
2973
- }
2974
- },
2975
- {
2976
- "name": "VerificationLevel",
2977
- "docs": [
2978
- "Pyth price updates are bridged to all blockchains via Wormhole.",
2979
- "Using the price updates on another chain requires verifying the signatures of the Wormhole guardians.",
2980
- "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,",
2981
- "so we also allow for partial verification.",
2982
- "",
2983
- "This enum represents how much a price update has been verified:",
2984
- "- If `Full`, we have verified the signatures for two thirds of the current guardians.",
2985
- "- If `Partial`, only `num_signatures` guardian signatures have been checked.",
2986
- "",
2987
- "# Warning",
2988
- "Using partially verified price updates is dangerous, as it lowers the threshold of guardians that need to collude to produce a malicious price update."
2989
- ],
2990
- "type": {
2991
- "kind": "enum",
2992
- "variants": [
2993
- {
2994
- "name": "Partial",
2995
- "fields": [
2996
- {
2997
- "name": "num_signatures",
2998
- "type": "u8"
2999
- }
3000
- ]
3001
- },
3002
- {
3003
- "name": "Full"
3004
- }
3005
- ]
3006
- }
3007
- }
3008
- ]
3009
- }
1
+ { "address": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS", "metadata": { "name": "universal_gateway", "version": "0.1.0", "spec": "0.1.0", "description": "Universal Gateway for Solana - Cross-chain bridge and transaction router" }, "instructions": [{ "name": "finalize_universal_tx", "docs": ["@notice Unified outbound entrypoint: withdraw (mode 1) or execute (mode 2)", "@param instruction_id 1=withdraw (vault\u2192CEA\u2192recipient), 2=execute (vault\u2192CEA\u2192CPI)"], "discriminator": [222, 91, 238, 150, 75, 216, 2, 80], "accounts": [{ "name": "caller", "writable": true, "signer": true }, { "name": "config", "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "vault_sol", "docs": ["Vault SOL PDA - holds all bridged SOL"], "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [118, 97, 117, 108, 116] }] } }, { "name": "cea_authority", "docs": ["CEA (Chain Executor Account) - persistent identity per Push Chain user", "This PDA represents the user on Solana and can sign for target programs", "Auto-created by Solana on first transfer, persists across transactions"], "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [112, 117, 115, 104, 95, 105, 100, 101, 110, 116, 105, 116, 121] }, { "kind": "arg", "path": "push_account" }] } }, { "name": "tss_pda", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115, 112, 100, 97, 95, 118, 50] }] } }, { "name": "executed_sub_tx", "docs": ["Executed transaction tracker (replay protection)", "Relayer pays for this account creation and gets reimbursed via gas_fee"], "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [101, 120, 101, 99, 117, 116, 101, 100, 95, 115, 117, 98, 95, 116, 120] }, { "kind": "arg", "path": "sub_tx_id" }] } }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "destination_program", "docs": ["Pass system program id for withdraw, it's ignored"] }, { "name": "recipient", "writable": true, "optional": true }, { "name": "vault_ata", "docs": ["Vault ATA for this mint \u2014 always initialized (deposit path guarantees existence)"], "writable": true, "optional": true }, { "name": "cea_ata", "writable": true, "optional": true }, { "name": "mint", "optional": true }, { "name": "token_program", "optional": true, "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "rent", "optional": true, "address": "SysvarRent111111111111111111111111111111111" }, { "name": "associated_token_program", "optional": true, "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { "name": "recipient_ata", "writable": true, "optional": true }, { "name": "rate_limit_config", "optional": true, "pda": { "seeds": [{ "kind": "const", "value": [114, 97, 116, 101, 95, 108, 105, 109, 105, 116, 95, 99, 111, 110, 102, 105, 103] }] } }, { "name": "token_rate_limit", "docs": ["Token-specific rate limit state (CEA withdrawal path only)"], "writable": true, "optional": true }], "args": [{ "name": "instruction_id", "type": "u8" }, { "name": "sub_tx_id", "type": { "array": ["u8", 32] } }, { "name": "universal_tx_id", "type": { "array": ["u8", 32] } }, { "name": "amount", "type": "u64" }, { "name": "push_account", "type": { "array": ["u8", 20] } }, { "name": "writable_flags", "type": "bytes" }, { "name": "ix_data", "type": "bytes" }, { "name": "gas_fee", "type": "u64" }, { "name": "signature", "type": { "array": ["u8", 64] } }, { "name": "recovery_id", "type": "u8" }, { "name": "message_hash", "type": { "array": ["u8", 32] } }] }, { "name": "get_sol_price", "docs": ["@notice View function for SOL price (locker-compatible)"], "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, 112, 100, 97, 95, 118, 50] }] } }, { "name": "config", "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "authority", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "tss_eth_address", "type": { "array": ["u8", 20] } }, { "name": "chain_id", "type": "string" }] }, { "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": "rescue_funds", "docs": ["@notice TSS-verified emergency rescue of locked funds from vault.", "SOL path: token_mint = None. SPL path: token_mint = Some.", "Replay-protected via ExecutedSubTx PDA"], "discriminator": [238, 204, 8, 81, 89, 43, 193, 103], "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": "fee_vault", "docs": ["Fee vault \u2014 relayer gas reimbursement source."], "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [102, 101, 101, 95, 118, 97, 117, 108, 116] }] } }, { "name": "tss_pda", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115, 112, 100, 97, 95, 118, 50] }] } }, { "name": "recipient", "docs": ["recipient_token_account.owner and used as the canonical identity in the TSS message."], "writable": true }, { "name": "executed_sub_tx", "docs": ["Replay protection (EVM parity: isExecuted[subTxId])."], "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [101, 120, 101, 99, 117, 116, 101, 100, 95, 115, 117, 98, 95, 116, 120] }, { "kind": "arg", "path": "sub_tx_id" }] } }, { "name": "caller", "docs": ["The caller/relayer \u2014 pays transaction fees, receives gas_fee reimbursement."], "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "token_vault", "docs": ["Vault ATA for this mint \u2014 holds bridged SPL tokens."], "writable": true, "optional": true }, { "name": "recipient_token_account", "docs": ["Recipient token account \u2014 must be owned by recipient and match token_mint."], "writable": true, "optional": true }, { "name": "token_mint", "optional": true }, { "name": "token_program", "optional": true, "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }], "args": [{ "name": "sub_tx_id", "type": { "array": ["u8", 32] } }, { "name": "universal_tx_id", "type": { "array": ["u8", 32] } }, { "name": "amount", "type": "u64" }, { "name": "gas_fee", "type": "u64" }, { "name": "signature", "type": { "array": ["u8", 64] } }, { "name": "recovery_id", "type": "u8" }, { "name": "message_hash", "type": { "array": ["u8", 32] } }] }, { "name": "revert_universal_tx", "docs": ["@notice TSS-verified unified revert (SOL and SPL) \u2014 EVM parity: `revertUniversalTx`.", "SOL path: token_mint = None. SPL path: token_mint = Some."], "discriminator": [124, 49, 81, 233, 23, 147, 82, 122], "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": "fee_vault", "docs": ["Fee vault \u2014 relayer gas reimbursement source."], "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [102, 101, 101, 95, 118, 97, 117, 108, 116] }] } }, { "name": "tss_pda", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [116, 115, 115, 112, 100, 97, 95, 118, 50] }] } }, { "name": "recipient", "docs": ["recipient_token_account.owner and used as canonical identity in TSS message."], "writable": true }, { "name": "executed_sub_tx", "docs": ["Replay protection (EVM parity: isExecuted[subTxId])."], "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [101, 120, 101, 99, 117, 116, 101, 100, 95, 115, 117, 98, 95, 116, 120] }, { "kind": "arg", "path": "sub_tx_id" }] } }, { "name": "caller", "docs": ["The caller/relayer \u2014 pays transaction fees, receives gas_fee reimbursement."], "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }, { "name": "token_vault", "docs": ["Vault ATA for this mint \u2014 holds bridged SPL tokens."], "writable": true, "optional": true }, { "name": "recipient_token_account", "docs": ["Recipient token account \u2014 must be owned by recipient and match token_mint."], "writable": true, "optional": true }, { "name": "token_mint", "optional": true }, { "name": "token_program", "optional": true, "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }], "args": [{ "name": "sub_tx_id", "type": { "array": ["u8", 32] } }, { "name": "universal_tx_id", "type": { "array": ["u8", 32] } }, { "name": "amount", "type": "u64" }, { "name": "revert_instruction", "type": { "defined": { "name": "RevertInstructions" } } }, { "name": "gas_fee", "type": "u64" }, { "name": "signature", "type": { "array": ["u8", 64] } }, { "name": "recovery_id", "type": "u8" }, { "name": "message_hash", "type": { "array": ["u8", 32] } }] }, { "name": "send_universal_tx", "docs": ["@notice Universal transaction entrypoint with internal routing (EVM parity).", "@dev Native amount parameter mirrors `msg.value` on EVM chains.", "All routing (gas / funds / batching) is handled inside the deposit module."], "discriminator": [145, 19, 164, 55, 165, 220, 23, 97], "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": "fee_vault", "docs": ["Fee vault: receives the flat protocol fee per inbound tx.", "Separate from bridge vault to preserve the 1:1 bridge invariant."], "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [102, 101, 101, 95, 118, 97, 117, 108, 116] }] } }, { "name": "user_token_account", "docs": ["Only required for SPL token routes; can be omitted (pass null) on native SOL routes."], "writable": true, "optional": true }, { "name": "gateway_token_account", "docs": ["Only required for SPL token routes; can be omitted (pass null) on native SOL routes."], "writable": true, "optional": true }, { "name": "user", "writable": true, "signer": true }, { "name": "price_update" }, { "name": "rate_limit_config", "docs": ["Rate limit config - REQUIRED for universal entrypoint"], "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [114, 97, 116, 101, 95, 108, 105, 109, 105, 116, 95, 99, 111, 110, 102, 105, 103] }] } }, { "name": "token_rate_limit", "docs": ["Token rate limit - REQUIRED for universal entrypoint", "NOTE: For native SOL, use Pubkey::default() as the token_mint when deriving this PDA"], "writable": true }, { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "req", "type": { "defined": { "name": "UniversalTxRequest" } } }, { "name": "native_amount", "type": "u64" }] }, { "name": "set_authorities", "docs": ["@notice Update admin and/or pauser authority."], "discriminator": [124, 254, 44, 240, 197, 70, 190, 107], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "admin", "signer": true }], "args": [{ "name": "new_admin", "type": { "option": "pubkey" } }, { "name": "new_pauser", "type": { "option": "pubkey" } }] }, { "name": "set_block_usd_cap", "docs": ["@notice Set block-based USD cap for rate limiting"], "discriminator": [205, 253, 33, 164, 220, 216, 42, 50], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "rate_limit_config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [114, 97, 116, 101, 95, 108, 105, 109, 105, 116, 95, 99, 111, 110, 102, 105, 103] }] } }, { "name": "admin", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "block_usd_cap", "type": "u128" }] }, { "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_protocol_fee", "docs": ["@notice Set flat protocol fee (lamports) for inbound send_universal_tx.", "Not gated by `!config.paused` so the admin can disable fees during an emergency pause."], "discriminator": [173, 239, 83, 242, 136, 43, 144, 217], "accounts": [{ "name": "config", "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "fee_vault", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [102, 101, 101, 95, 118, 97, 117, 108, 116] }] } }, { "name": "admin", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "fee_lamports", "type": "u64" }] }, { "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_token_rate_limit", "docs": ["@notice Set token-specific rate limit threshold"], "discriminator": [67, 225, 226, 248, 119, 98, 18, 68], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "token_rate_limit", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [114, 97, 116, 101, 95, 108, 105, 109, 105, 116] }, { "kind": "account", "path": "token_mint" }] } }, { "name": "token_mint" }, { "name": "admin", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "limit_threshold", "type": "u128" }] }, { "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_epoch_duration", "docs": ["@notice Update epoch duration for rate limiting"], "discriminator": [145, 173, 2, 249, 226, 157, 29, 104], "accounts": [{ "name": "config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "rate_limit_config", "writable": true, "pda": { "seeds": [{ "kind": "const", "value": [114, 97, 116, 101, 95, 108, 105, 109, 105, 116, 95, 99, 111, 110, 102, 105, 103] }] } }, { "name": "admin", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" }], "args": [{ "name": "epoch_duration_sec", "type": "u64" }] }, { "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, 112, 100, 97, 95, 118, 50] }] } }, { "name": "config", "pda": { "seeds": [{ "kind": "const", "value": [99, 111, 110, 102, 105, 103] }] } }, { "name": "authority", "signer": true }], "args": [{ "name": "tss_eth_address", "type": { "array": ["u8", 20] } }, { "name": "chain_id", "type": "string" }] }], "accounts": [{ "name": "Config", "discriminator": [155, 12, 170, 224, 30, 250, 204, 130] }, { "name": "ExecutedSubTx", "discriminator": [221, 204, 118, 83, 194, 194, 141, 237] }, { "name": "FeeVault", "discriminator": [192, 178, 69, 232, 58, 149, 157, 132] }, { "name": "PriceUpdateV2", "discriminator": [34, 241, 35, 99, 157, 126, 244, 205] }, { "name": "RateLimitConfig", "discriminator": [172, 233, 8, 17, 15, 174, 216, 176] }, { "name": "TokenRateLimit", "discriminator": [129, 99, 70, 230, 57, 181, 132, 97] }, { "name": "TssPda", "discriminator": [121, 138, 162, 251, 127, 95, 238, 135] }], "events": [{ "name": "BlockUsdCapUpdated", "discriminator": [69, 44, 151, 48, 36, 74, 176, 194] }, { "name": "CapsUpdated", "discriminator": [147, 181, 117, 249, 72, 147, 156, 255] }, { "name": "EpochDurationUpdated", "discriminator": [167, 122, 82, 178, 133, 191, 19, 129] }, { "name": "FundsRescued", "discriminator": [159, 37, 6, 93, 98, 122, 176, 210] }, { "name": "ProtocolFeeCollected", "discriminator": [149, 0, 167, 154, 105, 146, 209, 134] }, { "name": "ProtocolFeeReimbursed", "discriminator": [109, 145, 191, 216, 237, 169, 121, 222] }, { "name": "ProtocolFeeUpdated", "discriminator": [172, 56, 83, 113, 219, 69, 69, 105] }, { "name": "RevertUniversalTx", "discriminator": [249, 74, 39, 203, 149, 54, 48, 186] }, { "name": "TokenRateLimitUpdated", "discriminator": [73, 75, 54, 189, 59, 130, 39, 59] }, { "name": "UniversalTx", "discriminator": [108, 154, 216, 41, 181, 234, 29, 124] }, { "name": "UniversalTxFinalized", "discriminator": [179, 64, 150, 112, 117, 140, 156, 37] }], "errors": [{ "code": 6000, "name": "Unauthorized", "msg": "Unauthorized access" }, { "code": 6001, "name": "InvalidAmount", "msg": "Invalid amount" }, { "code": 6002, "name": "InvalidRecipient", "msg": "Invalid recipient" }, { "code": 6003, "name": "BelowMinCap", "msg": "Amount below minimum cap" }, { "code": 6004, "name": "AboveMaxCap", "msg": "Amount above maximum cap" }, { "code": 6005, "name": "ZeroAddress", "msg": "Zero address not allowed" }, { "code": 6006, "name": "InvalidCapRange", "msg": "Invalid cap range" }, { "code": 6007, "name": "InvalidPrice", "msg": "Invalid price data" }, { "code": 6008, "name": "InvalidOwner", "msg": "Invalid owner" }, { "code": 6009, "name": "Paused", "msg": "Contract is paused" }, { "code": 6010, "name": "InvalidInput", "msg": "Invalid input" }, { "code": 6011, "name": "InvalidTxType", "msg": "Invalid transaction type" }, { "code": 6012, "name": "InvalidMint", "msg": "Invalid mint" }, { "code": 6013, "name": "InsufficientBalance", "msg": "Insufficient balance" }, { "code": 6014, "name": "InvalidToken", "msg": "Invalid token" }, { "code": 6015, "name": "BlockUsdCapExceeded", "msg": "Block USD cap exceeded" }, { "code": 6016, "name": "RateLimitExceeded", "msg": "Rate limit exceeded" }, { "code": 6017, "name": "InvalidAccount", "msg": "Invalid account" }, { "code": 6018, "name": "NotSupported", "msg": "Token not supported" }, { "code": 6019, "name": "MessageHashMismatch", "msg": "Message hash mismatch" }, { "code": 6020, "name": "TssAuthFailed", "msg": "TSS authentication failed" }, { "code": 6021, "name": "AccountListLengthMismatch", "msg": "Account list length mismatch" }, { "code": 6022, "name": "AccountPubkeyMismatch", "msg": "Account pubkey mismatch" }, { "code": 6023, "name": "AccountWritableFlagMismatch", "msg": "Account writable flag mismatch" }, { "code": 6024, "name": "UnexpectedOuterSigner", "msg": "Unexpected outer signer in remaining accounts" }, { "code": 6025, "name": "InvalidProgram", "msg": "Destination program is not executable" }, { "code": 6026, "name": "InvalidInstruction", "msg": "Invalid instruction" }, { "code": 6027, "name": "InsufficientProtocolFee", "msg": "Insufficient protocol fee" }, { "code": 6028, "name": "InsufficientFeePool", "msg": "Fee vault has insufficient balance to reimburse relayer" }], "types": [{ "name": "BlockUsdCapUpdated", "type": { "kind": "struct", "fields": [{ "name": "block_usd_cap", "type": "u128" }] } }, { "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", "docs": ["Legacy field \u2014 reserved for account layout compatibility.", "Cannot be removed without a migration because it is part of the deployed on-chain layout."], "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": "EpochDurationUpdated", "type": { "kind": "struct", "fields": [{ "name": "epoch_duration_sec", "type": "u64" }] } }, { "name": "EpochUsage", "docs": ["Epoch usage tracking for rate limiting (matching EVM EpochUsage struct)"], "type": { "kind": "struct", "fields": [{ "name": "epoch", "type": "u64" }, { "name": "used", "type": "u128" }] } }, { "name": "ExecutedSubTx", "docs": ["Executed transaction tracker (parity with EVM `isExecuted[subTxID]` mapping).", "PDA: `[b\"executed_sub_tx\", sub_tx_id]`.", "Account existence = transaction executed (replay protection via `init` constraint)."], "type": { "kind": "struct", "fields": [] } }, { "name": "FeeVault", "docs": ["Fee vault: holds protocol fee lamports and the per-tx fee config.", "PDA: `[b\"fee_vault\"]`.", "Lamports above rent-exempt minimum = spendable relayer reimbursement pool.", "Vault (bridge funds) is never touched by fee logic \u2014 1:1 invariant is structurally enforced."], "type": { "kind": "struct", "fields": [{ "name": "protocol_fee_lamports", "type": "u64" }, { "name": "bump", "type": "u8" }] } }, { "name": "FundsRescued", "docs": ["Emitted when locked funds are rescued back to recipient via TSS-verified rescue instruction."], "type": { "kind": "struct", "fields": [{ "name": "sub_tx_id", "type": { "array": ["u8", 32] } }, { "name": "universal_tx_id", "type": { "array": ["u8", 32] } }, { "name": "token", "type": "pubkey" }, { "name": "amount", "type": "u64" }, { "name": "revert_instruction", "type": { "defined": { "name": "RevertInstructions" } } }] } }, { "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": "ProtocolFeeCollected", "type": { "kind": "struct", "fields": [{ "name": "payer", "type": "pubkey" }, { "name": "amount_lamports", "type": "u64" }, { "name": "native_amount_before", "type": "u64" }, { "name": "native_amount_after", "type": "u64" }] } }, { "name": "ProtocolFeeReimbursed", "type": { "kind": "struct", "fields": [{ "name": "sub_tx_id", "type": { "array": ["u8", 32] } }, { "name": "relayer", "type": "pubkey" }, { "name": "amount_lamports", "type": "u64" }] } }, { "name": "ProtocolFeeUpdated", "type": { "kind": "struct", "fields": [{ "name": "new_fee_lamports", "type": "u64" }] } }, { "name": "RateLimitConfig", "docs": ["Rate limiting configuration (separate account for backward compatibility)", "PDA: `[b\"rate_limit_config\"]`. Stores global rate limiting settings."], "type": { "kind": "struct", "fields": [{ "name": "block_usd_cap", "type": "u128" }, { "name": "epoch_duration_sec", "type": "u64" }, { "name": "last_slot", "type": "u64" }, { "name": "consumed_usd_in_block", "type": "u128" }, { "name": "bump", "type": "u8" }] } }, { "name": "RevertInstructions", "docs": ["Revert instructions for failed transactions (parity with EVM `RevertInstructions`)."], "type": { "kind": "struct", "fields": [{ "name": "revert_recipient", "type": "pubkey" }, { "name": "revert_msg", "type": "bytes" }] } }, { "name": "RevertUniversalTx", "docs": ["Revert withdraw event (parity with EVM `RevertUniversalTx`)."], "type": { "kind": "struct", "fields": [{ "name": "sub_tx_id", "type": { "array": ["u8", 32] } }, { "name": "universal_tx_id", "type": { "array": ["u8", 32] } }, { "name": "revert_recipient", "type": "pubkey" }, { "name": "token", "type": "pubkey" }, { "name": "amount", "type": "u64" }, { "name": "revert_instruction", "type": { "defined": { "name": "RevertInstructions" } } }] } }, { "name": "TokenRateLimit", "docs": ["Token-specific rate limiting state (matching EVM implementation)", "PDA: `[b\"rate_limit\", token_mint]`. Tracks epoch-based usage per token."], "type": { "kind": "struct", "fields": [{ "name": "token_mint", "type": "pubkey" }, { "name": "limit_threshold", "type": "u128" }, { "name": "epoch_usage", "type": { "defined": { "name": "EpochUsage" } } }, { "name": "bump", "type": "u8" }] } }, { "name": "TokenRateLimitUpdated", "type": { "kind": "struct", "fields": [{ "name": "token_mint", "type": "pubkey" }, { "name": "limit_threshold", "type": "u128" }] } }, { "name": "TssPda", "docs": ["TSS state PDA for ECDSA verification (Ethereum-style secp256k1).", "Stores 20-byte ETH address and chain id (Solana cluster pubkey as String)."], "type": { "kind": "struct", "fields": [{ "name": "tss_eth_address", "type": { "array": ["u8", 20] } }, { "name": "chain_id", "type": "string" }, { "name": "authority", "docs": ["Legacy field \u2014 set at init_tss but no longer used for authorization.", "update_tss now checks config.admin. Kept for account layout compatibility."], "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": "UniversalTx", "docs": ["Universal transaction event (parity with EVM V0 `UniversalTx`).", "Single event for both gas funding and funds movement."], "type": { "kind": "struct", "fields": [{ "name": "sender", "type": "pubkey" }, { "name": "recipient", "type": { "array": ["u8", 20] } }, { "name": "token", "type": "pubkey" }, { "name": "amount", "type": "u64" }, { "name": "payload", "type": "bytes" }, { "name": "revert_recipient", "type": "pubkey" }, { "name": "tx_type", "type": { "defined": { "name": "TxType" } } }, { "name": "signature_data", "type": "bytes" }, { "name": "from_cea", "type": "bool" }] } }, { "name": "UniversalTxFinalized", "docs": ["Execute event (parity with EVM `UniversalTxFinalized`)."], "type": { "kind": "struct", "fields": [{ "name": "sub_tx_id", "type": { "array": ["u8", 32] } }, { "name": "universal_tx_id", "type": { "array": ["u8", 32] } }, { "name": "push_account", "type": { "array": ["u8", 20] } }, { "name": "target", "type": "pubkey" }, { "name": "token", "type": "pubkey" }, { "name": "amount", "type": "u64" }, { "name": "payload", "type": "bytes" }] } }, { "name": "UniversalTxRequest", "docs": ["Universal transaction request (parity with EVM `UniversalTxRequest`)."], "type": { "kind": "struct", "fields": [{ "name": "recipient", "type": { "array": ["u8", 20] } }, { "name": "token", "type": "pubkey" }, { "name": "amount", "type": "u64" }, { "name": "payload", "type": "bytes" }, { "name": "revert_recipient", "type": "pubkey" }, { "name": "signature_data", "type": "bytes" }] } }, { "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" }] } }] }