@pushchain/core 2.1.11 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/package.json +4 -3
  3. package/src/lib/constants/abi/erc20.evm.d.ts +33 -0
  4. package/src/lib/constants/abi/erc20.evm.js +19 -0
  5. package/src/lib/constants/abi/erc20.evm.js.map +1 -1
  6. package/src/lib/constants/abi/universalGatewayV0.evm.d.ts +56 -9
  7. package/src/lib/constants/abi/universalGatewayV0.evm.js +1023 -64
  8. package/src/lib/constants/abi/universalGatewayV0.evm.js.map +1 -1
  9. package/src/lib/constants/abi/universalGatewayV0.json +1223 -206
  10. package/src/lib/constants/chain.d.ts +4 -0
  11. package/src/lib/constants/chain.js +24 -2
  12. package/src/lib/constants/chain.js.map +1 -1
  13. package/src/lib/constants/tokens.d.ts +1 -0
  14. package/src/lib/constants/tokens.js +3 -0
  15. package/src/lib/constants/tokens.js.map +1 -1
  16. package/src/lib/generated/v1/tx.d.ts +1 -2
  17. package/src/lib/generated/v1/tx.js +2 -1
  18. package/src/lib/generated/v1/tx.js.map +1 -1
  19. package/src/lib/orchestrator/orchestrator.d.ts +6 -2
  20. package/src/lib/orchestrator/orchestrator.js +645 -336
  21. package/src/lib/orchestrator/orchestrator.js.map +1 -1
  22. package/src/lib/orchestrator/payload-builders.d.ts +5 -0
  23. package/src/lib/orchestrator/payload-builders.js +58 -0
  24. package/src/lib/orchestrator/payload-builders.js.map +1 -0
  25. package/src/lib/push-chain/helpers/abis.d.ts +31 -0
  26. package/src/lib/push-chain/helpers/abis.js +75 -0
  27. package/src/lib/push-chain/helpers/abis.js.map +1 -0
  28. package/src/lib/push-chain/helpers/addresses.d.ts +1 -0
  29. package/src/lib/push-chain/helpers/addresses.js +5 -0
  30. package/src/lib/push-chain/helpers/addresses.js.map +1 -0
  31. package/src/lib/utils.d.ts +9 -0
  32. package/src/lib/utils.js +73 -0
  33. package/src/lib/utils.js.map +1 -1
  34. package/src/lib/vm-client/svm-client.js +26 -3
  35. package/src/lib/vm-client/svm-client.js.map +1 -1
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "address": "CFVSincHYbETh2k7w6u1ENEkjbSLtveRCEBupKidw2VS",
3
3
  "metadata": {
4
- "name": "pushsolanagateway",
4
+ "name": "universal_gateway",
5
5
  "version": "0.1.0",
6
6
  "spec": "0.1.0",
7
- "description": "Push Solana Gateway - Universal Gateway for Solana"
7
+ "description": "Universal Gateway for Solana - Cross-chain bridge and transaction router"
8
8
  },
9
9
  "instructions": [
10
10
  {
@@ -12,7 +12,16 @@
12
12
  "docs": [
13
13
  "@notice Legacy-compatible add funds event for offchain relayers (pushsolanalocker)"
14
14
  ],
15
- "discriminator": [132, 237, 76, 57, 80, 10, 179, 138],
15
+ "discriminator": [
16
+ 132,
17
+ 237,
18
+ 76,
19
+ 57,
20
+ 80,
21
+ 10,
22
+ 179,
23
+ 138
24
+ ],
16
25
  "accounts": [
17
26
  {
18
27
  "name": "config",
@@ -20,7 +29,14 @@
20
29
  "seeds": [
21
30
  {
22
31
  "kind": "const",
23
- "value": [99, 111, 110, 102, 105, 103]
32
+ "value": [
33
+ 99,
34
+ 111,
35
+ 110,
36
+ 102,
37
+ 105,
38
+ 103
39
+ ]
24
40
  }
25
41
  ]
26
42
  }
@@ -32,7 +48,13 @@
32
48
  "seeds": [
33
49
  {
34
50
  "kind": "const",
35
- "value": [118, 97, 117, 108, 116]
51
+ "value": [
52
+ 118,
53
+ 97,
54
+ 117,
55
+ 108,
56
+ 116
57
+ ]
36
58
  }
37
59
  ]
38
60
  }
@@ -58,7 +80,10 @@
58
80
  {
59
81
  "name": "transaction_hash",
60
82
  "type": {
61
- "array": ["u8", 32]
83
+ "array": [
84
+ "u8",
85
+ 32
86
+ ]
62
87
  }
63
88
  }
64
89
  ]
@@ -69,7 +94,16 @@
69
94
  "@notice View function for SOL price (locker-compatible)",
70
95
  "@dev Anyone can fetch SOL price in USD"
71
96
  ],
72
- "discriminator": [230, 145, 206, 175, 43, 184, 97, 110],
97
+ "discriminator": [
98
+ 230,
99
+ 145,
100
+ 206,
101
+ 175,
102
+ 43,
103
+ 184,
104
+ 97,
105
+ 110
106
+ ],
73
107
  "accounts": [
74
108
  {
75
109
  "name": "price_update"
@@ -84,7 +118,16 @@
84
118
  },
85
119
  {
86
120
  "name": "init_tss",
87
- "discriminator": [47, 31, 100, 111, 115, 2, 22, 208],
121
+ "discriminator": [
122
+ 47,
123
+ 31,
124
+ 100,
125
+ 111,
126
+ 115,
127
+ 2,
128
+ 22,
129
+ 208
130
+ ],
88
131
  "accounts": [
89
132
  {
90
133
  "name": "tss_pda",
@@ -93,7 +136,11 @@
93
136
  "seeds": [
94
137
  {
95
138
  "kind": "const",
96
- "value": [116, 115, 115]
139
+ "value": [
140
+ 116,
141
+ 115,
142
+ 115
143
+ ]
97
144
  }
98
145
  ]
99
146
  }
@@ -112,7 +159,10 @@
112
159
  {
113
160
  "name": "tss_eth_address",
114
161
  "type": {
115
- "array": ["u8", 20]
162
+ "array": [
163
+ "u8",
164
+ 20
165
+ ]
116
166
  }
117
167
  },
118
168
  {
@@ -123,8 +173,19 @@
123
173
  },
124
174
  {
125
175
  "name": "initialize",
126
- "docs": ["@notice Initialize the gateway"],
127
- "discriminator": [175, 175, 109, 31, 13, 152, 155, 237],
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
+ ],
128
189
  "accounts": [
129
190
  {
130
191
  "name": "config",
@@ -133,7 +194,14 @@
133
194
  "seeds": [
134
195
  {
135
196
  "kind": "const",
136
- "value": [99, 111, 110, 102, 105, 103]
197
+ "value": [
198
+ 99,
199
+ 111,
200
+ 110,
201
+ 102,
202
+ 105,
203
+ 103
204
+ ]
137
205
  }
138
206
  ]
139
207
  }
@@ -145,7 +213,13 @@
145
213
  "seeds": [
146
214
  {
147
215
  "kind": "const",
148
- "value": [118, 97, 117, 108, 116]
216
+ "value": [
217
+ 118,
218
+ 97,
219
+ 117,
220
+ 108,
221
+ 116
222
+ ]
149
223
  }
150
224
  ]
151
225
  }
@@ -189,8 +263,19 @@
189
263
  },
190
264
  {
191
265
  "name": "pause",
192
- "docs": ["@notice Pause the gateway"],
193
- "discriminator": [211, 22, 221, 251, 74, 121, 193, 47],
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
+ ],
194
279
  "accounts": [
195
280
  {
196
281
  "name": "config",
@@ -199,7 +284,14 @@
199
284
  "seeds": [
200
285
  {
201
286
  "kind": "const",
202
- "value": [99, 111, 110, 102, 105, 103]
287
+ "value": [
288
+ 99,
289
+ 111,
290
+ 110,
291
+ 102,
292
+ 105,
293
+ 103
294
+ ]
203
295
  }
204
296
  ]
205
297
  }
@@ -213,8 +305,19 @@
213
305
  },
214
306
  {
215
307
  "name": "remove_whitelist_token",
216
- "docs": ["@notice Remove token from whitelist"],
217
- "discriminator": [65, 182, 42, 255, 198, 163, 73, 46],
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
+ ],
218
321
  "accounts": [
219
322
  {
220
323
  "name": "config",
@@ -223,7 +326,14 @@
223
326
  "seeds": [
224
327
  {
225
328
  "kind": "const",
226
- "value": [99, 111, 110, 102, 105, 103]
329
+ "value": [
330
+ 99,
331
+ 111,
332
+ 110,
333
+ 102,
334
+ 105,
335
+ 103
336
+ ]
227
337
  }
228
338
  ]
229
339
  }
@@ -235,7 +345,17 @@
235
345
  "seeds": [
236
346
  {
237
347
  "kind": "const",
238
- "value": [119, 104, 105, 116, 101, 108, 105, 115, 116]
348
+ "value": [
349
+ 119,
350
+ 104,
351
+ 105,
352
+ 116,
353
+ 101,
354
+ 108,
355
+ 105,
356
+ 115,
357
+ 116
358
+ ]
239
359
  }
240
360
  ]
241
361
  }
@@ -259,7 +379,16 @@
259
379
  },
260
380
  {
261
381
  "name": "reset_nonce",
262
- "discriminator": [104, 139, 110, 85, 234, 155, 132, 248],
382
+ "discriminator": [
383
+ 104,
384
+ 139,
385
+ 110,
386
+ 85,
387
+ 234,
388
+ 155,
389
+ 132,
390
+ 248
391
+ ],
263
392
  "accounts": [
264
393
  {
265
394
  "name": "tss_pda",
@@ -268,7 +397,11 @@
268
397
  "seeds": [
269
398
  {
270
399
  "kind": "const",
271
- "value": [116, 115, 115]
400
+ "value": [
401
+ 116,
402
+ 115,
403
+ 115
404
+ ]
272
405
  }
273
406
  ]
274
407
  }
@@ -287,8 +420,19 @@
287
420
  },
288
421
  {
289
422
  "name": "revert_withdraw",
290
- "docs": ["@notice TSS-verified revert withdraw for SOL"],
291
- "discriminator": [8, 232, 107, 216, 153, 25, 204, 116],
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
+ ],
292
436
  "accounts": [
293
437
  {
294
438
  "name": "config",
@@ -296,7 +440,14 @@
296
440
  "seeds": [
297
441
  {
298
442
  "kind": "const",
299
- "value": [99, 111, 110, 102, 105, 103]
443
+ "value": [
444
+ 99,
445
+ 111,
446
+ 110,
447
+ 102,
448
+ 105,
449
+ 103
450
+ ]
300
451
  }
301
452
  ]
302
453
  }
@@ -308,7 +459,13 @@
308
459
  "seeds": [
309
460
  {
310
461
  "kind": "const",
311
- "value": [118, 97, 117, 108, 116]
462
+ "value": [
463
+ 118,
464
+ 97,
465
+ 117,
466
+ 108,
467
+ 116
468
+ ]
312
469
  }
313
470
  ]
314
471
  }
@@ -320,7 +477,11 @@
320
477
  "seeds": [
321
478
  {
322
479
  "kind": "const",
323
- "value": [116, 115, 115]
480
+ "value": [
481
+ 116,
482
+ 115,
483
+ 115
484
+ ]
324
485
  }
325
486
  ]
326
487
  }
@@ -340,17 +501,20 @@
340
501
  "type": "u64"
341
502
  },
342
503
  {
343
- "name": "revert_cfg",
504
+ "name": "revert_instruction",
344
505
  "type": {
345
506
  "defined": {
346
- "name": "RevertSettings"
507
+ "name": "RevertInstructions"
347
508
  }
348
509
  }
349
510
  },
350
511
  {
351
512
  "name": "signature",
352
513
  "type": {
353
- "array": ["u8", 64]
514
+ "array": [
515
+ "u8",
516
+ 64
517
+ ]
354
518
  }
355
519
  },
356
520
  {
@@ -360,7 +524,10 @@
360
524
  {
361
525
  "name": "message_hash",
362
526
  "type": {
363
- "array": ["u8", 32]
527
+ "array": [
528
+ "u8",
529
+ 32
530
+ ]
364
531
  }
365
532
  },
366
533
  {
@@ -371,8 +538,19 @@
371
538
  },
372
539
  {
373
540
  "name": "revert_withdraw_spl_token",
374
- "docs": ["@notice TSS-verified revert withdraw for SPL tokens"],
375
- "discriminator": [172, 155, 56, 3, 92, 190, 159, 191],
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
+ ],
376
554
  "accounts": [
377
555
  {
378
556
  "name": "config",
@@ -380,7 +558,14 @@
380
558
  "seeds": [
381
559
  {
382
560
  "kind": "const",
383
- "value": [99, 111, 110, 102, 105, 103]
561
+ "value": [
562
+ 99,
563
+ 111,
564
+ 110,
565
+ 102,
566
+ 105,
567
+ 103
568
+ ]
384
569
  }
385
570
  ]
386
571
  }
@@ -395,7 +580,13 @@
395
580
  "seeds": [
396
581
  {
397
582
  "kind": "const",
398
- "value": [118, 97, 117, 108, 116]
583
+ "value": [
584
+ 118,
585
+ 97,
586
+ 117,
587
+ 108,
588
+ 116
589
+ ]
399
590
  }
400
591
  ]
401
592
  }
@@ -411,7 +602,11 @@
411
602
  "seeds": [
412
603
  {
413
604
  "kind": "const",
414
- "value": [116, 115, 115]
605
+ "value": [
606
+ 116,
607
+ 115,
608
+ 115
609
+ ]
415
610
  }
416
611
  ]
417
612
  }
@@ -434,17 +629,20 @@
434
629
  "type": "u64"
435
630
  },
436
631
  {
437
- "name": "revert_cfg",
632
+ "name": "revert_instruction",
438
633
  "type": {
439
634
  "defined": {
440
- "name": "RevertSettings"
635
+ "name": "RevertInstructions"
441
636
  }
442
637
  }
443
638
  },
444
639
  {
445
640
  "name": "signature",
446
641
  "type": {
447
- "array": ["u8", 64]
642
+ "array": [
643
+ "u8",
644
+ 64
645
+ ]
448
646
  }
449
647
  },
450
648
  {
@@ -454,7 +652,10 @@
454
652
  {
455
653
  "name": "message_hash",
456
654
  "type": {
457
- "array": ["u8", 32]
655
+ "array": [
656
+ "u8",
657
+ 32
658
+ ]
458
659
  }
459
660
  },
460
661
  {
@@ -470,9 +671,18 @@
470
671
  "@dev Supports both native SOL and SPL token deposits (like ETH Gateway).",
471
672
  "For native SOL: pass Pubkey::default() as bridge_token",
472
673
  "For SPL tokens: pass token mint address as bridge_token",
473
- "The route emits TxWithFunds event."
674
+ "The route emits UniversalTx event."
675
+ ],
676
+ "discriminator": [
677
+ 84,
678
+ 247,
679
+ 211,
680
+ 40,
681
+ 63,
682
+ 106,
683
+ 15,
684
+ 59
474
685
  ],
475
- "discriminator": [84, 247, 211, 40, 63, 106, 15, 59],
476
686
  "accounts": [
477
687
  {
478
688
  "name": "config",
@@ -481,7 +691,14 @@
481
691
  "seeds": [
482
692
  {
483
693
  "kind": "const",
484
- "value": [99, 111, 110, 102, 105, 103]
694
+ "value": [
695
+ 99,
696
+ 111,
697
+ 110,
698
+ 102,
699
+ 105,
700
+ 103
701
+ ]
485
702
  }
486
703
  ]
487
704
  }
@@ -493,7 +710,13 @@
493
710
  "seeds": [
494
711
  {
495
712
  "kind": "const",
496
- "value": [118, 97, 117, 108, 116]
713
+ "value": [
714
+ 118,
715
+ 97,
716
+ 117,
717
+ 108,
718
+ 116
719
+ ]
497
720
  }
498
721
  ]
499
722
  }
@@ -504,7 +727,17 @@
504
727
  "seeds": [
505
728
  {
506
729
  "kind": "const",
507
- "value": [119, 104, 105, 116, 101, 108, 105, 115, 116]
730
+ "value": [
731
+ 119,
732
+ 104,
733
+ 105,
734
+ 116,
735
+ 101,
736
+ 108,
737
+ 105,
738
+ 115,
739
+ 116
740
+ ]
508
741
  }
509
742
  ]
510
743
  }
@@ -538,7 +771,10 @@
538
771
  {
539
772
  "name": "recipient",
540
773
  "type": {
541
- "array": ["u8", 20]
774
+ "array": [
775
+ "u8",
776
+ 20
777
+ ]
542
778
  }
543
779
  },
544
780
  {
@@ -550,10 +786,10 @@
550
786
  "type": "u64"
551
787
  },
552
788
  {
553
- "name": "revert_cfg",
789
+ "name": "revert_instruction",
554
790
  "type": {
555
791
  "defined": {
556
- "name": "RevertSettings"
792
+ "name": "RevertInstructions"
557
793
  }
558
794
  }
559
795
  }
@@ -564,9 +800,18 @@
564
800
  "docs": [
565
801
  "@notice Allows initiating a TX for movement of funds and payload from source chain to Push Chain.",
566
802
  "@dev Supports both native SOL and SPL token deposits with payload execution.",
567
- "The route emits both TxWithGas and TxWithFunds events."
803
+ "The route emits UniversalTx event."
804
+ ],
805
+ "discriminator": [
806
+ 224,
807
+ 179,
808
+ 202,
809
+ 222,
810
+ 121,
811
+ 238,
812
+ 38,
813
+ 168
568
814
  ],
569
- "discriminator": [224, 179, 202, 222, 121, 238, 38, 168],
570
815
  "accounts": [
571
816
  {
572
817
  "name": "config",
@@ -575,7 +820,14 @@
575
820
  "seeds": [
576
821
  {
577
822
  "kind": "const",
578
- "value": [99, 111, 110, 102, 105, 103]
823
+ "value": [
824
+ 99,
825
+ 111,
826
+ 110,
827
+ 102,
828
+ 105,
829
+ 103
830
+ ]
579
831
  }
580
832
  ]
581
833
  }
@@ -587,7 +839,13 @@
587
839
  "seeds": [
588
840
  {
589
841
  "kind": "const",
590
- "value": [118, 97, 117, 108, 116]
842
+ "value": [
843
+ 118,
844
+ 97,
845
+ 117,
846
+ 108,
847
+ 116
848
+ ]
591
849
  }
592
850
  ]
593
851
  }
@@ -598,7 +856,17 @@
598
856
  "seeds": [
599
857
  {
600
858
  "kind": "const",
601
- "value": [119, 104, 105, 116, 101, 108, 105, 115, 116]
859
+ "value": [
860
+ 119,
861
+ 104,
862
+ 105,
863
+ 116,
864
+ 101,
865
+ 108,
866
+ 105,
867
+ 115,
868
+ 116
869
+ ]
602
870
  }
603
871
  ]
604
872
  }
@@ -649,10 +917,10 @@
649
917
  }
650
918
  },
651
919
  {
652
- "name": "revert_cfg",
920
+ "name": "revert_instruction",
653
921
  "type": {
654
922
  "defined": {
655
- "name": "RevertSettings"
923
+ "name": "RevertInstructions"
656
924
  }
657
925
  }
658
926
  },
@@ -671,9 +939,18 @@
671
939
  "docs": [
672
940
  "@notice Allows initiating a TX for funding UEA with gas deposits from source chain.",
673
941
  "@dev Supports only native SOL deposits for gas funding.",
674
- "The route emits TxWithGas event - important for Instant TX Route."
942
+ "The route emits UniversalTx event - important for Instant TX Route."
943
+ ],
944
+ "discriminator": [
945
+ 220,
946
+ 10,
947
+ 179,
948
+ 127,
949
+ 41,
950
+ 153,
951
+ 193,
952
+ 213
675
953
  ],
676
- "discriminator": [220, 10, 179, 127, 41, 153, 193, 213],
677
954
  "accounts": [
678
955
  {
679
956
  "name": "config",
@@ -682,7 +959,14 @@
682
959
  "seeds": [
683
960
  {
684
961
  "kind": "const",
685
- "value": [99, 111, 110, 102, 105, 103]
962
+ "value": [
963
+ 99,
964
+ 111,
965
+ 110,
966
+ 102,
967
+ 105,
968
+ 103
969
+ ]
686
970
  }
687
971
  ]
688
972
  }
@@ -694,7 +978,13 @@
694
978
  "seeds": [
695
979
  {
696
980
  "kind": "const",
697
- "value": [118, 97, 117, 108, 116]
981
+ "value": [
982
+ 118,
983
+ 97,
984
+ 117,
985
+ 108,
986
+ 116
987
+ ]
698
988
  }
699
989
  ]
700
990
  }
@@ -722,23 +1012,120 @@
722
1012
  }
723
1013
  },
724
1014
  {
725
- "name": "revert_cfg",
1015
+ "name": "revert_instruction",
726
1016
  "type": {
727
1017
  "defined": {
728
- "name": "RevertSettings"
1018
+ "name": "RevertInstructions"
729
1019
  }
730
1020
  }
731
1021
  },
732
1022
  {
733
1023
  "name": "amount",
734
1024
  "type": "u64"
1025
+ },
1026
+ {
1027
+ "name": "signature_data",
1028
+ "type": "bytes"
1029
+ }
1030
+ ]
1031
+ },
1032
+ {
1033
+ "name": "set_block_usd_cap",
1034
+ "docs": [
1035
+ "@notice Set block-based USD cap for rate limiting"
1036
+ ],
1037
+ "discriminator": [
1038
+ 205,
1039
+ 253,
1040
+ 33,
1041
+ 164,
1042
+ 220,
1043
+ 216,
1044
+ 42,
1045
+ 50
1046
+ ],
1047
+ "accounts": [
1048
+ {
1049
+ "name": "config",
1050
+ "writable": true,
1051
+ "pda": {
1052
+ "seeds": [
1053
+ {
1054
+ "kind": "const",
1055
+ "value": [
1056
+ 99,
1057
+ 111,
1058
+ 110,
1059
+ 102,
1060
+ 105,
1061
+ 103
1062
+ ]
1063
+ }
1064
+ ]
1065
+ }
1066
+ },
1067
+ {
1068
+ "name": "rate_limit_config",
1069
+ "writable": true,
1070
+ "pda": {
1071
+ "seeds": [
1072
+ {
1073
+ "kind": "const",
1074
+ "value": [
1075
+ 114,
1076
+ 97,
1077
+ 116,
1078
+ 101,
1079
+ 95,
1080
+ 108,
1081
+ 105,
1082
+ 109,
1083
+ 105,
1084
+ 116,
1085
+ 95,
1086
+ 99,
1087
+ 111,
1088
+ 110,
1089
+ 102,
1090
+ 105,
1091
+ 103
1092
+ ]
1093
+ }
1094
+ ]
1095
+ }
1096
+ },
1097
+ {
1098
+ "name": "admin",
1099
+ "writable": true,
1100
+ "signer": true
1101
+ },
1102
+ {
1103
+ "name": "system_program",
1104
+ "address": "11111111111111111111111111111111"
1105
+ }
1106
+ ],
1107
+ "args": [
1108
+ {
1109
+ "name": "block_usd_cap",
1110
+ "type": "u128"
735
1111
  }
736
1112
  ]
737
1113
  },
738
1114
  {
739
1115
  "name": "set_caps_usd",
740
- "docs": ["@notice Set USD caps"],
741
- "discriminator": [136, 160, 17, 54, 239, 108, 125, 129],
1116
+ "docs": [
1117
+ "@notice Set USD caps"
1118
+ ],
1119
+ "discriminator": [
1120
+ 136,
1121
+ 160,
1122
+ 17,
1123
+ 54,
1124
+ 239,
1125
+ 108,
1126
+ 125,
1127
+ 129
1128
+ ],
742
1129
  "accounts": [
743
1130
  {
744
1131
  "name": "config",
@@ -747,7 +1134,14 @@
747
1134
  "seeds": [
748
1135
  {
749
1136
  "kind": "const",
750
- "value": [99, 111, 110, 102, 105, 103]
1137
+ "value": [
1138
+ 99,
1139
+ 111,
1140
+ 110,
1141
+ 102,
1142
+ 105,
1143
+ 103
1144
+ ]
751
1145
  }
752
1146
  ]
753
1147
  }
@@ -770,8 +1164,19 @@
770
1164
  },
771
1165
  {
772
1166
  "name": "set_pyth_confidence_threshold",
773
- "docs": ["@notice Set Pyth confidence threshold"],
774
- "discriminator": [213, 69, 242, 123, 122, 165, 125, 21],
1167
+ "docs": [
1168
+ "@notice Set Pyth confidence threshold"
1169
+ ],
1170
+ "discriminator": [
1171
+ 213,
1172
+ 69,
1173
+ 242,
1174
+ 123,
1175
+ 122,
1176
+ 165,
1177
+ 125,
1178
+ 21
1179
+ ],
775
1180
  "accounts": [
776
1181
  {
777
1182
  "name": "config",
@@ -780,7 +1185,14 @@
780
1185
  "seeds": [
781
1186
  {
782
1187
  "kind": "const",
783
- "value": [99, 111, 110, 102, 105, 103]
1188
+ "value": [
1189
+ 99,
1190
+ 111,
1191
+ 110,
1192
+ 102,
1193
+ 105,
1194
+ 103
1195
+ ]
784
1196
  }
785
1197
  ]
786
1198
  }
@@ -799,8 +1211,19 @@
799
1211
  },
800
1212
  {
801
1213
  "name": "set_pyth_price_feed",
802
- "docs": ["@notice Set Pyth price feed"],
803
- "discriminator": [202, 185, 109, 150, 255, 130, 210, 208],
1214
+ "docs": [
1215
+ "@notice Set Pyth price feed"
1216
+ ],
1217
+ "discriminator": [
1218
+ 202,
1219
+ 185,
1220
+ 109,
1221
+ 150,
1222
+ 255,
1223
+ 130,
1224
+ 210,
1225
+ 208
1226
+ ],
804
1227
  "accounts": [
805
1228
  {
806
1229
  "name": "config",
@@ -809,7 +1232,14 @@
809
1232
  "seeds": [
810
1233
  {
811
1234
  "kind": "const",
812
- "value": [99, 111, 110, 102, 105, 103]
1235
+ "value": [
1236
+ 99,
1237
+ 111,
1238
+ 110,
1239
+ 102,
1240
+ 105,
1241
+ 103
1242
+ ]
813
1243
  }
814
1244
  ]
815
1245
  }
@@ -826,10 +1256,103 @@
826
1256
  }
827
1257
  ]
828
1258
  },
1259
+ {
1260
+ "name": "set_token_rate_limit",
1261
+ "docs": [
1262
+ "@notice Set token-specific rate limit threshold"
1263
+ ],
1264
+ "discriminator": [
1265
+ 67,
1266
+ 225,
1267
+ 226,
1268
+ 248,
1269
+ 119,
1270
+ 98,
1271
+ 18,
1272
+ 68
1273
+ ],
1274
+ "accounts": [
1275
+ {
1276
+ "name": "config",
1277
+ "writable": true,
1278
+ "pda": {
1279
+ "seeds": [
1280
+ {
1281
+ "kind": "const",
1282
+ "value": [
1283
+ 99,
1284
+ 111,
1285
+ 110,
1286
+ 102,
1287
+ 105,
1288
+ 103
1289
+ ]
1290
+ }
1291
+ ]
1292
+ }
1293
+ },
1294
+ {
1295
+ "name": "token_rate_limit",
1296
+ "writable": true,
1297
+ "pda": {
1298
+ "seeds": [
1299
+ {
1300
+ "kind": "const",
1301
+ "value": [
1302
+ 114,
1303
+ 97,
1304
+ 116,
1305
+ 101,
1306
+ 95,
1307
+ 108,
1308
+ 105,
1309
+ 109,
1310
+ 105,
1311
+ 116
1312
+ ]
1313
+ },
1314
+ {
1315
+ "kind": "account",
1316
+ "path": "token_mint"
1317
+ }
1318
+ ]
1319
+ }
1320
+ },
1321
+ {
1322
+ "name": "token_mint"
1323
+ },
1324
+ {
1325
+ "name": "admin",
1326
+ "writable": true,
1327
+ "signer": true
1328
+ },
1329
+ {
1330
+ "name": "system_program",
1331
+ "address": "11111111111111111111111111111111"
1332
+ }
1333
+ ],
1334
+ "args": [
1335
+ {
1336
+ "name": "limit_threshold",
1337
+ "type": "u128"
1338
+ }
1339
+ ]
1340
+ },
829
1341
  {
830
1342
  "name": "set_tss_address",
831
- "docs": ["@notice Set TSS address"],
832
- "discriminator": [158, 254, 147, 0, 154, 3, 56, 50],
1343
+ "docs": [
1344
+ "@notice Set TSS address"
1345
+ ],
1346
+ "discriminator": [
1347
+ 158,
1348
+ 254,
1349
+ 147,
1350
+ 0,
1351
+ 154,
1352
+ 3,
1353
+ 56,
1354
+ 50
1355
+ ],
833
1356
  "accounts": [
834
1357
  {
835
1358
  "name": "config",
@@ -838,7 +1361,14 @@
838
1361
  "seeds": [
839
1362
  {
840
1363
  "kind": "const",
841
- "value": [99, 111, 110, 102, 105, 103]
1364
+ "value": [
1365
+ 99,
1366
+ 111,
1367
+ 110,
1368
+ 102,
1369
+ 105,
1370
+ 103
1371
+ ]
842
1372
  }
843
1373
  ]
844
1374
  }
@@ -857,8 +1387,19 @@
857
1387
  },
858
1388
  {
859
1389
  "name": "unpause",
860
- "docs": ["@notice Unpause the gateway"],
861
- "discriminator": [169, 144, 4, 38, 10, 141, 188, 255],
1390
+ "docs": [
1391
+ "@notice Unpause the gateway"
1392
+ ],
1393
+ "discriminator": [
1394
+ 169,
1395
+ 144,
1396
+ 4,
1397
+ 38,
1398
+ 10,
1399
+ 141,
1400
+ 188,
1401
+ 255
1402
+ ],
862
1403
  "accounts": [
863
1404
  {
864
1405
  "name": "config",
@@ -867,7 +1408,14 @@
867
1408
  "seeds": [
868
1409
  {
869
1410
  "kind": "const",
870
- "value": [99, 111, 110, 102, 105, 103]
1411
+ "value": [
1412
+ 99,
1413
+ 111,
1414
+ 110,
1415
+ 102,
1416
+ 105,
1417
+ 103
1418
+ ]
871
1419
  }
872
1420
  ]
873
1421
  }
@@ -879,9 +1427,100 @@
879
1427
  ],
880
1428
  "args": []
881
1429
  },
1430
+ {
1431
+ "name": "update_epoch_duration",
1432
+ "docs": [
1433
+ "@notice Update epoch duration for rate limiting"
1434
+ ],
1435
+ "discriminator": [
1436
+ 145,
1437
+ 173,
1438
+ 2,
1439
+ 249,
1440
+ 226,
1441
+ 157,
1442
+ 29,
1443
+ 104
1444
+ ],
1445
+ "accounts": [
1446
+ {
1447
+ "name": "config",
1448
+ "writable": true,
1449
+ "pda": {
1450
+ "seeds": [
1451
+ {
1452
+ "kind": "const",
1453
+ "value": [
1454
+ 99,
1455
+ 111,
1456
+ 110,
1457
+ 102,
1458
+ 105,
1459
+ 103
1460
+ ]
1461
+ }
1462
+ ]
1463
+ }
1464
+ },
1465
+ {
1466
+ "name": "rate_limit_config",
1467
+ "writable": true,
1468
+ "pda": {
1469
+ "seeds": [
1470
+ {
1471
+ "kind": "const",
1472
+ "value": [
1473
+ 114,
1474
+ 97,
1475
+ 116,
1476
+ 101,
1477
+ 95,
1478
+ 108,
1479
+ 105,
1480
+ 109,
1481
+ 105,
1482
+ 116,
1483
+ 95,
1484
+ 99,
1485
+ 111,
1486
+ 110,
1487
+ 102,
1488
+ 105,
1489
+ 103
1490
+ ]
1491
+ }
1492
+ ]
1493
+ }
1494
+ },
1495
+ {
1496
+ "name": "admin",
1497
+ "writable": true,
1498
+ "signer": true
1499
+ },
1500
+ {
1501
+ "name": "system_program",
1502
+ "address": "11111111111111111111111111111111"
1503
+ }
1504
+ ],
1505
+ "args": [
1506
+ {
1507
+ "name": "epoch_duration_sec",
1508
+ "type": "u64"
1509
+ }
1510
+ ]
1511
+ },
882
1512
  {
883
1513
  "name": "update_tss",
884
- "discriminator": [227, 136, 3, 242, 177, 168, 10, 160],
1514
+ "discriminator": [
1515
+ 227,
1516
+ 136,
1517
+ 3,
1518
+ 242,
1519
+ 177,
1520
+ 168,
1521
+ 10,
1522
+ 160
1523
+ ],
885
1524
  "accounts": [
886
1525
  {
887
1526
  "name": "tss_pda",
@@ -890,7 +1529,11 @@
890
1529
  "seeds": [
891
1530
  {
892
1531
  "kind": "const",
893
- "value": [116, 115, 115]
1532
+ "value": [
1533
+ 116,
1534
+ 115,
1535
+ 115
1536
+ ]
894
1537
  }
895
1538
  ]
896
1539
  }
@@ -904,7 +1547,10 @@
904
1547
  {
905
1548
  "name": "tss_eth_address",
906
1549
  "type": {
907
- "array": ["u8", 20]
1550
+ "array": [
1551
+ "u8",
1552
+ 20
1553
+ ]
908
1554
  }
909
1555
  },
910
1556
  {
@@ -915,8 +1561,19 @@
915
1561
  },
916
1562
  {
917
1563
  "name": "whitelist_token",
918
- "docs": ["@notice Whitelist a token"],
919
- "discriminator": [6, 141, 83, 167, 31, 6, 2, 224],
1564
+ "docs": [
1565
+ "@notice Whitelist a token"
1566
+ ],
1567
+ "discriminator": [
1568
+ 6,
1569
+ 141,
1570
+ 83,
1571
+ 167,
1572
+ 31,
1573
+ 6,
1574
+ 2,
1575
+ 224
1576
+ ],
920
1577
  "accounts": [
921
1578
  {
922
1579
  "name": "config",
@@ -925,7 +1582,14 @@
925
1582
  "seeds": [
926
1583
  {
927
1584
  "kind": "const",
928
- "value": [99, 111, 110, 102, 105, 103]
1585
+ "value": [
1586
+ 99,
1587
+ 111,
1588
+ 110,
1589
+ 102,
1590
+ 105,
1591
+ 103
1592
+ ]
929
1593
  }
930
1594
  ]
931
1595
  }
@@ -937,7 +1601,17 @@
937
1601
  "seeds": [
938
1602
  {
939
1603
  "kind": "const",
940
- "value": [119, 104, 105, 116, 101, 108, 105, 115, 116]
1604
+ "value": [
1605
+ 119,
1606
+ 104,
1607
+ 105,
1608
+ 116,
1609
+ 101,
1610
+ 108,
1611
+ 105,
1612
+ 115,
1613
+ 116
1614
+ ]
941
1615
  }
942
1616
  ]
943
1617
  }
@@ -961,8 +1635,19 @@
961
1635
  },
962
1636
  {
963
1637
  "name": "withdraw_spl_token_tss",
964
- "docs": ["@notice TSS-verified withdraw of SPL tokens"],
965
- "discriminator": [238, 209, 47, 229, 44, 234, 138, 198],
1638
+ "docs": [
1639
+ "@notice TSS-verified withdraw of SPL tokens"
1640
+ ],
1641
+ "discriminator": [
1642
+ 238,
1643
+ 209,
1644
+ 47,
1645
+ 229,
1646
+ 44,
1647
+ 234,
1648
+ 138,
1649
+ 198
1650
+ ],
966
1651
  "accounts": [
967
1652
  {
968
1653
  "name": "config",
@@ -970,7 +1655,14 @@
970
1655
  "seeds": [
971
1656
  {
972
1657
  "kind": "const",
973
- "value": [99, 111, 110, 102, 105, 103]
1658
+ "value": [
1659
+ 99,
1660
+ 111,
1661
+ 110,
1662
+ 102,
1663
+ 105,
1664
+ 103
1665
+ ]
974
1666
  }
975
1667
  ]
976
1668
  }
@@ -985,7 +1677,13 @@
985
1677
  "seeds": [
986
1678
  {
987
1679
  "kind": "const",
988
- "value": [118, 97, 117, 108, 116]
1680
+ "value": [
1681
+ 118,
1682
+ 97,
1683
+ 117,
1684
+ 108,
1685
+ 116
1686
+ ]
989
1687
  }
990
1688
  ]
991
1689
  }
@@ -1001,7 +1699,11 @@
1001
1699
  "seeds": [
1002
1700
  {
1003
1701
  "kind": "const",
1004
- "value": [116, 115, 115]
1702
+ "value": [
1703
+ 116,
1704
+ 115,
1705
+ 115
1706
+ ]
1005
1707
  }
1006
1708
  ]
1007
1709
  }
@@ -1026,7 +1728,10 @@
1026
1728
  {
1027
1729
  "name": "signature",
1028
1730
  "type": {
1029
- "array": ["u8", 64]
1731
+ "array": [
1732
+ "u8",
1733
+ 64
1734
+ ]
1030
1735
  }
1031
1736
  },
1032
1737
  {
@@ -1036,7 +1741,10 @@
1036
1741
  {
1037
1742
  "name": "message_hash",
1038
1743
  "type": {
1039
- "array": ["u8", 32]
1744
+ "array": [
1745
+ "u8",
1746
+ 32
1747
+ ]
1040
1748
  }
1041
1749
  },
1042
1750
  {
@@ -1047,8 +1755,19 @@
1047
1755
  },
1048
1756
  {
1049
1757
  "name": "withdraw_tss",
1050
- "docs": ["@notice TSS-verified withdraw of native SOL"],
1051
- "discriminator": [112, 51, 93, 250, 136, 175, 118, 100],
1758
+ "docs": [
1759
+ "@notice TSS-verified withdraw of native SOL"
1760
+ ],
1761
+ "discriminator": [
1762
+ 112,
1763
+ 51,
1764
+ 93,
1765
+ 250,
1766
+ 136,
1767
+ 175,
1768
+ 118,
1769
+ 100
1770
+ ],
1052
1771
  "accounts": [
1053
1772
  {
1054
1773
  "name": "config",
@@ -1056,7 +1775,14 @@
1056
1775
  "seeds": [
1057
1776
  {
1058
1777
  "kind": "const",
1059
- "value": [99, 111, 110, 102, 105, 103]
1778
+ "value": [
1779
+ 99,
1780
+ 111,
1781
+ 110,
1782
+ 102,
1783
+ 105,
1784
+ 103
1785
+ ]
1060
1786
  }
1061
1787
  ]
1062
1788
  }
@@ -1068,7 +1794,13 @@
1068
1794
  "seeds": [
1069
1795
  {
1070
1796
  "kind": "const",
1071
- "value": [118, 97, 117, 108, 116]
1797
+ "value": [
1798
+ 118,
1799
+ 97,
1800
+ 117,
1801
+ 108,
1802
+ 116
1803
+ ]
1072
1804
  }
1073
1805
  ]
1074
1806
  }
@@ -1080,7 +1812,11 @@
1080
1812
  "seeds": [
1081
1813
  {
1082
1814
  "kind": "const",
1083
- "value": [116, 115, 115]
1815
+ "value": [
1816
+ 116,
1817
+ 115,
1818
+ 115
1819
+ ]
1084
1820
  }
1085
1821
  ]
1086
1822
  }
@@ -1102,7 +1838,10 @@
1102
1838
  {
1103
1839
  "name": "signature",
1104
1840
  "type": {
1105
- "array": ["u8", 64]
1841
+ "array": [
1842
+ "u8",
1843
+ 64
1844
+ ]
1106
1845
  }
1107
1846
  },
1108
1847
  {
@@ -1112,7 +1851,10 @@
1112
1851
  {
1113
1852
  "name": "message_hash",
1114
1853
  "type": {
1115
- "array": ["u8", 32]
1854
+ "array": [
1855
+ "u8",
1856
+ 32
1857
+ ]
1116
1858
  }
1117
1859
  },
1118
1860
  {
@@ -1125,53 +1867,213 @@
1125
1867
  "accounts": [
1126
1868
  {
1127
1869
  "name": "Config",
1128
- "discriminator": [155, 12, 170, 224, 30, 250, 204, 130]
1870
+ "discriminator": [
1871
+ 155,
1872
+ 12,
1873
+ 170,
1874
+ 224,
1875
+ 30,
1876
+ 250,
1877
+ 204,
1878
+ 130
1879
+ ]
1129
1880
  },
1130
1881
  {
1131
1882
  "name": "PriceUpdateV2",
1132
- "discriminator": [34, 241, 35, 99, 157, 126, 244, 205]
1883
+ "discriminator": [
1884
+ 34,
1885
+ 241,
1886
+ 35,
1887
+ 99,
1888
+ 157,
1889
+ 126,
1890
+ 244,
1891
+ 205
1892
+ ]
1893
+ },
1894
+ {
1895
+ "name": "RateLimitConfig",
1896
+ "discriminator": [
1897
+ 172,
1898
+ 233,
1899
+ 8,
1900
+ 17,
1901
+ 15,
1902
+ 174,
1903
+ 216,
1904
+ 176
1905
+ ]
1906
+ },
1907
+ {
1908
+ "name": "TokenRateLimit",
1909
+ "discriminator": [
1910
+ 129,
1911
+ 99,
1912
+ 70,
1913
+ 230,
1914
+ 57,
1915
+ 181,
1916
+ 132,
1917
+ 97
1918
+ ]
1133
1919
  },
1134
1920
  {
1135
1921
  "name": "TokenWhitelist",
1136
- "discriminator": [105, 240, 104, 47, 95, 13, 48, 78]
1922
+ "discriminator": [
1923
+ 105,
1924
+ 240,
1925
+ 104,
1926
+ 47,
1927
+ 95,
1928
+ 13,
1929
+ 48,
1930
+ 78
1931
+ ]
1137
1932
  },
1138
1933
  {
1139
1934
  "name": "TssPda",
1140
- "discriminator": [121, 138, 162, 251, 127, 95, 238, 135]
1935
+ "discriminator": [
1936
+ 121,
1937
+ 138,
1938
+ 162,
1939
+ 251,
1940
+ 127,
1941
+ 95,
1942
+ 238,
1943
+ 135
1944
+ ]
1141
1945
  }
1142
1946
  ],
1143
1947
  "events": [
1948
+ {
1949
+ "name": "BlockUsdCapUpdated",
1950
+ "discriminator": [
1951
+ 69,
1952
+ 44,
1953
+ 151,
1954
+ 48,
1955
+ 36,
1956
+ 74,
1957
+ 176,
1958
+ 194
1959
+ ]
1960
+ },
1144
1961
  {
1145
1962
  "name": "CapsUpdated",
1146
- "discriminator": [147, 181, 117, 249, 72, 147, 156, 255]
1963
+ "discriminator": [
1964
+ 147,
1965
+ 181,
1966
+ 117,
1967
+ 249,
1968
+ 72,
1969
+ 147,
1970
+ 156,
1971
+ 255
1972
+ ]
1973
+ },
1974
+ {
1975
+ "name": "EpochDurationUpdated",
1976
+ "discriminator": [
1977
+ 167,
1978
+ 122,
1979
+ 82,
1980
+ 178,
1981
+ 133,
1982
+ 191,
1983
+ 19,
1984
+ 129
1985
+ ]
1147
1986
  },
1148
1987
  {
1149
1988
  "name": "FundsAddedEvent",
1150
- "discriminator": [127, 31, 108, 255, 187, 19, 70, 68]
1989
+ "discriminator": [
1990
+ 127,
1991
+ 31,
1992
+ 108,
1993
+ 255,
1994
+ 187,
1995
+ 19,
1996
+ 70,
1997
+ 68
1998
+ ]
1151
1999
  },
1152
2000
  {
1153
2001
  "name": "TSSAddressUpdated",
1154
- "discriminator": [157, 148, 149, 250, 42, 118, 17, 232]
2002
+ "discriminator": [
2003
+ 157,
2004
+ 148,
2005
+ 149,
2006
+ 250,
2007
+ 42,
2008
+ 118,
2009
+ 17,
2010
+ 232
2011
+ ]
1155
2012
  },
1156
2013
  {
1157
- "name": "TokenRemovedFromWhitelist",
1158
- "discriminator": [200, 69, 55, 209, 167, 225, 117, 11]
2014
+ "name": "TokenRateLimitUpdated",
2015
+ "discriminator": [
2016
+ 73,
2017
+ 75,
2018
+ 54,
2019
+ 189,
2020
+ 59,
2021
+ 130,
2022
+ 39,
2023
+ 59
2024
+ ]
1159
2025
  },
1160
2026
  {
1161
- "name": "TokenWhitelisted",
1162
- "discriminator": [65, 3, 231, 165, 235, 116, 154, 51]
2027
+ "name": "TokenRemovedFromWhitelist",
2028
+ "discriminator": [
2029
+ 200,
2030
+ 69,
2031
+ 55,
2032
+ 209,
2033
+ 167,
2034
+ 225,
2035
+ 117,
2036
+ 11
2037
+ ]
1163
2038
  },
1164
2039
  {
1165
- "name": "TxWithFunds",
1166
- "discriminator": [43, 31, 31, 2, 4, 236, 107, 255]
2040
+ "name": "TokenWhitelisted",
2041
+ "discriminator": [
2042
+ 65,
2043
+ 3,
2044
+ 231,
2045
+ 165,
2046
+ 235,
2047
+ 116,
2048
+ 154,
2049
+ 51
2050
+ ]
1167
2051
  },
1168
2052
  {
1169
- "name": "TxWithGas",
1170
- "discriminator": [182, 110, 243, 17, 145, 36, 153, 15]
2053
+ "name": "UniversalTx",
2054
+ "discriminator": [
2055
+ 108,
2056
+ 154,
2057
+ 216,
2058
+ 41,
2059
+ 181,
2060
+ 234,
2061
+ 29,
2062
+ 124
2063
+ ]
1171
2064
  },
1172
2065
  {
1173
2066
  "name": "WithdrawFunds",
1174
- "discriminator": [4, 77, 4, 28, 115, 6, 39, 233]
2067
+ "discriminator": [
2068
+ 4,
2069
+ 77,
2070
+ 4,
2071
+ 28,
2072
+ 115,
2073
+ 6,
2074
+ 39,
2075
+ 233
2076
+ ]
1175
2077
  }
1176
2078
  ],
1177
2079
  "errors": [
@@ -1284,9 +2186,36 @@
1284
2186
  "code": 6021,
1285
2187
  "name": "InvalidToken",
1286
2188
  "msg": "Invalid token"
2189
+ },
2190
+ {
2191
+ "code": 6022,
2192
+ "name": "BlockUsdCapExceeded",
2193
+ "msg": "Block USD cap exceeded"
2194
+ },
2195
+ {
2196
+ "code": 6023,
2197
+ "name": "RateLimitExceeded",
2198
+ "msg": "Rate limit exceeded"
2199
+ },
2200
+ {
2201
+ "code": 6024,
2202
+ "name": "InvalidAccount",
2203
+ "msg": "Invalid account"
1287
2204
  }
1288
2205
  ],
1289
2206
  "types": [
2207
+ {
2208
+ "name": "BlockUsdCapUpdated",
2209
+ "type": {
2210
+ "kind": "struct",
2211
+ "fields": [
2212
+ {
2213
+ "name": "block_usd_cap",
2214
+ "type": "u128"
2215
+ }
2216
+ ]
2217
+ }
2218
+ },
1290
2219
  {
1291
2220
  "name": "CapsUpdated",
1292
2221
  "type": {
@@ -1355,6 +2284,37 @@
1355
2284
  ]
1356
2285
  }
1357
2286
  },
2287
+ {
2288
+ "name": "EpochDurationUpdated",
2289
+ "type": {
2290
+ "kind": "struct",
2291
+ "fields": [
2292
+ {
2293
+ "name": "epoch_duration_sec",
2294
+ "type": "u64"
2295
+ }
2296
+ ]
2297
+ }
2298
+ },
2299
+ {
2300
+ "name": "EpochUsage",
2301
+ "docs": [
2302
+ "Epoch usage tracking for rate limiting (matching EVM EpochUsage struct)"
2303
+ ],
2304
+ "type": {
2305
+ "kind": "struct",
2306
+ "fields": [
2307
+ {
2308
+ "name": "epoch",
2309
+ "type": "u64"
2310
+ },
2311
+ {
2312
+ "name": "used",
2313
+ "type": "u128"
2314
+ }
2315
+ ]
2316
+ }
2317
+ },
1358
2318
  {
1359
2319
  "name": "FundsAddedEvent",
1360
2320
  "docs": [
@@ -1383,7 +2343,10 @@
1383
2343
  {
1384
2344
  "name": "transaction_hash",
1385
2345
  "type": {
1386
- "array": ["u8", 32]
2346
+ "array": [
2347
+ "u8",
2348
+ 32
2349
+ ]
1387
2350
  }
1388
2351
  }
1389
2352
  ]
@@ -1427,7 +2390,10 @@
1427
2390
  "`FeedId` but avoid the type alias because of compatibility issues with Anchor's `idl-build` feature."
1428
2391
  ],
1429
2392
  "type": {
1430
- "array": ["u8", 32]
2393
+ "array": [
2394
+ "u8",
2395
+ 32
2396
+ ]
1431
2397
  }
1432
2398
  },
1433
2399
  {
@@ -1444,7 +2410,9 @@
1444
2410
  },
1445
2411
  {
1446
2412
  "name": "publish_time",
1447
- "docs": ["The timestamp of this price update in seconds"],
2413
+ "docs": [
2414
+ "The timestamp of this price update in seconds"
2415
+ ],
1448
2416
  "type": "i64"
1449
2417
  },
1450
2418
  {
@@ -1517,9 +2485,41 @@
1517
2485
  }
1518
2486
  },
1519
2487
  {
1520
- "name": "RevertSettings",
2488
+ "name": "RateLimitConfig",
2489
+ "docs": [
2490
+ "Rate limiting configuration (separate account for backward compatibility)",
2491
+ "PDA: `[b\"rate_limit_config\"]`. Stores global rate limiting settings."
2492
+ ],
2493
+ "type": {
2494
+ "kind": "struct",
2495
+ "fields": [
2496
+ {
2497
+ "name": "block_usd_cap",
2498
+ "type": "u128"
2499
+ },
2500
+ {
2501
+ "name": "epoch_duration_sec",
2502
+ "type": "u64"
2503
+ },
2504
+ {
2505
+ "name": "last_slot",
2506
+ "type": "u64"
2507
+ },
2508
+ {
2509
+ "name": "consumed_usd_in_block",
2510
+ "type": "u128"
2511
+ },
2512
+ {
2513
+ "name": "bump",
2514
+ "type": "u8"
2515
+ }
2516
+ ]
2517
+ }
2518
+ },
2519
+ {
2520
+ "name": "RevertInstructions",
1521
2521
  "docs": [
1522
- "Revert settings for failed transactions (parity with EVM `RevertSettings`)."
2522
+ "Revert instructions for failed transactions (parity with EVM `RevertInstructions`)."
1523
2523
  ],
1524
2524
  "type": {
1525
2525
  "kind": "struct",
@@ -1551,6 +2551,54 @@
1551
2551
  ]
1552
2552
  }
1553
2553
  },
2554
+ {
2555
+ "name": "TokenRateLimit",
2556
+ "docs": [
2557
+ "Token-specific rate limiting state (matching EVM implementation)",
2558
+ "PDA: `[b\"rate_limit\", token_mint]`. Tracks epoch-based usage per token."
2559
+ ],
2560
+ "type": {
2561
+ "kind": "struct",
2562
+ "fields": [
2563
+ {
2564
+ "name": "token_mint",
2565
+ "type": "pubkey"
2566
+ },
2567
+ {
2568
+ "name": "limit_threshold",
2569
+ "type": "u128"
2570
+ },
2571
+ {
2572
+ "name": "epoch_usage",
2573
+ "type": {
2574
+ "defined": {
2575
+ "name": "EpochUsage"
2576
+ }
2577
+ }
2578
+ },
2579
+ {
2580
+ "name": "bump",
2581
+ "type": "u8"
2582
+ }
2583
+ ]
2584
+ }
2585
+ },
2586
+ {
2587
+ "name": "TokenRateLimitUpdated",
2588
+ "type": {
2589
+ "kind": "struct",
2590
+ "fields": [
2591
+ {
2592
+ "name": "token_mint",
2593
+ "type": "pubkey"
2594
+ },
2595
+ {
2596
+ "name": "limit_threshold",
2597
+ "type": "u128"
2598
+ }
2599
+ ]
2600
+ }
2601
+ },
1554
2602
  {
1555
2603
  "name": "TokenRemovedFromWhitelist",
1556
2604
  "type": {
@@ -1609,7 +2657,10 @@
1609
2657
  {
1610
2658
  "name": "tss_eth_address",
1611
2659
  "type": {
1612
- "array": ["u8", 20]
2660
+ "array": [
2661
+ "u8",
2662
+ 20
2663
+ ]
1613
2664
  }
1614
2665
  },
1615
2666
  {
@@ -1656,66 +2707,67 @@
1656
2707
  }
1657
2708
  },
1658
2709
  {
1659
- "name": "TxWithFunds",
2710
+ "name": "UniversalPayload",
1660
2711
  "docs": [
1661
- "FUNDS deposit event (parity with EVM `TxWithFunds`). Emitted for FUNDS-only and FUNDS+PAYLOAD routes."
2712
+ "Universal payload for cross-chain execution (parity with EVM `UniversalPayload`).",
2713
+ "Serialized and hashed for event parity with EVM (payload bytes/hash)."
1662
2714
  ],
1663
2715
  "type": {
1664
2716
  "kind": "struct",
1665
2717
  "fields": [
1666
2718
  {
1667
- "name": "sender",
1668
- "type": "pubkey"
1669
- },
1670
- {
1671
- "name": "recipient",
2719
+ "name": "to",
1672
2720
  "type": {
1673
- "array": ["u8", 20]
2721
+ "array": [
2722
+ "u8",
2723
+ 20
2724
+ ]
1674
2725
  }
1675
2726
  },
1676
2727
  {
1677
- "name": "bridge_amount",
2728
+ "name": "value",
1678
2729
  "type": "u64"
1679
2730
  },
1680
2731
  {
1681
- "name": "gas_amount",
2732
+ "name": "data",
2733
+ "type": "bytes"
2734
+ },
2735
+ {
2736
+ "name": "gas_limit",
1682
2737
  "type": "u64"
1683
2738
  },
1684
2739
  {
1685
- "name": "bridge_token",
1686
- "type": "pubkey"
2740
+ "name": "max_fee_per_gas",
2741
+ "type": "u64"
1687
2742
  },
1688
2743
  {
1689
- "name": "data",
1690
- "type": "bytes"
2744
+ "name": "max_priority_fee_per_gas",
2745
+ "type": "u64"
1691
2746
  },
1692
2747
  {
1693
- "name": "revert_cfg",
1694
- "type": {
1695
- "defined": {
1696
- "name": "RevertSettings"
1697
- }
1698
- }
2748
+ "name": "nonce",
2749
+ "type": "u64"
1699
2750
  },
1700
2751
  {
1701
- "name": "tx_type",
2752
+ "name": "deadline",
2753
+ "type": "i64"
2754
+ },
2755
+ {
2756
+ "name": "v_type",
1702
2757
  "type": {
1703
2758
  "defined": {
1704
- "name": "TxType"
2759
+ "name": "VerificationType"
1705
2760
  }
1706
2761
  }
1707
- },
1708
- {
1709
- "name": "signature_data",
1710
- "type": "bytes"
1711
2762
  }
1712
2763
  ]
1713
2764
  }
1714
2765
  },
1715
2766
  {
1716
- "name": "TxWithGas",
2767
+ "name": "UniversalTx",
1717
2768
  "docs": [
1718
- "GAS deposit event (parity with EVM `TxWithGas`). Emitted for gas funding on both GAS and GAS+PAYLOAD routes."
2769
+ "Universal transaction event (parity with EVM V0 `UniversalTx`).",
2770
+ "Single event for both gas funding and funds movement."
1719
2771
  ],
1720
2772
  "type": {
1721
2773
  "kind": "struct",
@@ -1725,20 +2777,31 @@
1725
2777
  "type": "pubkey"
1726
2778
  },
1727
2779
  {
1728
- "name": "payload_hash",
2780
+ "name": "recipient",
1729
2781
  "type": {
1730
- "array": ["u8", 32]
2782
+ "array": [
2783
+ "u8",
2784
+ 20
2785
+ ]
1731
2786
  }
1732
2787
  },
1733
2788
  {
1734
- "name": "native_token_deposited",
2789
+ "name": "token",
2790
+ "type": "pubkey"
2791
+ },
2792
+ {
2793
+ "name": "amount",
1735
2794
  "type": "u64"
1736
2795
  },
1737
2796
  {
1738
- "name": "revert_cfg",
2797
+ "name": "payload",
2798
+ "type": "bytes"
2799
+ },
2800
+ {
2801
+ "name": "revert_instruction",
1739
2802
  "type": {
1740
2803
  "defined": {
1741
- "name": "RevertSettings"
2804
+ "name": "RevertInstructions"
1742
2805
  }
1743
2806
  }
1744
2807
  },
@@ -1749,60 +2812,10 @@
1749
2812
  "name": "TxType"
1750
2813
  }
1751
2814
  }
1752
- }
1753
- ]
1754
- }
1755
- },
1756
- {
1757
- "name": "UniversalPayload",
1758
- "docs": [
1759
- "Universal payload for cross-chain execution (parity with EVM `UniversalPayload`).",
1760
- "Serialized and hashed for event parity with EVM (payload bytes/hash)."
1761
- ],
1762
- "type": {
1763
- "kind": "struct",
1764
- "fields": [
1765
- {
1766
- "name": "to",
1767
- "type": {
1768
- "array": ["u8", 20]
1769
- }
1770
2815
  },
1771
2816
  {
1772
- "name": "value",
1773
- "type": "u64"
1774
- },
1775
- {
1776
- "name": "data",
2817
+ "name": "signature_data",
1777
2818
  "type": "bytes"
1778
- },
1779
- {
1780
- "name": "gas_limit",
1781
- "type": "u64"
1782
- },
1783
- {
1784
- "name": "max_fee_per_gas",
1785
- "type": "u64"
1786
- },
1787
- {
1788
- "name": "max_priority_fee_per_gas",
1789
- "type": "u64"
1790
- },
1791
- {
1792
- "name": "nonce",
1793
- "type": "u64"
1794
- },
1795
- {
1796
- "name": "deadline",
1797
- "type": "i64"
1798
- },
1799
- {
1800
- "name": "v_type",
1801
- "type": {
1802
- "defined": {
1803
- "name": "VerificationType"
1804
- }
1805
- }
1806
2819
  }
1807
2820
  ]
1808
2821
  }
@@ -1842,7 +2855,9 @@
1842
2855
  },
1843
2856
  {
1844
2857
  "name": "VerificationType",
1845
- "docs": ["Verification types for payload execution (parity with EVM)."],
2858
+ "docs": [
2859
+ "Verification types for payload execution (parity with EVM)."
2860
+ ],
1846
2861
  "type": {
1847
2862
  "kind": "enum",
1848
2863
  "variants": [
@@ -1857,7 +2872,9 @@
1857
2872
  },
1858
2873
  {
1859
2874
  "name": "WithdrawFunds",
1860
- "docs": ["Withdraw event (parity with EVM `WithdrawFunds`)."],
2875
+ "docs": [
2876
+ "Withdraw event (parity with EVM `WithdrawFunds`)."
2877
+ ],
1861
2878
  "type": {
1862
2879
  "kind": "struct",
1863
2880
  "fields": [