@across-protocol/contracts 6.0.0-beta.2 → 6.0.0-beta.3

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 (128) hide show
  1. package/README.md +138 -34
  2. package/contracts/chain-adapters/Solana_Adapter.sol +4 -7
  3. package/contracts/handlers/HyperliquidDepositHandler.sol +2 -2
  4. package/contracts/interfaces/SpokePoolPeripheryInterface.sol +16 -4
  5. package/contracts/libraries/HyperCoreLib.sol +113 -20
  6. package/contracts/libraries/PeripherySigningLib.sol +56 -0
  7. package/contracts/periphery/SpokePoolPeriphery.sol +58 -10
  8. package/dist/broadcast/deployed-addresses.json +19 -0
  9. package/dist/evm/artifacts/Constants.sol/Constants.json +1 -1
  10. package/dist/evm/artifacts/DeploymentUtils.sol/DeploymentUtils.json +1 -1
  11. package/dist/evm/artifacts/DstOFTHandler.sol/DstOFTHandler.json +1 -1
  12. package/dist/evm/artifacts/HubPoolTestBase.sol/MockAddressWhitelist.json +1 -1
  13. package/dist/evm/artifacts/HubPoolTestBase.sol/MockFinder.json +1 -1
  14. package/dist/evm/artifacts/HubPoolTestBase.sol/MockIdentifierWhitelist.json +1 -1
  15. package/dist/evm/artifacts/HubPoolTestBase.sol/MockLpTokenFactory.json +1 -1
  16. package/dist/evm/artifacts/HubPoolTestBase.sol/MockOptimisticOracle.json +1 -1
  17. package/dist/evm/artifacts/HubPoolTestBase.sol/MockStore.json +1 -1
  18. package/dist/evm/artifacts/HyperCoreFlowExecutor.sol/HyperCoreFlowExecutor.json +1 -1
  19. package/dist/evm/artifacts/HyperCoreLib.sol/HyperCoreLib.json +1 -1
  20. package/dist/evm/artifacts/HyperliquidDepositHandler.sol/HyperliquidDepositHandler.json +1 -1
  21. package/dist/evm/artifacts/PeripherySigningLib.sol/PeripherySigningLib.json +1 -1
  22. package/dist/evm/artifacts/Solana_Adapter.sol/Solana_Adapter.json +1 -1
  23. package/dist/evm/artifacts/SpokePoolPeriphery.sol/SpokePoolPeriphery.json +1 -1
  24. package/dist/evm/artifacts/SpokePoolPeriphery.sol/SwapProxy.json +1 -1
  25. package/dist/evm/artifacts/SponsoredCCTPDstPeriphery.sol/SponsoredCCTPDstPeriphery.json +1 -1
  26. package/dist/evm/artifacts/SponsoredCCTPSrcPeriphery.sol/SponsoredCCTPSrcPeriphery.json +1 -1
  27. package/dist/evm/artifacts/SponsoredOFTSrcPeriphery.sol/SponsoredOFTSrcPeriphery.json +1 -1
  28. package/dist/evm/artifacts/SwapHandler.sol/SwapHandler.json +1 -1
  29. package/dist/evm/artifacts/Tron_SpokePoolPeriphery.sol/Tron_SpokePoolPeriphery.json +1 -1
  30. package/dist/evm/artifacts/Tron_SpokePoolPeriphery.sol/Tron_SwapProxy.json +1 -1
  31. package/dist/src/consts.js +1 -0
  32. package/dist/src/svm/assets/idl/sponsored_cctp_src_periphery.json +41 -24
  33. package/dist/src/svm/assets/idl/svm_spoke.json +1001 -2171
  34. package/dist/src/svm/assets/sponsored_cctp_src_periphery.d.ts +41 -24
  35. package/dist/src/svm/assets/svm_spoke.d.ts +996 -2166
  36. package/dist/src/svm/assets/token_messenger_minter_v2.d.ts +18 -18
  37. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/accounts/index.d.ts +0 -1
  38. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/accounts/index.js +0 -1
  39. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/errors/sponsoredCctpSrcPeriphery.d.ts +24 -12
  40. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/errors/sponsoredCctpSrcPeriphery.js +30 -12
  41. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/programs/sponsoredCctpSrcPeriphery.d.ts +4 -5
  42. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/programs/sponsoredCctpSrcPeriphery.js +4 -8
  43. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/types/index.d.ts +1 -0
  44. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/types/index.js +1 -0
  45. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/types/messageSent.d.ts +21 -0
  46. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/types/messageSent.js +30 -0
  47. package/dist/src/svm/clients/SvmSpoke/accounts/fillStatusAccount.d.ts +2 -2
  48. package/dist/src/svm/clients/SvmSpoke/accounts/fillStatusAccount.js +2 -2
  49. package/dist/src/svm/clients/SvmSpoke/accounts/index.d.ts +0 -3
  50. package/dist/src/svm/clients/SvmSpoke/accounts/index.js +0 -3
  51. package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.d.ts +94 -22
  52. package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.js +133 -24
  53. package/dist/src/svm/clients/SvmSpoke/instructions/adapterExecuteAcrossV5.d.ts +75 -0
  54. package/dist/src/svm/clients/SvmSpoke/instructions/adapterExecuteAcrossV5.js +144 -0
  55. package/dist/src/svm/clients/SvmSpoke/instructions/closeFillPda.d.ts +16 -8
  56. package/dist/src/svm/clients/SvmSpoke/instructions/closeFillPda.js +3 -3
  57. package/dist/src/svm/clients/SvmSpoke/instructions/index.d.ts +2 -7
  58. package/dist/src/svm/clients/SvmSpoke/instructions/index.js +2 -7
  59. package/dist/src/svm/clients/SvmSpoke/instructions/withdrawV5FillPayer.d.ts +58 -0
  60. package/dist/src/svm/clients/SvmSpoke/instructions/withdrawV5FillPayer.js +134 -0
  61. package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.d.ts +29 -47
  62. package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.js +29 -61
  63. package/dist/src/svm/clients/SvmSpoke/types/acrossDepositInput.d.ts +25 -0
  64. package/dist/src/svm/clients/SvmSpoke/types/acrossDepositInput.js +33 -0
  65. package/dist/src/svm/clients/SvmSpoke/types/acrossDepositJitParams.d.ts +18 -0
  66. package/dist/src/svm/clients/SvmSpoke/types/acrossDepositJitParams.js +30 -0
  67. package/dist/src/svm/clients/SvmSpoke/types/acrossDepositParams.d.ts +43 -0
  68. package/dist/src/svm/clients/SvmSpoke/types/acrossDepositParams.js +48 -0
  69. package/dist/src/svm/clients/SvmSpoke/types/index.d.ts +9 -1
  70. package/dist/src/svm/clients/SvmSpoke/types/index.js +9 -1
  71. package/dist/src/svm/clients/SvmSpoke/types/v5AdapterInput.d.ts +39 -0
  72. package/dist/src/svm/clients/SvmSpoke/types/v5AdapterInput.js +59 -0
  73. package/dist/src/svm/clients/SvmSpoke/types/v5DepositModificationRules.d.ts +17 -0
  74. package/dist/src/svm/clients/SvmSpoke/types/v5DepositModificationRules.js +30 -0
  75. package/dist/src/svm/clients/SvmSpoke/types/v5FillFloatWithdrawn.d.ts +19 -0
  76. package/dist/src/svm/clients/SvmSpoke/types/v5FillFloatWithdrawn.js +28 -0
  77. package/dist/src/svm/clients/SvmSpoke/types/v5FillInput.d.ts +25 -0
  78. package/dist/src/svm/clients/SvmSpoke/types/v5FillInput.js +30 -0
  79. package/dist/src/svm/clients/SvmSpoke/types/v5FillJit.d.ts +22 -0
  80. package/dist/src/svm/clients/SvmSpoke/types/{slowFill.js → v5FillJit.js} +11 -11
  81. package/dist/src/svm/clients/SvmSpoke/types/v5InputAmountMode.d.ts +29 -0
  82. package/dist/src/svm/clients/SvmSpoke/types/v5InputAmountMode.js +38 -0
  83. package/dist/src/svm/web3-v1/cctpV2Helpers.d.ts +83 -97
  84. package/dist/src/svm/web3-v1/cctpV2Helpers.js +1 -1
  85. package/dist/src/svm/web3-v1/coders.d.ts +1 -1
  86. package/dist/src/svm/web3-v1/coders.js +4 -4
  87. package/dist/src/svm/web3-v1/conversionUtils.d.ts +1 -1
  88. package/dist/src/svm/web3-v1/conversionUtils.js +3 -3
  89. package/dist/src/svm/web3-v1/helpers.d.ts +1 -114
  90. package/dist/src/svm/web3-v1/helpers.js +1 -179
  91. package/dist/src/svm/web3-v1/instructionParamsUtils.d.ts +11 -26
  92. package/dist/src/svm/web3-v1/instructionParamsUtils.js +5 -90
  93. package/dist/src/svm/web3-v1/programConnectors.d.ts +1 -1
  94. package/dist/src/svm/web3-v1/programConnectors.js +2 -2
  95. package/dist/src/svm/web3-v1/relayHashUtils.d.ts +2 -6
  96. package/dist/src/svm/web3-v1/relayHashUtils.js +5 -66
  97. package/dist/src/svm/web3-v1/solanaProgramUtils.d.ts +1 -1
  98. package/dist/src/svm/web3-v1/solanaProgramUtils.js +7 -7
  99. package/dist/src/svm/web3-v1/transactionUtils.js +3 -3
  100. package/dist/src/svm/web3-v2/solanaProgramUtils.d.ts +1 -1
  101. package/dist/src/svm/web3-v2/solanaProgramUtils.js +4 -4
  102. package/dist/src/types/svm.d.ts +1 -46
  103. package/package.json +17 -6
  104. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/accounts/messageSent.d.ts +0 -30
  105. package/dist/src/svm/clients/SponsoredCctpSrcPeriphery/accounts/messageSent.js +0 -66
  106. package/dist/src/svm/clients/SvmSpoke/accounts/executeSlowRelayLeafParams.d.ts +0 -31
  107. package/dist/src/svm/clients/SvmSpoke/accounts/executeSlowRelayLeafParams.js +0 -70
  108. package/dist/src/svm/clients/SvmSpoke/accounts/fillRelayParams.d.ts +0 -31
  109. package/dist/src/svm/clients/SvmSpoke/accounts/fillRelayParams.js +0 -67
  110. package/dist/src/svm/clients/SvmSpoke/accounts/requestSlowFillParams.d.ts +0 -27
  111. package/dist/src/svm/clients/SvmSpoke/accounts/requestSlowFillParams.js +0 -66
  112. package/dist/src/svm/clients/SvmSpoke/instructions/deposit.d.ts +0 -131
  113. package/dist/src/svm/clients/SvmSpoke/instructions/deposit.js +0 -241
  114. package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.d.ts +0 -127
  115. package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.js +0 -239
  116. package/dist/src/svm/clients/SvmSpoke/instructions/executeSlowRelayLeaf.d.ts +0 -104
  117. package/dist/src/svm/clients/SvmSpoke/instructions/executeSlowRelayLeaf.js +0 -259
  118. package/dist/src/svm/clients/SvmSpoke/instructions/fillRelay.d.ts +0 -108
  119. package/dist/src/svm/clients/SvmSpoke/instructions/fillRelay.js +0 -265
  120. package/dist/src/svm/clients/SvmSpoke/instructions/getUnsafeDepositId.d.ts +0 -39
  121. package/dist/src/svm/clients/SvmSpoke/instructions/getUnsafeDepositId.js +0 -63
  122. package/dist/src/svm/clients/SvmSpoke/instructions/requestSlowFill.d.ts +0 -76
  123. package/dist/src/svm/clients/SvmSpoke/instructions/requestSlowFill.js +0 -187
  124. package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.d.ts +0 -135
  125. package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.js +0 -243
  126. package/dist/src/svm/clients/SvmSpoke/types/slowFill.d.ts +0 -22
  127. package/dist/target/types/svm_spoke.d.ts +0 -5106
  128. package/dist/target/types/svm_spoke.js +0 -2
@@ -7,6 +7,116 @@
7
7
  "description": "Created with Anchor"
8
8
  },
9
9
  "instructions": [
10
+ {
11
+ "name": "adapter_execute_across_v5",
12
+ "docs": [
13
+ "Executes one Gateway-authenticated Across V5 source-deposit or destination-fill adapter branch.",
14
+ "",
15
+ "### Required Accounts:",
16
+ "- dispatch_authority (Signer): Gateway PDA derived from [\"dispatch_authority\", svm_spoke::ID].",
17
+ "- state: Spoke state PDA derived from [\"state\", state.seed], where `state.seed` is 0 on mainnet.",
18
+ "- event_authority: Anchor event CPI authority derived from [\"__event_authority\"].",
19
+ "- program: The SVM Spoke program.",
20
+ "- remaining accounts: Branch-specific mint and token-program accounts plus writable canonical token accounts.",
21
+ "Deposit mode also requires the SpokePool vault and [\"v5_deposit_delegate\"]. Fill mode requires the",
22
+ "submitter-scoped [\"v5_fill_payer\"], relay-scoped fill-status PDA, System Program, recipient ATA, and",
23
+ "[\"v5_fill_delegate\"], including when the recipient ATA is the Gateway vault itself. Account order is",
24
+ "unrestricted because each account is resolved by its authenticated expected key.",
25
+ "",
26
+ "### Parameters:",
27
+ "- ctx_values: Gateway-attested step ID, path ID, and submitter.",
28
+ "- input: Strictly encoded, versioned `DepositV1 | FillV1` committed input.",
29
+ "- jit_data: Source modifications decoded only when the committed input enables them, or destination",
30
+ "relay/repayment data."
31
+ ],
32
+ "discriminator": [
33
+ 23,
34
+ 161,
35
+ 69,
36
+ 148,
37
+ 150,
38
+ 128,
39
+ 173,
40
+ 220
41
+ ],
42
+ "accounts": [
43
+ {
44
+ "name": "dispatch_authority"
45
+ },
46
+ {
47
+ "name": "state",
48
+ "pda": {
49
+ "seeds": [
50
+ {
51
+ "kind": "const",
52
+ "value": [
53
+ 115,
54
+ 116,
55
+ 97,
56
+ 116,
57
+ 101
58
+ ]
59
+ },
60
+ {
61
+ "kind": "account",
62
+ "path": "state.seed",
63
+ "account": "State"
64
+ }
65
+ ]
66
+ }
67
+ },
68
+ {
69
+ "name": "event_authority",
70
+ "pda": {
71
+ "seeds": [
72
+ {
73
+ "kind": "const",
74
+ "value": [
75
+ 95,
76
+ 95,
77
+ 101,
78
+ 118,
79
+ 101,
80
+ 110,
81
+ 116,
82
+ 95,
83
+ 97,
84
+ 117,
85
+ 116,
86
+ 104,
87
+ 111,
88
+ 114,
89
+ 105,
90
+ 116,
91
+ 121
92
+ ]
93
+ }
94
+ ]
95
+ }
96
+ },
97
+ {
98
+ "name": "program"
99
+ }
100
+ ],
101
+ "args": [
102
+ {
103
+ "name": "ctx_values",
104
+ "type": {
105
+ "defined": {
106
+ "name": "GatewayContextV1"
107
+ }
108
+ }
109
+ },
110
+ {
111
+ "name": "input",
112
+ "type": "bytes"
113
+ },
114
+ {
115
+ "name": "jit_data",
116
+ "type": "bytes"
117
+ }
118
+ ]
119
+ },
10
120
  {
11
121
  "name": "claim_relayer_refund",
12
122
  "docs": [
@@ -284,15 +394,16 @@
284
394
  {
285
395
  "name": "close_fill_pda",
286
396
  "docs": [
287
- "Closes the FillStatusAccount PDA to reclaim relayer rent.",
397
+ "Closes the FillStatusAccount PDA to reclaim rent.",
288
398
  "",
289
399
  "This function is used to close the FillStatusAccount associated with a specific relay hash, effectively marking",
290
- "the end of its lifecycle. This can only be done once the fill deadline has passed. Relayers should do this for",
291
- "all fills once they expire to reclaim their rent.",
400
+ "the end of its lifecycle. This can only be done once the fill deadline has passed. Anyone can trigger closure,",
401
+ "but rent is always returned to the recorded rent recipient: the V5 payer PDA, historical relayer, or",
402
+ "slow-fill requester.",
292
403
  "",
293
404
  "### Required Accounts:",
294
- "- signer (Signer): The account that authorizes the closure. Must be the relayer in the fill_status PDA.",
295
- "- state (Writable): Spoke state PDA. Seed: [\"state\",state.seed] where seed is 0 on mainnet.",
405
+ "- rent_recipient (Writable): The recorded rent recipient; no signature is required.",
406
+ "- state (Readonly): Spoke state PDA. Seed: [\"state\",state.seed] where seed is 0 on mainnet.",
296
407
  "- fill_status (Writable): The FillStatusAccount PDA to be closed."
297
408
  ],
298
409
  "discriminator": [
@@ -307,9 +418,12 @@
307
418
  ],
308
419
  "accounts": [
309
420
  {
310
- "name": "signer",
311
- "writable": true,
312
- "signer": true
421
+ "name": "rent_recipient",
422
+ "docs": [
423
+ "For V5 fills, supply the submitter's `[\"v5_fill_payer\", submitter]` PDA recorded in",
424
+ "`fill_status.rent_recipient`; legacy accounts retain the relayer or slow-fill requester address."
425
+ ],
426
+ "writable": true
313
427
  },
314
428
  {
315
429
  "name": "state",
@@ -456,76 +570,43 @@
456
570
  "args": []
457
571
  },
458
572
  {
459
- "name": "deposit",
573
+ "name": "emergency_delete_root_bundle",
460
574
  "docs": [
461
- "Request to bridge input_token to a target chain and receive output_token.",
462
- "",
463
- "The fee paid to relayers and the system is captured in the spread between the input and output amounts,",
464
- "denominated in the input token. A relayer on the destination chain will send `output_amount` of `output_token`",
465
- "to the recipient and receive `input_token` on a repayment chain of their choice. The fee accounts for:",
466
- "destination transaction costs, relayer's opportunity cost of capital while waiting for a refund during the",
467
- "optimistic challenge window in the HubPool, and the system fee charged to the relayer.",
575
+ "Deletes a root bundle in case of emergencies where bad bundle has reached the Spoke. Only callable by the owner.",
468
576
  "",
469
- "On the destination chain, a unique hash of the deposit data is used to identify this deposit. Modifying any",
470
- "parameters will result in a different hash, creating a separate deposit. The hash is computed using all parameters",
471
- "of this function along with the chain's `chainId()`. Relayers are refunded only for deposits with hashes that",
472
- "exactly match those emitted by this contract.",
577
+ "This function will close the PDA for the associated `root_bundle_id`.",
578
+ "Note: Using this function does not decrement `state.root_bundle_id`.",
473
579
  "",
474
580
  "### Required Accounts:",
475
- "- signer (Signer): The account that authorizes the deposit.",
581
+ "- signer (Signer): The account that must be the owner to authorize the deletion.",
582
+ "- closer (SystemAccount): The account that will receive the lamports from closing the root_bundle account.",
476
583
  "- state (Writable): Spoke state PDA. Seed: [\"state\",state.seed] where seed is 0 on mainnet.",
477
- "- depositor_token_account (Writable): The depositor's ATA for the input token.",
478
- "- vault (Writable): Programs ATA for the associated input token. This is where the depositor's assets are sent.",
479
- "Authority must be the state.",
480
- "- mint (Account): The mint account for the input token.",
481
- "- token_program (Interface): The token program.",
482
- "- delegate (Account): The account used to delegate the input amount of the input token.",
584
+ "- root_bundle (Writable): The root bundle PDA to be closed. Seed: [\"root_bundle\",state.seed,root_bundle_id].",
483
585
  "",
484
- "### Parameters",
485
- "- depositor: The account credited with the deposit. Can be different from the signer.",
486
- "- recipient: The account receiving funds on the destination chain. Depending on the output chain can be an ETH",
487
- "address or a contract address or any other address type encoded as a bytes32 field.",
488
- "- input_token: The token pulled from the caller's account and locked into this program's vault on deposit.",
489
- "- output_token: The token that the relayer will send to the recipient on the destination chain.",
490
- "- input_amount: The amount of input tokens to pull from the caller's account and lock into the vault. This",
491
- "amount will be sent to the relayer on their repayment chain of choice as a refund following an optimistic",
492
- "challenge window in the HubPool, less a system fee.",
493
- "- output_amount: The amount of output tokens that the relayer will send to the recipient on the destination.",
494
- "This is big-endian encoded as a 32-byte array to match its underlying byte representation on EVM side.",
495
- "- destination_chain_id: The destination chain identifier where the fill should be made.",
496
- "- exclusive_relayer: The relayer that will be exclusively allowed to fill this deposit before the exclusivity",
497
- "deadline timestamp. This must be a valid, non-zero address if the exclusivity deadline is greater than the",
498
- "current block timestamp.",
499
- "- quote_timestamp: The HubPool timestamp that is used to determine the system fee paid by the depositor. This",
500
- "must be set to some time between [currentTime - depositQuoteTimeBuffer, currentTime].",
501
- "- fill_deadline: The deadline for the relayer to fill the deposit. After this destination chain timestamp, the",
502
- "fill will revert on the destination chain. Must be set before currentTime + fillDeadlineBuffer.",
503
- "- exclusivity_parameter: Sets the exclusivity deadline timestamp for the exclusiveRelayer to fill the deposit.",
504
- "1. If 0, no exclusivity period.",
505
- "2. If less than MAX_EXCLUSIVITY_PERIOD_SECONDS, adds this value to the current block timestamp.",
506
- "3. Otherwise, uses this value as the exclusivity deadline timestamp.",
507
- "- message: The message to send to the recipient on the destination chain if the recipient is a contract.",
508
- "If not empty, the recipient contract must implement handleV3AcrossMessage() or the fill will revert."
586
+ "### Parameters:",
587
+ "- root_bundle_id: Index of the root bundle that needs to be deleted."
509
588
  ],
510
589
  "discriminator": [
511
- 242,
512
- 35,
513
- 198,
514
- 137,
515
- 82,
516
- 225,
517
- 242,
518
- 182
590
+ 226,
591
+ 158,
592
+ 1,
593
+ 74,
594
+ 84,
595
+ 113,
596
+ 24,
597
+ 152
519
598
  ],
520
599
  "accounts": [
521
600
  {
522
601
  "name": "signer",
523
- "writable": true,
524
602
  "signer": true
525
603
  },
604
+ {
605
+ "name": "closer",
606
+ "writable": true
607
+ },
526
608
  {
527
609
  "name": "state",
528
- "writable": true,
529
610
  "pda": {
530
611
  "seeds": [
531
612
  {
@@ -547,136 +628,38 @@
547
628
  }
548
629
  },
549
630
  {
550
- "name": "delegate"
551
- },
552
- {
553
- "name": "depositor_token_account",
554
- "writable": true,
555
- "pda": {
556
- "seeds": [
557
- {
558
- "kind": "arg",
559
- "path": "depositor"
560
- },
561
- {
562
- "kind": "account",
563
- "path": "token_program"
564
- },
565
- {
566
- "kind": "account",
567
- "path": "mint"
568
- }
569
- ],
570
- "program": {
571
- "kind": "const",
572
- "value": [
573
- 140,
574
- 151,
575
- 37,
576
- 143,
577
- 78,
578
- 36,
579
- 137,
580
- 241,
581
- 187,
582
- 61,
583
- 16,
584
- 41,
585
- 20,
586
- 142,
587
- 13,
588
- 131,
589
- 11,
590
- 90,
591
- 19,
592
- 153,
593
- 218,
594
- 255,
595
- 16,
596
- 132,
597
- 4,
598
- 142,
599
- 123,
600
- 216,
601
- 219,
602
- 233,
603
- 248,
604
- 89
605
- ]
606
- }
607
- }
608
- },
609
- {
610
- "name": "vault",
631
+ "name": "root_bundle",
611
632
  "writable": true,
612
633
  "pda": {
613
634
  "seeds": [
614
635
  {
615
- "kind": "account",
616
- "path": "state"
636
+ "kind": "const",
637
+ "value": [
638
+ 114,
639
+ 111,
640
+ 111,
641
+ 116,
642
+ 95,
643
+ 98,
644
+ 117,
645
+ 110,
646
+ 100,
647
+ 108,
648
+ 101
649
+ ]
617
650
  },
618
651
  {
619
652
  "kind": "account",
620
- "path": "token_program"
653
+ "path": "state.seed",
654
+ "account": "State"
621
655
  },
622
656
  {
623
- "kind": "account",
624
- "path": "mint"
657
+ "kind": "arg",
658
+ "path": "root_bundle_id"
625
659
  }
626
- ],
627
- "program": {
628
- "kind": "const",
629
- "value": [
630
- 140,
631
- 151,
632
- 37,
633
- 143,
634
- 78,
635
- 36,
636
- 137,
637
- 241,
638
- 187,
639
- 61,
640
- 16,
641
- 41,
642
- 20,
643
- 142,
644
- 13,
645
- 131,
646
- 11,
647
- 90,
648
- 19,
649
- 153,
650
- 218,
651
- 255,
652
- 16,
653
- 132,
654
- 4,
655
- 142,
656
- 123,
657
- 216,
658
- 219,
659
- 233,
660
- 248,
661
- 89
662
- ]
663
- }
660
+ ]
664
661
  }
665
662
  },
666
- {
667
- "name": "mint"
668
- },
669
- {
670
- "name": "token_program"
671
- },
672
- {
673
- "name": "associated_token_program",
674
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
675
- },
676
- {
677
- "name": "system_program",
678
- "address": "11111111111111111111111111111111"
679
- },
680
663
  {
681
664
  "name": "event_authority",
682
665
  "pda": {
@@ -712,975 +695,68 @@
712
695
  ],
713
696
  "args": [
714
697
  {
715
- "name": "depositor",
716
- "type": "pubkey"
717
- },
718
- {
719
- "name": "recipient",
720
- "type": "pubkey"
721
- },
722
- {
723
- "name": "input_token",
724
- "type": "pubkey"
725
- },
726
- {
727
- "name": "output_token",
728
- "type": "pubkey"
729
- },
730
- {
731
- "name": "input_amount",
732
- "type": "u64"
733
- },
734
- {
735
- "name": "output_amount",
736
- "type": {
737
- "array": [
738
- "u8",
739
- 32
740
- ]
741
- }
742
- },
743
- {
744
- "name": "destination_chain_id",
745
- "type": "u64"
746
- },
747
- {
748
- "name": "exclusive_relayer",
749
- "type": "pubkey"
750
- },
751
- {
752
- "name": "quote_timestamp",
753
- "type": "u32"
754
- },
755
- {
756
- "name": "fill_deadline",
757
- "type": "u32"
758
- },
759
- {
760
- "name": "exclusivity_parameter",
761
- "type": "u32"
762
- },
763
- {
764
- "name": "message",
765
- "type": "bytes"
766
- }
767
- ]
768
- },
769
- {
770
- "name": "deposit_now",
771
- "docs": [
772
- "Equivalent to deposit except quote_timestamp is set to the current time.",
773
- "The deposit `fill_deadline` is calculated as the current time plus `fill_deadline_offset`."
774
- ],
775
- "discriminator": [
776
- 75,
777
- 228,
778
- 135,
779
- 221,
780
- 200,
781
- 25,
782
- 148,
783
- 26
784
- ],
785
- "accounts": [
786
- {
787
- "name": "signer",
788
- "writable": true,
789
- "signer": true
790
- },
791
- {
792
- "name": "state",
793
- "writable": true,
794
- "pda": {
795
- "seeds": [
796
- {
797
- "kind": "const",
798
- "value": [
799
- 115,
800
- 116,
801
- 97,
802
- 116,
803
- 101
804
- ]
805
- },
806
- {
807
- "kind": "account",
808
- "path": "state.seed",
809
- "account": "State"
810
- }
811
- ]
812
- }
813
- },
814
- {
815
- "name": "delegate"
816
- },
817
- {
818
- "name": "depositor_token_account",
819
- "writable": true,
820
- "pda": {
821
- "seeds": [
822
- {
823
- "kind": "arg",
824
- "path": "depositor"
825
- },
826
- {
827
- "kind": "account",
828
- "path": "token_program"
829
- },
830
- {
831
- "kind": "account",
832
- "path": "mint"
833
- }
834
- ],
835
- "program": {
836
- "kind": "const",
837
- "value": [
838
- 140,
839
- 151,
840
- 37,
841
- 143,
842
- 78,
843
- 36,
844
- 137,
845
- 241,
846
- 187,
847
- 61,
848
- 16,
849
- 41,
850
- 20,
851
- 142,
852
- 13,
853
- 131,
854
- 11,
855
- 90,
856
- 19,
857
- 153,
858
- 218,
859
- 255,
860
- 16,
861
- 132,
862
- 4,
863
- 142,
864
- 123,
865
- 216,
866
- 219,
867
- 233,
868
- 248,
869
- 89
870
- ]
871
- }
872
- }
873
- },
874
- {
875
- "name": "vault",
876
- "writable": true,
877
- "pda": {
878
- "seeds": [
879
- {
880
- "kind": "account",
881
- "path": "state"
882
- },
883
- {
884
- "kind": "account",
885
- "path": "token_program"
886
- },
887
- {
888
- "kind": "account",
889
- "path": "mint"
890
- }
891
- ],
892
- "program": {
893
- "kind": "const",
894
- "value": [
895
- 140,
896
- 151,
897
- 37,
898
- 143,
899
- 78,
900
- 36,
901
- 137,
902
- 241,
903
- 187,
904
- 61,
905
- 16,
906
- 41,
907
- 20,
908
- 142,
909
- 13,
910
- 131,
911
- 11,
912
- 90,
913
- 19,
914
- 153,
915
- 218,
916
- 255,
917
- 16,
918
- 132,
919
- 4,
920
- 142,
921
- 123,
922
- 216,
923
- 219,
924
- 233,
925
- 248,
926
- 89
927
- ]
928
- }
929
- }
930
- },
931
- {
932
- "name": "mint"
933
- },
934
- {
935
- "name": "token_program"
936
- },
937
- {
938
- "name": "associated_token_program",
939
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
940
- },
941
- {
942
- "name": "system_program",
943
- "address": "11111111111111111111111111111111"
944
- },
945
- {
946
- "name": "event_authority",
947
- "pda": {
948
- "seeds": [
949
- {
950
- "kind": "const",
951
- "value": [
952
- 95,
953
- 95,
954
- 101,
955
- 118,
956
- 101,
957
- 110,
958
- 116,
959
- 95,
960
- 97,
961
- 117,
962
- 116,
963
- 104,
964
- 111,
965
- 114,
966
- 105,
967
- 116,
968
- 121
969
- ]
970
- }
971
- ]
972
- }
973
- },
974
- {
975
- "name": "program"
976
- }
977
- ],
978
- "args": [
979
- {
980
- "name": "depositor",
981
- "type": "pubkey"
982
- },
983
- {
984
- "name": "recipient",
985
- "type": "pubkey"
986
- },
987
- {
988
- "name": "input_token",
989
- "type": "pubkey"
990
- },
991
- {
992
- "name": "output_token",
993
- "type": "pubkey"
994
- },
995
- {
996
- "name": "input_amount",
997
- "type": "u64"
998
- },
999
- {
1000
- "name": "output_amount",
1001
- "type": {
1002
- "array": [
1003
- "u8",
1004
- 32
1005
- ]
1006
- }
1007
- },
1008
- {
1009
- "name": "destination_chain_id",
1010
- "type": "u64"
1011
- },
1012
- {
1013
- "name": "exclusive_relayer",
1014
- "type": "pubkey"
1015
- },
1016
- {
1017
- "name": "fill_deadline_offset",
1018
- "type": "u32"
1019
- },
1020
- {
1021
- "name": "exclusivity_parameter",
1022
- "type": "u32"
1023
- },
1024
- {
1025
- "name": "message",
1026
- "type": "bytes"
1027
- }
1028
- ]
1029
- },
1030
- {
1031
- "name": "emergency_delete_root_bundle",
1032
- "docs": [
1033
- "Deletes a root bundle in case of emergencies where bad bundle has reached the Spoke. Only callable by the owner.",
1034
- "",
1035
- "This function will close the PDA for the associated `root_bundle_id`.",
1036
- "Note: Using this function does not decrement `state.root_bundle_id`.",
1037
- "",
1038
- "### Required Accounts:",
1039
- "- signer (Signer): The account that must be the owner to authorize the deletion.",
1040
- "- closer (SystemAccount): The account that will receive the lamports from closing the root_bundle account.",
1041
- "- state (Writable): Spoke state PDA. Seed: [\"state\",state.seed] where seed is 0 on mainnet.",
1042
- "- root_bundle (Writable): The root bundle PDA to be closed. Seed: [\"root_bundle\",state.seed,root_bundle_id].",
1043
- "",
1044
- "### Parameters:",
1045
- "- root_bundle_id: Index of the root bundle that needs to be deleted."
1046
- ],
1047
- "discriminator": [
1048
- 226,
1049
- 158,
1050
- 1,
1051
- 74,
1052
- 84,
1053
- 113,
1054
- 24,
1055
- 152
1056
- ],
1057
- "accounts": [
1058
- {
1059
- "name": "signer",
1060
- "signer": true
1061
- },
1062
- {
1063
- "name": "closer",
1064
- "writable": true
1065
- },
1066
- {
1067
- "name": "state",
1068
- "pda": {
1069
- "seeds": [
1070
- {
1071
- "kind": "const",
1072
- "value": [
1073
- 115,
1074
- 116,
1075
- 97,
1076
- 116,
1077
- 101
1078
- ]
1079
- },
1080
- {
1081
- "kind": "account",
1082
- "path": "state.seed",
1083
- "account": "State"
1084
- }
1085
- ]
1086
- }
1087
- },
1088
- {
1089
- "name": "root_bundle",
1090
- "writable": true,
1091
- "pda": {
1092
- "seeds": [
1093
- {
1094
- "kind": "const",
1095
- "value": [
1096
- 114,
1097
- 111,
1098
- 111,
1099
- 116,
1100
- 95,
1101
- 98,
1102
- 117,
1103
- 110,
1104
- 100,
1105
- 108,
1106
- 101
1107
- ]
1108
- },
1109
- {
1110
- "kind": "account",
1111
- "path": "state.seed",
1112
- "account": "State"
1113
- },
1114
- {
1115
- "kind": "arg",
1116
- "path": "root_bundle_id"
1117
- }
1118
- ]
1119
- }
1120
- },
1121
- {
1122
- "name": "event_authority",
1123
- "pda": {
1124
- "seeds": [
1125
- {
1126
- "kind": "const",
1127
- "value": [
1128
- 95,
1129
- 95,
1130
- 101,
1131
- 118,
1132
- 101,
1133
- 110,
1134
- 116,
1135
- 95,
1136
- 97,
1137
- 117,
1138
- 116,
1139
- 104,
1140
- 111,
1141
- 114,
1142
- 105,
1143
- 116,
1144
- 121
1145
- ]
1146
- }
1147
- ]
1148
- }
1149
- },
1150
- {
1151
- "name": "program"
1152
- }
1153
- ],
1154
- "args": [
1155
- {
1156
- "name": "root_bundle_id",
1157
- "type": "u32"
1158
- }
1159
- ]
1160
- },
1161
- {
1162
- "name": "execute_relayer_refund_leaf",
1163
- "docs": [
1164
- "Executes relayer refund leaf.",
1165
- "",
1166
- "Processes a relayer refund leaf, verifying its inclusion in a previous Merkle root and that it was not",
1167
- "previously executed. Function has two modes of operation: a) transfers all relayer refunds directly to",
1168
- "relayers ATA or b) credits relayers with claimable claim_account PDA that they can use later to claim their",
1169
- "refund. In the happy path, (a) should be used. (b) should only be used if there is a relayer within the bundle",
1170
- "who can't receive the transfer for some reason, such as failed token transfers due to blacklisting. Executing",
1171
- "relayer refunds requires the caller to create a LUT and load the execution params into it. This is needed to",
1172
- "fit the data in a single instruction. The exact structure and validation of the leaf is defined in the Across",
1173
- "UMIP: https://github.com/UMAprotocol/UMIPs/blob/master/UMIPs/umip-179.md",
1174
- "",
1175
- "instruction_params Parameters:",
1176
- "- root_bundle_id: The ID of the root bundle containing the relayer refund root.",
1177
- "- relayer_refund_leaf: The relayer refund leaf to be executed. Contents must include:",
1178
- "- amount_to_return: Must be 0 as this Spoke pool never returns tokens to the HubPool.",
1179
- "- chain_id: The targeted chainId for the refund. Validated against state.chain_id.",
1180
- "- refund_amounts: The amounts to be returned to the relayer for each refund_address.",
1181
- "- leaf_id: The leaf ID of the relayer refund leaf.",
1182
- "- mint_public_key: The public key of the mint (refunded token) being refunded.",
1183
- "- refund_addresses: The addresses to be refunded.",
1184
- "- proof: The Merkle proof for the relayer refund leaf.",
1185
- "",
1186
- "### Required Accounts:",
1187
- "- signer (Signer): The account that authorizes the execution. No permission requirements.",
1188
- "- instruction_params (Account): LUT containing the execution parameters. seed: [\"instruction_params\",signer]",
1189
- "- state (Writable): Spoke state PDA. Seed: [\"state\",state.seed] where seed is 0 on mainnet.",
1190
- "- root_bundle (Writable): The root bundle PDA containing the relayer refund root, created when the root bundle",
1191
- "was initially bridged. seed: [\"root_bundle\",state.seed,root_bundle_id].",
1192
- "- vault (Writable): The ATA for refunded mint. Authority must be the state.",
1193
- "- mint (Account): The mint account for the token being refunded.",
1194
- "- token_program: The token program.",
1195
- "- system_program: The system program required for account creation.",
1196
- "",
1197
- "execute_relayer_refund_leaf executes in mode where refunds are sent to ATA directly."
1198
- ],
1199
- "discriminator": [
1200
- 27,
1201
- 136,
1202
- 159,
1203
- 240,
1204
- 127,
1205
- 68,
1206
- 123,
1207
- 164
1208
- ],
1209
- "accounts": [
1210
- {
1211
- "name": "signer",
1212
- "writable": true,
1213
- "signer": true
1214
- },
1215
- {
1216
- "name": "instruction_params",
1217
- "writable": true,
1218
- "pda": {
1219
- "seeds": [
1220
- {
1221
- "kind": "const",
1222
- "value": [
1223
- 105,
1224
- 110,
1225
- 115,
1226
- 116,
1227
- 114,
1228
- 117,
1229
- 99,
1230
- 116,
1231
- 105,
1232
- 111,
1233
- 110,
1234
- 95,
1235
- 112,
1236
- 97,
1237
- 114,
1238
- 97,
1239
- 109,
1240
- 115
1241
- ]
1242
- },
1243
- {
1244
- "kind": "account",
1245
- "path": "signer"
1246
- }
1247
- ]
1248
- }
1249
- },
1250
- {
1251
- "name": "state",
1252
- "pda": {
1253
- "seeds": [
1254
- {
1255
- "kind": "const",
1256
- "value": [
1257
- 115,
1258
- 116,
1259
- 97,
1260
- 116,
1261
- 101
1262
- ]
1263
- },
1264
- {
1265
- "kind": "account",
1266
- "path": "state.seed",
1267
- "account": "State"
1268
- }
1269
- ]
1270
- }
1271
- },
1272
- {
1273
- "name": "root_bundle",
1274
- "writable": true,
1275
- "pda": {
1276
- "seeds": [
1277
- {
1278
- "kind": "const",
1279
- "value": [
1280
- 114,
1281
- 111,
1282
- 111,
1283
- 116,
1284
- 95,
1285
- 98,
1286
- 117,
1287
- 110,
1288
- 100,
1289
- 108,
1290
- 101
1291
- ]
1292
- },
1293
- {
1294
- "kind": "account",
1295
- "path": "state.seed",
1296
- "account": "State"
1297
- },
1298
- {
1299
- "kind": "account",
1300
- "path": "instruction_params.root_bundle_id",
1301
- "account": "ExecuteRelayerRefundLeafParams"
1302
- }
1303
- ]
1304
- }
1305
- },
1306
- {
1307
- "name": "vault",
1308
- "writable": true,
1309
- "pda": {
1310
- "seeds": [
1311
- {
1312
- "kind": "account",
1313
- "path": "state"
1314
- },
1315
- {
1316
- "kind": "account",
1317
- "path": "token_program"
1318
- },
1319
- {
1320
- "kind": "account",
1321
- "path": "mint"
1322
- }
1323
- ],
1324
- "program": {
1325
- "kind": "const",
1326
- "value": [
1327
- 140,
1328
- 151,
1329
- 37,
1330
- 143,
1331
- 78,
1332
- 36,
1333
- 137,
1334
- 241,
1335
- 187,
1336
- 61,
1337
- 16,
1338
- 41,
1339
- 20,
1340
- 142,
1341
- 13,
1342
- 131,
1343
- 11,
1344
- 90,
1345
- 19,
1346
- 153,
1347
- 218,
1348
- 255,
1349
- 16,
1350
- 132,
1351
- 4,
1352
- 142,
1353
- 123,
1354
- 216,
1355
- 219,
1356
- 233,
1357
- 248,
1358
- 89
1359
- ]
1360
- }
1361
- }
1362
- },
1363
- {
1364
- "name": "mint"
1365
- },
1366
- {
1367
- "name": "token_program"
1368
- },
1369
- {
1370
- "name": "system_program",
1371
- "address": "11111111111111111111111111111111"
1372
- },
1373
- {
1374
- "name": "event_authority",
1375
- "pda": {
1376
- "seeds": [
1377
- {
1378
- "kind": "const",
1379
- "value": [
1380
- 95,
1381
- 95,
1382
- 101,
1383
- 118,
1384
- 101,
1385
- 110,
1386
- 116,
1387
- 95,
1388
- 97,
1389
- 117,
1390
- 116,
1391
- 104,
1392
- 111,
1393
- 114,
1394
- 105,
1395
- 116,
1396
- 121
1397
- ]
1398
- }
1399
- ]
1400
- }
1401
- },
1402
- {
1403
- "name": "program"
1404
- }
1405
- ],
1406
- "args": []
1407
- },
1408
- {
1409
- "name": "execute_relayer_refund_leaf_deferred",
1410
- "docs": [
1411
- "Similar to execute_relayer_refund_leaf, but executes in mode where refunds are allocated to claim_account PDAs."
1412
- ],
1413
- "discriminator": [
1414
- 110,
1415
- 112,
1416
- 89,
1417
- 208,
1418
- 38,
1419
- 116,
1420
- 93,
1421
- 10
1422
- ],
1423
- "accounts": [
1424
- {
1425
- "name": "signer",
1426
- "writable": true,
1427
- "signer": true
1428
- },
1429
- {
1430
- "name": "instruction_params",
1431
- "writable": true,
1432
- "pda": {
1433
- "seeds": [
1434
- {
1435
- "kind": "const",
1436
- "value": [
1437
- 105,
1438
- 110,
1439
- 115,
1440
- 116,
1441
- 114,
1442
- 117,
1443
- 99,
1444
- 116,
1445
- 105,
1446
- 111,
1447
- 110,
1448
- 95,
1449
- 112,
1450
- 97,
1451
- 114,
1452
- 97,
1453
- 109,
1454
- 115
1455
- ]
1456
- },
1457
- {
1458
- "kind": "account",
1459
- "path": "signer"
1460
- }
1461
- ]
1462
- }
1463
- },
1464
- {
1465
- "name": "state",
1466
- "pda": {
1467
- "seeds": [
1468
- {
1469
- "kind": "const",
1470
- "value": [
1471
- 115,
1472
- 116,
1473
- 97,
1474
- 116,
1475
- 101
1476
- ]
1477
- },
1478
- {
1479
- "kind": "account",
1480
- "path": "state.seed",
1481
- "account": "State"
1482
- }
1483
- ]
1484
- }
1485
- },
1486
- {
1487
- "name": "root_bundle",
1488
- "writable": true,
1489
- "pda": {
1490
- "seeds": [
1491
- {
1492
- "kind": "const",
1493
- "value": [
1494
- 114,
1495
- 111,
1496
- 111,
1497
- 116,
1498
- 95,
1499
- 98,
1500
- 117,
1501
- 110,
1502
- 100,
1503
- 108,
1504
- 101
1505
- ]
1506
- },
1507
- {
1508
- "kind": "account",
1509
- "path": "state.seed",
1510
- "account": "State"
1511
- },
1512
- {
1513
- "kind": "account",
1514
- "path": "instruction_params.root_bundle_id",
1515
- "account": "ExecuteRelayerRefundLeafParams"
1516
- }
1517
- ]
1518
- }
1519
- },
1520
- {
1521
- "name": "vault",
1522
- "writable": true,
1523
- "pda": {
1524
- "seeds": [
1525
- {
1526
- "kind": "account",
1527
- "path": "state"
1528
- },
1529
- {
1530
- "kind": "account",
1531
- "path": "token_program"
1532
- },
1533
- {
1534
- "kind": "account",
1535
- "path": "mint"
1536
- }
1537
- ],
1538
- "program": {
1539
- "kind": "const",
1540
- "value": [
1541
- 140,
1542
- 151,
1543
- 37,
1544
- 143,
1545
- 78,
1546
- 36,
1547
- 137,
1548
- 241,
1549
- 187,
1550
- 61,
1551
- 16,
1552
- 41,
1553
- 20,
1554
- 142,
1555
- 13,
1556
- 131,
1557
- 11,
1558
- 90,
1559
- 19,
1560
- 153,
1561
- 218,
1562
- 255,
1563
- 16,
1564
- 132,
1565
- 4,
1566
- 142,
1567
- 123,
1568
- 216,
1569
- 219,
1570
- 233,
1571
- 248,
1572
- 89
1573
- ]
1574
- }
1575
- }
1576
- },
1577
- {
1578
- "name": "mint"
1579
- },
1580
- {
1581
- "name": "token_program"
1582
- },
1583
- {
1584
- "name": "system_program",
1585
- "address": "11111111111111111111111111111111"
1586
- },
1587
- {
1588
- "name": "event_authority",
1589
- "pda": {
1590
- "seeds": [
1591
- {
1592
- "kind": "const",
1593
- "value": [
1594
- 95,
1595
- 95,
1596
- 101,
1597
- 118,
1598
- 101,
1599
- 110,
1600
- 116,
1601
- 95,
1602
- 97,
1603
- 117,
1604
- 116,
1605
- 104,
1606
- 111,
1607
- 114,
1608
- 105,
1609
- 116,
1610
- 121
1611
- ]
1612
- }
1613
- ]
1614
- }
1615
- },
1616
- {
1617
- "name": "program"
698
+ "name": "root_bundle_id",
699
+ "type": "u32"
1618
700
  }
1619
- ],
1620
- "args": []
701
+ ]
1621
702
  },
1622
703
  {
1623
- "name": "execute_slow_relay_leaf",
704
+ "name": "execute_relayer_refund_leaf",
1624
705
  "docs": [
1625
- "Executes a slow relay leaf stored as part of a root bundle relayed by the HubPool.",
706
+ "Executes relayer refund leaf.",
707
+ "",
708
+ "Processes a relayer refund leaf, verifying its inclusion in a previous Merkle root and that it was not",
709
+ "previously executed. Function has two modes of operation: a) transfers all relayer refunds directly to",
710
+ "relayers ATA or b) credits relayers with claimable claim_account PDA that they can use later to claim their",
711
+ "refund. In the happy path, (a) should be used. (b) should only be used if there is a relayer within the bundle",
712
+ "who can't receive the transfer for some reason, such as failed token transfers due to blacklisting. Executing",
713
+ "relayer refunds requires the caller to create a LUT and load the execution params into it. This is needed to",
714
+ "fit the data in a single instruction. The exact structure and validation of the leaf is defined in the Across",
715
+ "UMIP: https://github.com/UMAprotocol/UMIPs/blob/master/UMIPs/umip-179.md",
1626
716
  "",
1627
- "Executing a slow fill leaf is equivalent to filling the relayData, so this function cannot be used to",
1628
- "double fill a recipient. The relayData that is filled is included in the slowFillLeaf and is hashed",
1629
- "like any other fill sent through fillRelay(). There is no relayer credited with filling this relay since funds",
1630
- "are sent directly out of this program's vault.",
717
+ "instruction_params Parameters:",
718
+ "- root_bundle_id: The ID of the root bundle containing the relayer refund root.",
719
+ "- relayer_refund_leaf: The relayer refund leaf to be executed. Contents must include:",
720
+ "- amount_to_return: Must be 0 as this Spoke pool never returns tokens to the HubPool.",
721
+ "- chain_id: The targeted chainId for the refund. Validated against state.chain_id.",
722
+ "- refund_amounts: The amounts to be returned to the relayer for each refund_address.",
723
+ "- leaf_id: The leaf ID of the relayer refund leaf.",
724
+ "- mint_public_key: The public key of the mint (refunded token) being refunded.",
725
+ "- refund_addresses: The addresses to be refunded.",
726
+ "- proof: The Merkle proof for the relayer refund leaf.",
1631
727
  "",
1632
728
  "### Required Accounts:",
1633
729
  "- signer (Signer): The account that authorizes the execution. No permission requirements.",
1634
- "- instruction_params (Account): Optional account to load instruction parameters when they are not passed in the",
1635
- "instruction data due to message size constraints. Pass this program ID to represent None. When Some, this must",
1636
- "be derived from the signer's public key with seed [\"instruction_params\",signer].",
730
+ "- instruction_params (Account): LUT containing the execution parameters. seed: [\"instruction_params\",signer]",
1637
731
  "- state (Writable): Spoke state PDA. Seed: [\"state\",state.seed] where seed is 0 on mainnet.",
1638
- "- root_bundle (Account): Root bundle PDA with slowRelayRoot. Seed: [\"root_bundle\",state.seed,root_bundle_id].",
1639
- "- fill_status (Writable): The fill status PDA, created when slow request was made. Updated to track slow fill.",
1640
- "Used to prevent double request and fill. Seed: [\"fills\",relay_hash].",
1641
- "- mint (Account): The mint account for the output token.",
1642
- "- recipient_token_account (Writable): The recipient's ATA for the output token.",
732
+ "- root_bundle (Writable): The root bundle PDA containing the relayer refund root, created when the root bundle",
733
+ "was initially bridged. seed: [\"root_bundle\",state.seed,root_bundle_id].",
1643
734
  "- vault (Writable): The ATA for refunded mint. Authority must be the state.",
1644
- "- token_program (Interface): The token program.",
1645
- "- system_program (Program): The system program.",
735
+ "- mint (Account): The mint account for the token being refunded.",
736
+ "- token_program: The token program.",
737
+ "- system_program: The system program required for account creation.",
1646
738
  "",
1647
- "### Parameters:",
1648
- "- _relay_hash: The hash identifying the deposit to be filled. Used to identify the deposit to be filled.",
1649
- "- slow_fill_leaf: Contains all data necessary to uniquely verify the slow fill. This struct contains:",
1650
- "- relayData: Struct containing all the data needed to identify the original deposit to be slow filled. Same",
1651
- "as the relay_data struct in fill_relay().",
1652
- "- chainId: Chain identifier where slow fill leaf should be executed. If this doesn't match this chain's",
1653
- "chainId, then this function will revert.",
1654
- "- updatedOutputAmount: Amount to be sent to recipient out of this contract's balance. Can be set differently",
1655
- "from relayData.outputAmount to charge a different fee because this deposit was \"slow\" filled. Usually,",
1656
- "this will be set higher to reimburse the recipient for waiting for the slow fill.",
1657
- "- _root_bundle_id: Unique ID of root bundle containing slow relay root that this leaf is contained in.",
1658
- "- proof: Inclusion proof for this leaf in slow relay root in root bundle.",
1659
- "Note: slow_fill_leaf, _root_bundle_id, and proof are optional parameters, but their presence must be consistent.",
1660
- "If None for these parameters is passed, the caller must load them via the instruction_params account.",
1661
- "Note: When verifying the slow fill leaf, the relay data is hashed using AnchorSerialize::serialize that encodes",
1662
- "output token amounts to little-endian format while input token amount preserves its big-endian encoding as it",
1663
- "is passed as [u8; 32] array."
739
+ "execute_relayer_refund_leaf executes in mode where refunds are sent to ATA directly."
1664
740
  ],
1665
741
  "discriminator": [
1666
- 26,
1667
- 207,
1668
- 3,
1669
- 168,
1670
- 193,
1671
- 252,
1672
- 59,
1673
- 127
742
+ 27,
743
+ 136,
744
+ 159,
745
+ 240,
746
+ 127,
747
+ 68,
748
+ 123,
749
+ 164
1674
750
  ],
1675
751
  "accounts": [
1676
752
  {
1677
753
  "name": "signer",
754
+ "writable": true,
1678
755
  "signer": true
1679
756
  },
1680
757
  {
1681
758
  "name": "instruction_params",
1682
759
  "writable": true,
1683
- "optional": true,
1684
760
  "pda": {
1685
761
  "seeds": [
1686
762
  {
@@ -1737,6 +813,7 @@
1737
813
  },
1738
814
  {
1739
815
  "name": "root_bundle",
816
+ "writable": true,
1740
817
  "pda": {
1741
818
  "seeds": [
1742
819
  {
@@ -1760,93 +837,12 @@
1760
837
  "path": "state.seed",
1761
838
  "account": "State"
1762
839
  },
1763
- {
1764
- "kind": "arg",
1765
- "path": "_root_bundle_id.unwrap_or_else(| |\ninstruction_params"
1766
- }
1767
- ]
1768
- }
1769
- },
1770
- {
1771
- "name": "fill_status",
1772
- "writable": true,
1773
- "pda": {
1774
- "seeds": [
1775
- {
1776
- "kind": "const",
1777
- "value": [
1778
- 102,
1779
- 105,
1780
- 108,
1781
- 108,
1782
- 115
1783
- ]
1784
- },
1785
- {
1786
- "kind": "arg",
1787
- "path": "_relay_hash"
1788
- }
1789
- ]
1790
- }
1791
- },
1792
- {
1793
- "name": "mint"
1794
- },
1795
- {
1796
- "name": "recipient_token_account",
1797
- "writable": true,
1798
- "pda": {
1799
- "seeds": [
1800
- {
1801
- "kind": "arg",
1802
- "path": "slow_fill_leaf"
1803
- },
1804
- {
1805
- "kind": "account",
1806
- "path": "token_program"
1807
- },
1808
840
  {
1809
841
  "kind": "account",
1810
- "path": "mint"
842
+ "path": "instruction_params.root_bundle_id",
843
+ "account": "ExecuteRelayerRefundLeafParams"
1811
844
  }
1812
- ],
1813
- "program": {
1814
- "kind": "const",
1815
- "value": [
1816
- 140,
1817
- 151,
1818
- 37,
1819
- 143,
1820
- 78,
1821
- 36,
1822
- 137,
1823
- 241,
1824
- 187,
1825
- 61,
1826
- 16,
1827
- 41,
1828
- 20,
1829
- 142,
1830
- 13,
1831
- 131,
1832
- 11,
1833
- 90,
1834
- 19,
1835
- 153,
1836
- 218,
1837
- 255,
1838
- 16,
1839
- 132,
1840
- 4,
1841
- 142,
1842
- 123,
1843
- 216,
1844
- 219,
1845
- 233,
1846
- 248,
1847
- 89
1848
- ]
1849
- }
845
+ ]
1850
846
  }
1851
847
  },
1852
848
  {
@@ -1906,6 +902,9 @@
1906
902
  }
1907
903
  }
1908
904
  },
905
+ {
906
+ "name": "mint"
907
+ },
1909
908
  {
1910
909
  "name": "token_program"
1911
910
  },
@@ -1946,112 +945,22 @@
1946
945
  "name": "program"
1947
946
  }
1948
947
  ],
1949
- "args": [
1950
- {
1951
- "name": "_relay_hash",
1952
- "type": {
1953
- "array": [
1954
- "u8",
1955
- 32
1956
- ]
1957
- }
1958
- },
1959
- {
1960
- "name": "slow_fill_leaf",
1961
- "type": {
1962
- "option": {
1963
- "defined": {
1964
- "name": "SlowFill"
1965
- }
1966
- }
1967
- }
1968
- },
1969
- {
1970
- "name": "_root_bundle_id",
1971
- "type": {
1972
- "option": "u32"
1973
- }
1974
- },
1975
- {
1976
- "name": "proof",
1977
- "type": {
1978
- "option": {
1979
- "vec": {
1980
- "array": [
1981
- "u8",
1982
- 32
1983
- ]
1984
- }
1985
- }
1986
- }
1987
- }
1988
- ]
948
+ "args": []
1989
949
  },
1990
950
  {
1991
- "name": "fill_relay",
951
+ "name": "execute_relayer_refund_leaf_deferred",
1992
952
  "docs": [
1993
- "Fulfill request to bridge cross chain by sending specified output tokens to recipient.",
1994
- "",
1995
- "Relayer & system fee is captured in the spread between input and output amounts. This fee accounts for tx costs,",
1996
- "relayer's capital opportunity cost, and a system fee. The relay_data hash uniquely identifies the deposit to",
1997
- "fill, ensuring relayers are refunded only for deposits matching the original hash from the origin SpokePool.",
1998
- "This hash includes all parameters from deposit() and must match the destination_chain_id. Note the relayer",
1999
- "creates an ATA in calling this method to store the fill_status. This should be closed once the deposit has",
2000
- "expired to let the relayer re-claim their rent. Cannot fill more than once. Partial fills are not supported.",
2001
- "",
2002
- "### Required Accounts:",
2003
- "- signer (Signer): The account that authorizes the fill (filler). No permission requirements.",
2004
- "- instruction_params (Account): Optional account to load instruction parameters when they are not passed in the",
2005
- "instruction data due to message size constraints. Pass this program ID to represent None. When Some, this must",
2006
- "be derived from the signer's public key with seed [\"instruction_params\",signer].",
2007
- "- state (Writable): Spoke state PDA. Seed: [\"state\",state.seed] where seed is 0 on mainnet.",
2008
- "- mint (Account): The mint of the output token, sent from the relayer to the recipient.",
2009
- "- relayer_token_account (Writable): The relayer's ATA for the input token.",
2010
- "- recipient_token_account (Writable): The recipient's ATA for the output token.",
2011
- "- fill_status (Writable): The fill status PDA, created on this function call to track the fill status to prevent",
2012
- "re-entrancy & double fills. Also used to track requested slow fills. Seed: [\"fills\",relay_hash].",
2013
- "- token_program (Interface): The token program.",
2014
- "- associated_token_program (Interface): The associated token program.",
2015
- "- system_program (Interface): The system program.",
2016
- "- delegate (Account): The account used to delegate the output amount of the output token.",
2017
- "",
2018
- "### Parameters:",
2019
- "- relay_hash: The hash identifying the deposit to be filled. Caller must pass this in. Computed as hash of",
2020
- "the flattened relay_data & destination_chain_id.",
2021
- "- relay_data: Struct containing all the data needed to identify the deposit to be filled. Should match",
2022
- "all the same-named parameters emitted in the origin chain FundsDeposited event.",
2023
- "- depositor: The account credited with the deposit.",
2024
- "- recipient: The account receiving funds on this chain.",
2025
- "- input_token: The token pulled from the caller's account to initiate the deposit. The equivalent of this",
2026
- "token on the repayment chain will be sent as a refund to the caller.",
2027
- "- output_token: The token that the caller will send to the recipient on this chain.",
2028
- "- input_amount: This amount, less a system fee, will be sent to the caller on their repayment chain.",
2029
- "This is big-endian encoded as a 32-byte array to match its underlying byte representation on EVM side",
2030
- "- output_amount: The amount of output tokens that the caller will send to the recipient.",
2031
- "- origin_chain_id: The origin chain identifier.",
2032
- "- exclusive_relayer: The relayer that will be exclusively allowed to fill this deposit before the",
2033
- "exclusivity deadline timestamp.",
2034
- "- fill_deadline: The deadline for the caller to fill the deposit. After this timestamp, the deposit will be",
2035
- "cancelled and the depositor will be refunded on the origin chain.",
2036
- "- exclusivity_deadline: The deadline for the exclusive relayer to fill the deposit. After this timestamp,",
2037
- "anyone can fill this deposit.",
2038
- "- message: The message to send to the recipient if the recipient is a contract that implements a",
2039
- "handle_across_message() public function.",
2040
- "- repayment_chain_id: Chain of SpokePool where relayer wants to be refunded after the challenge window has",
2041
- "passed. Will receive input_amount of the equivalent token to input_token on the repayment chain.",
2042
- "- repayment_address: The address of the recipient on the repayment chain that they want to be refunded to.",
2043
- "Note: relay_data, repayment_chain_id, and repayment_address are optional parameters, but their presence must be",
2044
- "consistent. If None for these is passed, the caller must load them via the instruction_params account."
953
+ "Similar to execute_relayer_refund_leaf, but executes in mode where refunds are allocated to claim_account PDAs."
2045
954
  ],
2046
955
  "discriminator": [
2047
- 100,
2048
- 84,
2049
- 222,
2050
- 90,
2051
- 106,
2052
- 209,
2053
- 58,
2054
- 222
956
+ 110,
957
+ 112,
958
+ 89,
959
+ 208,
960
+ 38,
961
+ 116,
962
+ 93,
963
+ 10
2055
964
  ],
2056
965
  "accounts": [
2057
966
  {
@@ -2062,7 +971,6 @@
2062
971
  {
2063
972
  "name": "instruction_params",
2064
973
  "writable": true,
2065
- "optional": true,
2066
974
  "pda": {
2067
975
  "seeds": [
2068
976
  {
@@ -2118,23 +1026,47 @@
2118
1026
  }
2119
1027
  },
2120
1028
  {
2121
- "name": "delegate"
2122
- },
2123
- {
2124
- "name": "mint"
2125
- },
2126
- {
2127
- "name": "relayer_token_account",
2128
- "writable": true
1029
+ "name": "root_bundle",
1030
+ "writable": true,
1031
+ "pda": {
1032
+ "seeds": [
1033
+ {
1034
+ "kind": "const",
1035
+ "value": [
1036
+ 114,
1037
+ 111,
1038
+ 111,
1039
+ 116,
1040
+ 95,
1041
+ 98,
1042
+ 117,
1043
+ 110,
1044
+ 100,
1045
+ 108,
1046
+ 101
1047
+ ]
1048
+ },
1049
+ {
1050
+ "kind": "account",
1051
+ "path": "state.seed",
1052
+ "account": "State"
1053
+ },
1054
+ {
1055
+ "kind": "account",
1056
+ "path": "instruction_params.root_bundle_id",
1057
+ "account": "ExecuteRelayerRefundLeafParams"
1058
+ }
1059
+ ]
1060
+ }
2129
1061
  },
2130
1062
  {
2131
- "name": "recipient_token_account",
1063
+ "name": "vault",
2132
1064
  "writable": true,
2133
1065
  "pda": {
2134
1066
  "seeds": [
2135
1067
  {
2136
- "kind": "arg",
2137
- "path": "relay_data"
1068
+ "kind": "account",
1069
+ "path": "state"
2138
1070
  },
2139
1071
  {
2140
1072
  "kind": "account",
@@ -2185,34 +1117,11 @@
2185
1117
  }
2186
1118
  },
2187
1119
  {
2188
- "name": "fill_status",
2189
- "writable": true,
2190
- "pda": {
2191
- "seeds": [
2192
- {
2193
- "kind": "const",
2194
- "value": [
2195
- 102,
2196
- 105,
2197
- 108,
2198
- 108,
2199
- 115
2200
- ]
2201
- },
2202
- {
2203
- "kind": "arg",
2204
- "path": "relay_hash"
2205
- }
2206
- ]
2207
- }
1120
+ "name": "mint"
2208
1121
  },
2209
1122
  {
2210
1123
  "name": "token_program"
2211
1124
  },
2212
- {
2213
- "name": "associated_token_program",
2214
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
2215
- },
2216
1125
  {
2217
1126
  "name": "system_program",
2218
1127
  "address": "11111111111111111111111111111111"
@@ -2250,82 +1159,7 @@
2250
1159
  "name": "program"
2251
1160
  }
2252
1161
  ],
2253
- "args": [
2254
- {
2255
- "name": "relay_hash",
2256
- "type": {
2257
- "array": [
2258
- "u8",
2259
- 32
2260
- ]
2261
- }
2262
- },
2263
- {
2264
- "name": "relay_data",
2265
- "type": {
2266
- "option": {
2267
- "defined": {
2268
- "name": "RelayData"
2269
- }
2270
- }
2271
- }
2272
- },
2273
- {
2274
- "name": "repayment_chain_id",
2275
- "type": {
2276
- "option": "u64"
2277
- }
2278
- },
2279
- {
2280
- "name": "repayment_address",
2281
- "type": {
2282
- "option": "pubkey"
2283
- }
2284
- }
2285
- ]
2286
- },
2287
- {
2288
- "name": "get_unsafe_deposit_id",
2289
- "docs": [
2290
- "Computes the deposit ID for the depositor using the provided deposit_nonce. This acts like a \"view\" function for",
2291
- "off-chain actors to compute what the expected deposit ID is for a given depositor and deposit nonce will be.",
2292
- "",
2293
- "### Parameters:",
2294
- "- signer: The public key of the depositor sender.",
2295
- "- depositor: The public key of the depositor.",
2296
- "- deposit_nonce: The nonce used to derive the deposit ID."
2297
- ],
2298
- "discriminator": [
2299
- 118,
2300
- 10,
2301
- 135,
2302
- 0,
2303
- 168,
2304
- 243,
2305
- 223,
2306
- 117
2307
- ],
2308
- "accounts": [],
2309
- "args": [
2310
- {
2311
- "name": "signer",
2312
- "type": "pubkey"
2313
- },
2314
- {
2315
- "name": "depositor",
2316
- "type": "pubkey"
2317
- },
2318
- {
2319
- "name": "deposit_nonce",
2320
- "type": "u64"
2321
- }
2322
- ],
2323
- "returns": {
2324
- "array": [
2325
- "u8",
2326
- 32
2327
- ]
2328
- }
1162
+ "args": []
2329
1163
  },
2330
1164
  {
2331
1165
  "name": "handle_receive_finalized_message",
@@ -2987,7 +1821,7 @@
2987
1821
  "docs": [
2988
1822
  "Stores a new root bundle for later execution. Only callable by the owner.",
2989
1823
  "",
2990
- "Once stored, these roots are used to execute relayer refunds, slow fills, and pool rebalancing actions.",
1824
+ "The refund root authorizes relayer refunds. The slow root is stored only for compatibility and cannot execute.",
2991
1825
  "This method initializes a root_bundle PDA to store the root bundle data. The caller",
2992
1826
  "of this method is responsible for paying the rent for this PDA.",
2993
1827
  "",
@@ -3001,7 +1835,7 @@
3001
1835
  "",
3002
1836
  "### Parameters:",
3003
1837
  "- relayer_refund_root: Merkle root of the relayer refund tree.",
3004
- "- slow_relay_root: Merkle root of the slow relay tree."
1838
+ "- slow_relay_root: Inert legacy root retained for cross-chain admin ABI compatibility."
3005
1839
  ],
3006
1840
  "discriminator": [
3007
1841
  69,
@@ -3019,210 +1853,13 @@
3019
1853
  "signer": true
3020
1854
  },
3021
1855
  {
3022
- "name": "payer",
3023
- "writable": true,
3024
- "signer": true
3025
- },
3026
- {
3027
- "name": "state",
3028
- "writable": true,
3029
- "pda": {
3030
- "seeds": [
3031
- {
3032
- "kind": "const",
3033
- "value": [
3034
- 115,
3035
- 116,
3036
- 97,
3037
- 116,
3038
- 101
3039
- ]
3040
- },
3041
- {
3042
- "kind": "account",
3043
- "path": "state.seed",
3044
- "account": "State"
3045
- }
3046
- ]
3047
- }
3048
- },
3049
- {
3050
- "name": "root_bundle",
3051
- "writable": true,
3052
- "pda": {
3053
- "seeds": [
3054
- {
3055
- "kind": "const",
3056
- "value": [
3057
- 114,
3058
- 111,
3059
- 111,
3060
- 116,
3061
- 95,
3062
- 98,
3063
- 117,
3064
- 110,
3065
- 100,
3066
- 108,
3067
- 101
3068
- ]
3069
- },
3070
- {
3071
- "kind": "account",
3072
- "path": "state.seed",
3073
- "account": "State"
3074
- },
3075
- {
3076
- "kind": "account",
3077
- "path": "state.root_bundle_id",
3078
- "account": "State"
3079
- }
3080
- ]
3081
- }
3082
- },
3083
- {
3084
- "name": "system_program",
3085
- "address": "11111111111111111111111111111111"
3086
- },
3087
- {
3088
- "name": "event_authority",
3089
- "pda": {
3090
- "seeds": [
3091
- {
3092
- "kind": "const",
3093
- "value": [
3094
- 95,
3095
- 95,
3096
- 101,
3097
- 118,
3098
- 101,
3099
- 110,
3100
- 116,
3101
- 95,
3102
- 97,
3103
- 117,
3104
- 116,
3105
- 104,
3106
- 111,
3107
- 114,
3108
- 105,
3109
- 116,
3110
- 121
3111
- ]
3112
- }
3113
- ]
3114
- }
3115
- },
3116
- {
3117
- "name": "program"
3118
- }
3119
- ],
3120
- "args": [
3121
- {
3122
- "name": "relayer_refund_root",
3123
- "type": {
3124
- "array": [
3125
- "u8",
3126
- 32
3127
- ]
3128
- }
3129
- },
3130
- {
3131
- "name": "slow_relay_root",
3132
- "type": {
3133
- "array": [
3134
- "u8",
3135
- 32
3136
- ]
3137
- }
3138
- }
3139
- ]
3140
- },
3141
- {
3142
- "name": "request_slow_fill",
3143
- "docs": [
3144
- "Requests Across to send LP funds to this program to fulfill a slow fill.",
3145
- "",
3146
- "Slow fills are not possible unless the input and output tokens are \"equivalent\", i.e., they route to the same L1",
3147
- "token via PoolRebalanceRoutes. Slow fills are created by inserting slow fill objects into a Merkle tree that is",
3148
- "included in the next HubPool \"root bundle\". Once the optimistic challenge window has passed, the HubPool will",
3149
- "relay the slow root to this chain via relayRootBundle(). Once the slow root is relayed, the slow fill can be",
3150
- "executed by anyone who calls executeSlowRelayLeaf(). Cant request a slow fill if the fill deadline has",
3151
- "passed. Cant request a slow fill if the relay has already been filled or a slow fill has already been requested.",
3152
- "",
3153
- "### Required Accounts:",
3154
- "- signer (Signer): The account that authorizes the slow fill request.",
3155
- "- instruction_params (Account): Optional account to load instruction parameters when they are not passed in the",
3156
- "instruction data due to message size constraints. Pass this program ID to represent None. When Some, this must",
3157
- "be derived from the signer's public key with seed [\"instruction_params\",signer].",
3158
- "- state (Writable): Spoke state PDA. Seed: [\"state\",state.seed] where seed is 0 on mainnet.",
3159
- "- fill_status (Writable): The fill status PDA, created on this function call. Updated to track slow fill status.",
3160
- "Used to prevent double request and fill. Seed: [\"fills\",relay_hash].",
3161
- "- system_program (Interface): The system program.",
3162
- "",
3163
- "### Parameters:",
3164
- "- _relay_hash: The hash identifying the deposit to be filled. Caller must pass this in. Computed as hash of",
3165
- "the flattened relay_data & destination_chain_id.",
3166
- "- relay_data: Struct containing all the data needed to identify the deposit that should be slow filled. If any",
3167
- "of the params are missing or different from the origin chain deposit, then Across will not include a slow",
3168
- "fill for the intended deposit. See fill_relay & RelayData struct for more details.",
3169
- "Note: relay_data is optional parameter. If None for it is passed, the caller must load it via the",
3170
- "instruction_params account."
3171
- ],
3172
- "discriminator": [
3173
- 39,
3174
- 157,
3175
- 165,
3176
- 187,
3177
- 88,
3178
- 217,
3179
- 207,
3180
- 98
3181
- ],
3182
- "accounts": [
3183
- {
3184
- "name": "signer",
3185
- "writable": true,
3186
- "signer": true
3187
- },
3188
- {
3189
- "name": "instruction_params",
3190
- "writable": true,
3191
- "optional": true,
3192
- "pda": {
3193
- "seeds": [
3194
- {
3195
- "kind": "const",
3196
- "value": [
3197
- 105,
3198
- 110,
3199
- 115,
3200
- 116,
3201
- 114,
3202
- 117,
3203
- 99,
3204
- 116,
3205
- 105,
3206
- 111,
3207
- 110,
3208
- 95,
3209
- 112,
3210
- 97,
3211
- 114,
3212
- 97,
3213
- 109,
3214
- 115
3215
- ]
3216
- },
3217
- {
3218
- "kind": "account",
3219
- "path": "signer"
3220
- }
3221
- ]
3222
- }
3223
- },
3224
- {
1856
+ "name": "payer",
1857
+ "writable": true,
1858
+ "signer": true
1859
+ },
1860
+ {
3225
1861
  "name": "state",
1862
+ "writable": true,
3226
1863
  "pda": {
3227
1864
  "seeds": [
3228
1865
  {
@@ -3244,23 +1881,35 @@
3244
1881
  }
3245
1882
  },
3246
1883
  {
3247
- "name": "fill_status",
1884
+ "name": "root_bundle",
3248
1885
  "writable": true,
3249
1886
  "pda": {
3250
1887
  "seeds": [
3251
1888
  {
3252
1889
  "kind": "const",
3253
1890
  "value": [
3254
- 102,
3255
- 105,
3256
- 108,
1891
+ 114,
1892
+ 111,
1893
+ 111,
1894
+ 116,
1895
+ 95,
1896
+ 98,
1897
+ 117,
1898
+ 110,
1899
+ 100,
3257
1900
  108,
3258
- 115
1901
+ 101
3259
1902
  ]
3260
1903
  },
3261
1904
  {
3262
- "kind": "arg",
3263
- "path": "_relay_hash"
1905
+ "kind": "account",
1906
+ "path": "state.seed",
1907
+ "account": "State"
1908
+ },
1909
+ {
1910
+ "kind": "account",
1911
+ "path": "state.root_bundle_id",
1912
+ "account": "State"
3264
1913
  }
3265
1914
  ]
3266
1915
  }
@@ -3304,7 +1953,7 @@
3304
1953
  ],
3305
1954
  "args": [
3306
1955
  {
3307
- "name": "_relay_hash",
1956
+ "name": "relayer_refund_root",
3308
1957
  "type": {
3309
1958
  "array": [
3310
1959
  "u8",
@@ -3313,13 +1962,12 @@
3313
1962
  }
3314
1963
  },
3315
1964
  {
3316
- "name": "relay_data",
1965
+ "name": "slow_relay_root",
3317
1966
  "type": {
3318
- "option": {
3319
- "defined": {
3320
- "name": "RelayData"
3321
- }
3322
- }
1967
+ "array": [
1968
+ "u8",
1969
+ 32
1970
+ ]
3323
1971
  }
3324
1972
  }
3325
1973
  ]
@@ -3505,235 +2153,15 @@
3505
2153
  97,
3506
2154
  116,
3507
2155
  101
3508
- ]
3509
- },
3510
- {
3511
- "kind": "account",
3512
- "path": "state.seed",
3513
- "account": "State"
3514
- }
3515
- ]
3516
- }
3517
- },
3518
- {
3519
- "name": "event_authority",
3520
- "pda": {
3521
- "seeds": [
3522
- {
3523
- "kind": "const",
3524
- "value": [
3525
- 95,
3526
- 95,
3527
- 101,
3528
- 118,
3529
- 101,
3530
- 110,
3531
- 116,
3532
- 95,
3533
- 97,
3534
- 117,
3535
- 116,
3536
- 104,
3537
- 111,
3538
- 114,
3539
- 105,
3540
- 116,
3541
- 121
3542
- ]
3543
- }
3544
- ]
3545
- }
3546
- },
3547
- {
3548
- "name": "program"
3549
- }
3550
- ],
3551
- "args": [
3552
- {
3553
- "name": "new_owner",
3554
- "type": "pubkey"
3555
- }
3556
- ]
3557
- },
3558
- {
3559
- "name": "unsafe_deposit",
3560
- "docs": [
3561
- "Equivalent to deposit, except that it doesn't use the global `number_of_deposits` counter as the deposit",
3562
- "nonce. Instead, it allows the caller to pass a `deposit_nonce`. This function is designed for anyone who",
3563
- "wants to pre-compute their resultant deposit ID, which can be useful for filling a deposit faster and",
3564
- "avoiding the risk of a deposit ID unexpectedly changing due to another deposit front-running this one and",
3565
- "incrementing the global deposit ID counter. This enables the caller to influence the deposit ID, making it",
3566
- "deterministic for the depositor. The computed `depositID` is the keccak256 hash of [signer, depositor, deposit_nonce]."
3567
- ],
3568
- "discriminator": [
3569
- 196,
3570
- 187,
3571
- 166,
3572
- 179,
3573
- 3,
3574
- 146,
3575
- 150,
3576
- 246
3577
- ],
3578
- "accounts": [
3579
- {
3580
- "name": "signer",
3581
- "writable": true,
3582
- "signer": true
3583
- },
3584
- {
3585
- "name": "state",
3586
- "writable": true,
3587
- "pda": {
3588
- "seeds": [
3589
- {
3590
- "kind": "const",
3591
- "value": [
3592
- 115,
3593
- 116,
3594
- 97,
3595
- 116,
3596
- 101
3597
- ]
3598
- },
3599
- {
3600
- "kind": "account",
3601
- "path": "state.seed",
3602
- "account": "State"
3603
- }
3604
- ]
3605
- }
3606
- },
3607
- {
3608
- "name": "delegate"
3609
- },
3610
- {
3611
- "name": "depositor_token_account",
3612
- "writable": true,
3613
- "pda": {
3614
- "seeds": [
3615
- {
3616
- "kind": "arg",
3617
- "path": "depositor"
3618
- },
3619
- {
3620
- "kind": "account",
3621
- "path": "token_program"
3622
- },
3623
- {
3624
- "kind": "account",
3625
- "path": "mint"
3626
- }
3627
- ],
3628
- "program": {
3629
- "kind": "const",
3630
- "value": [
3631
- 140,
3632
- 151,
3633
- 37,
3634
- 143,
3635
- 78,
3636
- 36,
3637
- 137,
3638
- 241,
3639
- 187,
3640
- 61,
3641
- 16,
3642
- 41,
3643
- 20,
3644
- 142,
3645
- 13,
3646
- 131,
3647
- 11,
3648
- 90,
3649
- 19,
3650
- 153,
3651
- 218,
3652
- 255,
3653
- 16,
3654
- 132,
3655
- 4,
3656
- 142,
3657
- 123,
3658
- 216,
3659
- 219,
3660
- 233,
3661
- 248,
3662
- 89
3663
- ]
3664
- }
3665
- }
3666
- },
3667
- {
3668
- "name": "vault",
3669
- "writable": true,
3670
- "pda": {
3671
- "seeds": [
3672
- {
3673
- "kind": "account",
3674
- "path": "state"
3675
- },
3676
- {
3677
- "kind": "account",
3678
- "path": "token_program"
3679
- },
3680
- {
3681
- "kind": "account",
3682
- "path": "mint"
3683
- }
3684
- ],
3685
- "program": {
3686
- "kind": "const",
3687
- "value": [
3688
- 140,
3689
- 151,
3690
- 37,
3691
- 143,
3692
- 78,
3693
- 36,
3694
- 137,
3695
- 241,
3696
- 187,
3697
- 61,
3698
- 16,
3699
- 41,
3700
- 20,
3701
- 142,
3702
- 13,
3703
- 131,
3704
- 11,
3705
- 90,
3706
- 19,
3707
- 153,
3708
- 218,
3709
- 255,
3710
- 16,
3711
- 132,
3712
- 4,
3713
- 142,
3714
- 123,
3715
- 216,
3716
- 219,
3717
- 233,
3718
- 248,
3719
- 89
3720
- ]
3721
- }
3722
- }
3723
- },
3724
- {
3725
- "name": "mint"
3726
- },
3727
- {
3728
- "name": "token_program"
3729
- },
3730
- {
3731
- "name": "associated_token_program",
3732
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
3733
- },
3734
- {
3735
- "name": "system_program",
3736
- "address": "11111111111111111111111111111111"
2156
+ ]
2157
+ },
2158
+ {
2159
+ "kind": "account",
2160
+ "path": "state.seed",
2161
+ "account": "State"
2162
+ }
2163
+ ]
2164
+ }
3737
2165
  },
3738
2166
  {
3739
2167
  "name": "event_authority",
@@ -3770,61 +2198,75 @@
3770
2198
  ],
3771
2199
  "args": [
3772
2200
  {
3773
- "name": "depositor",
3774
- "type": "pubkey"
3775
- },
3776
- {
3777
- "name": "recipient",
3778
- "type": "pubkey"
3779
- },
3780
- {
3781
- "name": "input_token",
3782
- "type": "pubkey"
3783
- },
3784
- {
3785
- "name": "output_token",
2201
+ "name": "new_owner",
3786
2202
  "type": "pubkey"
3787
- },
2203
+ }
2204
+ ]
2205
+ },
2206
+ {
2207
+ "name": "withdraw_v5_fill_payer",
2208
+ "docs": [
2209
+ "Withdraws lamports from the signing submitter's V5 fill-status payer float back to that same submitter. Partial",
2210
+ "withdrawals remain subject to the runtime's rent-state rules; `u64::MAX` withdraws the live balance."
2211
+ ],
2212
+ "discriminator": [
2213
+ 160,
2214
+ 125,
2215
+ 152,
2216
+ 107,
2217
+ 21,
2218
+ 37,
2219
+ 181,
2220
+ 144
2221
+ ],
2222
+ "accounts": [
3788
2223
  {
3789
- "name": "input_amount",
3790
- "type": "u64"
2224
+ "name": "submitter",
2225
+ "docs": [
2226
+ "The float owner and the only withdrawal destination."
2227
+ ],
2228
+ "writable": true,
2229
+ "signer": true
3791
2230
  },
3792
2231
  {
3793
- "name": "output_amount",
3794
- "type": {
3795
- "array": [
3796
- "u8",
3797
- 32
2232
+ "name": "payer",
2233
+ "writable": true,
2234
+ "pda": {
2235
+ "seeds": [
2236
+ {
2237
+ "kind": "const",
2238
+ "value": [
2239
+ 118,
2240
+ 53,
2241
+ 95,
2242
+ 102,
2243
+ 105,
2244
+ 108,
2245
+ 108,
2246
+ 95,
2247
+ 112,
2248
+ 97,
2249
+ 121,
2250
+ 101,
2251
+ 114
2252
+ ]
2253
+ },
2254
+ {
2255
+ "kind": "account",
2256
+ "path": "submitter"
2257
+ }
3798
2258
  ]
3799
2259
  }
3800
2260
  },
3801
2261
  {
3802
- "name": "destination_chain_id",
3803
- "type": "u64"
3804
- },
3805
- {
3806
- "name": "exclusive_relayer",
3807
- "type": "pubkey"
3808
- },
2262
+ "name": "system_program",
2263
+ "address": "11111111111111111111111111111111"
2264
+ }
2265
+ ],
2266
+ "args": [
3809
2267
  {
3810
- "name": "deposit_nonce",
2268
+ "name": "amount",
3811
2269
  "type": "u64"
3812
- },
3813
- {
3814
- "name": "quote_timestamp",
3815
- "type": "u32"
3816
- },
3817
- {
3818
- "name": "fill_deadline",
3819
- "type": "u32"
3820
- },
3821
- {
3822
- "name": "exclusivity_parameter",
3823
- "type": "u32"
3824
- },
3825
- {
3826
- "name": "message",
3827
- "type": "bytes"
3828
2270
  }
3829
2271
  ]
3830
2272
  },
@@ -3939,32 +2381,6 @@
3939
2381
  250
3940
2382
  ]
3941
2383
  },
3942
- {
3943
- "name": "ExecuteSlowRelayLeafParams",
3944
- "discriminator": [
3945
- 135,
3946
- 208,
3947
- 119,
3948
- 251,
3949
- 14,
3950
- 222,
3951
- 66,
3952
- 155
3953
- ]
3954
- },
3955
- {
3956
- "name": "FillRelayParams",
3957
- "discriminator": [
3958
- 50,
3959
- 243,
3960
- 51,
3961
- 185,
3962
- 89,
3963
- 60,
3964
- 43,
3965
- 202
3966
- ]
3967
- },
3968
2384
  {
3969
2385
  "name": "FillStatusAccount",
3970
2386
  "discriminator": [
@@ -3978,19 +2394,6 @@
3978
2394
  137
3979
2395
  ]
3980
2396
  },
3981
- {
3982
- "name": "RequestSlowFillParams",
3983
- "discriminator": [
3984
- 5,
3985
- 54,
3986
- 214,
3987
- 89,
3988
- 197,
3989
- 37,
3990
- 118,
3991
- 28
3992
- ]
3993
- },
3994
2397
  {
3995
2398
  "name": "RootBundle",
3996
2399
  "discriminator": [
@@ -4161,212 +2564,485 @@
4161
2564
  21,
4162
2565
  117
4163
2566
  ]
2567
+ },
2568
+ {
2569
+ "name": "V5FillFloatWithdrawn",
2570
+ "discriminator": [
2571
+ 169,
2572
+ 141,
2573
+ 173,
2574
+ 134,
2575
+ 108,
2576
+ 32,
2577
+ 187,
2578
+ 186
2579
+ ]
4164
2580
  }
4165
2581
  ],
4166
2582
  "errors": [
4167
2583
  {
4168
2584
  "code": 6000,
4169
- "name": "NotOwner",
4170
- "msg": "Only the owner can call this function!"
2585
+ "name": "InvalidQuoteTimestamp",
2586
+ "msg": "Invalid quote timestamp!"
4171
2587
  },
4172
2588
  {
4173
2589
  "code": 6001,
4174
- "name": "InvalidRelayHash",
4175
- "msg": "Invalid relay hash!"
2590
+ "name": "InvalidFillDeadline",
2591
+ "msg": "Invalid fill deadline!"
4176
2592
  },
4177
2593
  {
4178
2594
  "code": 6002,
2595
+ "name": "NotExclusiveRelayer",
2596
+ "msg": "Caller is not the exclusive relayer and exclusivity deadline has not passed!"
2597
+ },
2598
+ {
2599
+ "code": 6003,
2600
+ "name": "RetiredNoSlowFillsInExclusivityWindow",
2601
+ "msg": "The Deposit is still within the exclusivity window!"
2602
+ },
2603
+ {
2604
+ "code": 6004,
2605
+ "name": "RelayFilled",
2606
+ "msg": "The relay has already been filled!"
2607
+ },
2608
+ {
2609
+ "code": 6005,
2610
+ "name": "RetiredInvalidSlowFillRequest",
2611
+ "msg": "Slow fill requires status of Unfilled!"
2612
+ },
2613
+ {
2614
+ "code": 6006,
2615
+ "name": "ExpiredFillDeadline",
2616
+ "msg": "The fill deadline has passed!"
2617
+ },
2618
+ {
2619
+ "code": 6007,
2620
+ "name": "InvalidMerkleProof",
2621
+ "msg": "Invalid Merkle proof!"
2622
+ },
2623
+ {
2624
+ "code": 6008,
2625
+ "name": "InvalidChainId",
2626
+ "msg": "Invalid chain id!"
2627
+ },
2628
+ {
2629
+ "code": 6009,
2630
+ "name": "InvalidMerkleLeaf",
2631
+ "msg": "Invalid Merkle leaf!"
2632
+ },
2633
+ {
2634
+ "code": 6010,
2635
+ "name": "ClaimedMerkleLeaf",
2636
+ "msg": "Leaf already claimed!"
2637
+ },
2638
+ {
2639
+ "code": 6011,
2640
+ "name": "DepositsArePaused",
2641
+ "msg": "Deposits are currently paused!"
2642
+ },
2643
+ {
2644
+ "code": 6012,
2645
+ "name": "FillsArePaused",
2646
+ "msg": "Fills are currently paused!"
2647
+ },
2648
+ {
2649
+ "code": 6013,
2650
+ "name": "InsufficientSpokePoolBalanceToExecuteLeaf",
2651
+ "msg": "Insufficient spoke pool balance to execute leaf"
2652
+ },
2653
+ {
2654
+ "code": 6014,
2655
+ "name": "InvalidExclusiveRelayer",
2656
+ "msg": "Invalid exclusive relayer!"
2657
+ },
2658
+ {
2659
+ "code": 6015,
2660
+ "name": "InvalidOutputToken",
2661
+ "msg": "Invalid output token!"
2662
+ },
2663
+ {
2664
+ "code": 7000,
2665
+ "name": "NotOwner",
2666
+ "msg": "Only the owner can call this function!"
2667
+ },
2668
+ {
2669
+ "code": 7001,
4179
2670
  "name": "CanOnlyCloseFillStatusPdaIfFillDeadlinePassed",
4180
2671
  "msg": "The fill deadline has not passed!"
4181
2672
  },
4182
2673
  {
4183
- "code": 6003,
2674
+ "code": 7002,
4184
2675
  "name": "NotRelayer",
4185
2676
  "msg": "The caller is not the relayer!"
4186
2677
  },
4187
2678
  {
4188
- "code": 6004,
2679
+ "code": 7003,
4189
2680
  "name": "CannotSetCurrentTime",
4190
2681
  "msg": "Cannot set time if not in test mode!"
4191
2682
  },
4192
2683
  {
4193
- "code": 6005,
2684
+ "code": 7004,
4194
2685
  "name": "InvalidRemoteDomain",
4195
2686
  "msg": "Invalid remote domain!"
4196
2687
  },
4197
2688
  {
4198
- "code": 6006,
2689
+ "code": 7005,
4199
2690
  "name": "InvalidRemoteSender",
4200
2691
  "msg": "Invalid remote sender!"
4201
2692
  },
4202
2693
  {
4203
- "code": 6007,
2694
+ "code": 7006,
4204
2695
  "name": "InvalidMint",
4205
2696
  "msg": "Invalid mint!"
4206
2697
  },
4207
2698
  {
4208
- "code": 6008,
2699
+ "code": 7007,
4209
2700
  "name": "NonZeroAmountToReturn",
4210
2701
  "msg": "Relayer refund leaf must not return tokens to HubPool!"
4211
2702
  },
4212
2703
  {
4213
- "code": 6009,
2704
+ "code": 7008,
4214
2705
  "name": "ParamsWriteOverflow",
4215
2706
  "msg": "Overflow writing to parameters account!"
4216
2707
  },
4217
2708
  {
4218
- "code": 6010,
2709
+ "code": 7009,
4219
2710
  "name": "InvalidRefund",
4220
2711
  "msg": "Invalid refund address!"
4221
2712
  },
4222
2713
  {
4223
- "code": 6011,
2714
+ "code": 7010,
4224
2715
  "name": "ZeroRefundClaim",
4225
2716
  "msg": "Zero relayer refund claim!"
4226
2717
  },
4227
2718
  {
4228
- "code": 6012,
2719
+ "code": 7011,
4229
2720
  "name": "NonZeroRefundClaim",
4230
2721
  "msg": "Cannot close non-zero relayer refund claim!"
4231
2722
  },
4232
2723
  {
4233
- "code": 6013,
2724
+ "code": 7012,
4234
2725
  "name": "InvalidClaimInitializer",
4235
2726
  "msg": "Invalid claim initializer!"
4236
2727
  },
4237
2728
  {
4238
- "code": 6014,
2729
+ "code": 7013,
4239
2730
  "name": "InvalidRefundTokenAccount",
4240
2731
  "msg": "Invalid refund token account!"
4241
2732
  },
4242
2733
  {
4243
- "code": 6015,
2734
+ "code": 7014,
4244
2735
  "name": "InvalidProductionSeed",
4245
2736
  "msg": "Seed must be 0 in production!"
4246
2737
  },
4247
2738
  {
4248
- "code": 6016,
2739
+ "code": 7015,
4249
2740
  "name": "InvalidATACreationAccounts",
4250
2741
  "msg": "Invalid remaining accounts for ATA creation!"
4251
2742
  },
4252
2743
  {
4253
- "code": 6017,
2744
+ "code": 7016,
4254
2745
  "name": "InvalidDelegatePda",
4255
2746
  "msg": "Invalid delegate PDA!"
4256
2747
  },
4257
2748
  {
4258
- "code": 6018,
4259
- "name": "InconsistentOptionalParameters",
4260
- "msg": "Inconsistent optional parameters!"
2749
+ "code": 8000,
2750
+ "name": "InvalidWireFormat",
2751
+ "msg": "Malformed Across V5 wire data!"
2752
+ },
2753
+ {
2754
+ "code": 8001,
2755
+ "name": "InvalidParamModificationSignature",
2756
+ "msg": "Invalid Across V5 parameter modification signature!"
2757
+ },
2758
+ {
2759
+ "code": 8002,
2760
+ "name": "MissingAccount",
2761
+ "msg": "Missing required Across V5 account!"
2762
+ },
2763
+ {
2764
+ "code": 8003,
2765
+ "name": "InvalidDispatchAuthority",
2766
+ "msg": "Invalid Across V5 Gateway dispatch authority!"
2767
+ },
2768
+ {
2769
+ "code": 8004,
2770
+ "name": "InvalidAccountMutability",
2771
+ "msg": "Across V5 account must be writable!"
2772
+ },
2773
+ {
2774
+ "code": 8005,
2775
+ "name": "ResolvedInputAmountBelowCommitted",
2776
+ "msg": "Resolved Across V5 input amount is below the committed floor!"
2777
+ },
2778
+ {
2779
+ "code": 8006,
2780
+ "name": "ParamModificationNotAnImprovement",
2781
+ "msg": "Across V5 parameter modification is not an improvement!"
2782
+ },
2783
+ {
2784
+ "code": 8007,
2785
+ "name": "InvalidAmountBips",
2786
+ "msg": "Across V5 input amount bips exceed the denominator!"
2787
+ },
2788
+ {
2789
+ "code": 8008,
2790
+ "name": "UnsupportedMode",
2791
+ "msg": "Across V5 adapter mode is not enabled!"
2792
+ },
2793
+ {
2794
+ "code": 8009,
2795
+ "name": "InvalidTokenAccount",
2796
+ "msg": "Invalid Across V5 token account!"
2797
+ },
2798
+ {
2799
+ "code": 8010,
2800
+ "name": "UnsupportedTokenExtension",
2801
+ "msg": "Unsupported Across V5 token extension!"
2802
+ },
2803
+ {
2804
+ "code": 8011,
2805
+ "name": "InvalidFillPayer",
2806
+ "msg": "Invalid Across V5 fill payer!"
2807
+ },
2808
+ {
2809
+ "code": 8012,
2810
+ "name": "InvalidFillStatusAccount",
2811
+ "msg": "Invalid Across V5 fill status account!"
2812
+ },
2813
+ {
2814
+ "code": 8013,
2815
+ "name": "FillCommitmentMismatch",
2816
+ "msg": "Across V5 fill data does not match the committed input!"
2817
+ },
2818
+ {
2819
+ "code": 8014,
2820
+ "name": "FillOutputAmountTooLow",
2821
+ "msg": "Across V5 fill output amount is below the committed floor!"
2822
+ },
2823
+ {
2824
+ "code": 9000,
2825
+ "name": "InvalidSelector",
2826
+ "msg": "Invalid solidity selector"
2827
+ },
2828
+ {
2829
+ "code": 9001,
2830
+ "name": "InvalidArgument",
2831
+ "msg": "Invalid solidity argument"
2832
+ },
2833
+ {
2834
+ "code": 9002,
2835
+ "name": "InvalidBool",
2836
+ "msg": "Invalid solidity bool argument"
2837
+ },
2838
+ {
2839
+ "code": 9003,
2840
+ "name": "InvalidAddress",
2841
+ "msg": "Invalid solidity address argument"
2842
+ },
2843
+ {
2844
+ "code": 9004,
2845
+ "name": "InvalidUint32",
2846
+ "msg": "Invalid solidity uint32 argument"
2847
+ },
2848
+ {
2849
+ "code": 9005,
2850
+ "name": "InvalidUint64",
2851
+ "msg": "Invalid solidity uint64 argument"
2852
+ },
2853
+ {
2854
+ "code": 9006,
2855
+ "name": "UnsupportedSelector",
2856
+ "msg": "Unsupported solidity selector"
4261
2857
  }
4262
2858
  ],
4263
2859
  "types": [
4264
2860
  {
4265
- "name": "ClaimAccount",
2861
+ "name": "AcrossDepositInput",
2862
+ "docs": [
2863
+ "Path-committed source-deposit input, shaped like the EVM `AcrossDepositInput` compatibility surface."
2864
+ ],
2865
+ "type": {
2866
+ "kind": "struct",
2867
+ "fields": [
2868
+ {
2869
+ "name": "deposit_params",
2870
+ "type": {
2871
+ "defined": {
2872
+ "name": "AcrossDepositParams"
2873
+ }
2874
+ }
2875
+ },
2876
+ {
2877
+ "name": "dst_step_id",
2878
+ "type": {
2879
+ "array": [
2880
+ "u8",
2881
+ 32
2882
+ ]
2883
+ }
2884
+ },
2885
+ {
2886
+ "name": "input_amount_mode",
2887
+ "type": {
2888
+ "defined": {
2889
+ "name": "V5InputAmountMode"
2890
+ }
2891
+ }
2892
+ },
2893
+ {
2894
+ "name": "modification_rules",
2895
+ "type": {
2896
+ "defined": {
2897
+ "name": "V5DepositModificationRules"
2898
+ }
2899
+ }
2900
+ }
2901
+ ]
2902
+ }
2903
+ },
2904
+ {
2905
+ "name": "AcrossDepositJitParams",
2906
+ "docs": [
2907
+ "JIT payload for Deposit mode. The signature is fixed `r[32] || s[32] || v[1]` rather than a length-prefixed vec."
2908
+ ],
4266
2909
  "type": {
4267
2910
  "kind": "struct",
4268
2911
  "fields": [
4269
2912
  {
4270
- "name": "amount",
4271
- "type": "u64"
2913
+ "name": "new_output_amount",
2914
+ "type": {
2915
+ "array": [
2916
+ "u8",
2917
+ 32
2918
+ ]
2919
+ }
4272
2920
  },
4273
2921
  {
4274
- "name": "initializer",
2922
+ "name": "new_exclusive_relayer",
4275
2923
  "type": "pubkey"
2924
+ },
2925
+ {
2926
+ "name": "signature",
2927
+ "type": {
2928
+ "array": [
2929
+ "u8",
2930
+ 65
2931
+ ]
2932
+ }
4276
2933
  }
4277
2934
  ]
4278
2935
  }
4279
2936
  },
4280
2937
  {
4281
- "name": "ClaimedRelayerRefund",
2938
+ "name": "AcrossDepositParams",
2939
+ "docs": [
2940
+ "Canonical Across deposit fields. `output_amount` remains an EVM uint256 word; SVM-native amounts and non-EVM",
2941
+ "chain IDs are width-bounded to u64."
2942
+ ],
4282
2943
  "type": {
4283
2944
  "kind": "struct",
4284
2945
  "fields": [
4285
2946
  {
4286
- "name": "l2_token_address",
2947
+ "name": "depositor",
4287
2948
  "type": "pubkey"
4288
2949
  },
4289
2950
  {
4290
- "name": "claim_amount",
2951
+ "name": "recipient",
2952
+ "type": "pubkey"
2953
+ },
2954
+ {
2955
+ "name": "input_token",
2956
+ "type": "pubkey"
2957
+ },
2958
+ {
2959
+ "name": "output_token",
2960
+ "type": "pubkey"
2961
+ },
2962
+ {
2963
+ "name": "input_amount",
4291
2964
  "type": "u64"
4292
2965
  },
4293
2966
  {
4294
- "name": "refund_address",
2967
+ "name": "output_amount",
2968
+ "type": {
2969
+ "array": [
2970
+ "u8",
2971
+ 32
2972
+ ]
2973
+ }
2974
+ },
2975
+ {
2976
+ "name": "destination_chain_id",
2977
+ "type": "u64"
2978
+ },
2979
+ {
2980
+ "name": "exclusive_relayer",
4295
2981
  "type": "pubkey"
2982
+ },
2983
+ {
2984
+ "name": "deposit_nonce",
2985
+ "type": "u64"
2986
+ },
2987
+ {
2988
+ "name": "quote_timestamp",
2989
+ "type": "u32"
2990
+ },
2991
+ {
2992
+ "name": "fill_deadline",
2993
+ "type": "u32"
2994
+ },
2995
+ {
2996
+ "name": "exclusivity_parameter",
2997
+ "type": "u32"
4296
2998
  }
4297
2999
  ]
4298
3000
  }
4299
3001
  },
4300
3002
  {
4301
- "name": "EmergencyDeletedRootBundle",
3003
+ "name": "ClaimAccount",
4302
3004
  "type": {
4303
3005
  "kind": "struct",
4304
3006
  "fields": [
4305
3007
  {
4306
- "name": "root_bundle_id",
4307
- "type": "u32"
3008
+ "name": "amount",
3009
+ "type": "u64"
3010
+ },
3011
+ {
3012
+ "name": "initializer",
3013
+ "type": "pubkey"
4308
3014
  }
4309
3015
  ]
4310
3016
  }
4311
3017
  },
4312
3018
  {
4313
- "name": "ExecuteRelayerRefundLeafParams",
3019
+ "name": "ClaimedRelayerRefund",
4314
3020
  "type": {
4315
3021
  "kind": "struct",
4316
3022
  "fields": [
4317
3023
  {
4318
- "name": "root_bundle_id",
4319
- "type": "u32"
3024
+ "name": "l2_token_address",
3025
+ "type": "pubkey"
4320
3026
  },
4321
3027
  {
4322
- "name": "relayer_refund_leaf",
4323
- "type": {
4324
- "defined": {
4325
- "name": "RelayerRefundLeaf"
4326
- }
4327
- }
3028
+ "name": "claim_amount",
3029
+ "type": "u64"
4328
3030
  },
4329
3031
  {
4330
- "name": "proof",
4331
- "type": {
4332
- "vec": {
4333
- "array": [
4334
- "u8",
4335
- 32
4336
- ]
4337
- }
4338
- }
3032
+ "name": "refund_address",
3033
+ "type": "pubkey"
4339
3034
  }
4340
3035
  ]
4341
3036
  }
4342
3037
  },
4343
3038
  {
4344
- "name": "ExecuteSlowRelayLeafParams",
3039
+ "name": "EmergencyDeletedRootBundle",
4345
3040
  "type": {
4346
3041
  "kind": "struct",
4347
3042
  "fields": [
4348
- {
4349
- "name": "slow_fill_leaf",
4350
- "type": {
4351
- "defined": {
4352
- "name": "SlowFill"
4353
- }
4354
- }
4355
- },
4356
3043
  {
4357
3044
  "name": "root_bundle_id",
4358
3045
  "type": "u32"
4359
- },
4360
- {
4361
- "name": "proof",
4362
- "type": {
4363
- "vec": {
4364
- "array": [
4365
- "u8",
4366
- 32
4367
- ]
4368
- }
4369
- }
4370
3046
  }
4371
3047
  ]
4372
3048
  }
@@ -4420,83 +3096,32 @@
4420
3096
  }
4421
3097
  },
4422
3098
  {
4423
- "name": "FillRelayParams",
3099
+ "name": "ExecuteRelayerRefundLeafParams",
4424
3100
  "type": {
4425
3101
  "kind": "struct",
4426
3102
  "fields": [
4427
3103
  {
4428
- "name": "relay_data",
3104
+ "name": "root_bundle_id",
3105
+ "type": "u32"
3106
+ },
3107
+ {
3108
+ "name": "relayer_refund_leaf",
4429
3109
  "type": {
4430
3110
  "defined": {
4431
- "name": "RelayData"
3111
+ "name": "RelayerRefundLeaf"
4432
3112
  }
4433
3113
  }
4434
3114
  },
4435
3115
  {
4436
- "name": "repayment_chain_id",
4437
- "type": "u64"
4438
- },
4439
- {
4440
- "name": "repayment_address",
4441
- "type": "pubkey"
4442
- }
4443
- ]
4444
- }
4445
- },
4446
- {
4447
- "name": "FillStatus",
4448
- "type": {
4449
- "kind": "enum",
4450
- "variants": [
4451
- {
4452
- "name": "Unfilled"
4453
- },
4454
- {
4455
- "name": "RequestedSlowFill"
4456
- },
4457
- {
4458
- "name": "Filled"
4459
- }
4460
- ]
4461
- }
4462
- },
4463
- {
4464
- "name": "FillStatusAccount",
4465
- "type": {
4466
- "kind": "struct",
4467
- "fields": [
4468
- {
4469
- "name": "status",
3116
+ "name": "proof",
4470
3117
  "type": {
4471
- "defined": {
4472
- "name": "FillStatus"
3118
+ "vec": {
3119
+ "array": [
3120
+ "u8",
3121
+ 32
3122
+ ]
4473
3123
  }
4474
3124
  }
4475
- },
4476
- {
4477
- "name": "relayer",
4478
- "type": "pubkey"
4479
- },
4480
- {
4481
- "name": "fill_deadline",
4482
- "type": "u32"
4483
- }
4484
- ]
4485
- }
4486
- },
4487
- {
4488
- "name": "FillType",
4489
- "type": {
4490
- "kind": "enum",
4491
- "variants": [
4492
- {
4493
- "name": "FastFill"
4494
- },
4495
- {
4496
- "name": "ReplacedSlowFill"
4497
- },
4498
- {
4499
- "name": "SlowFill"
4500
3125
  }
4501
3126
  ]
4502
3127
  }
@@ -4557,33 +3182,91 @@
4557
3182
  "type": "pubkey"
4558
3183
  },
4559
3184
  {
4560
- "name": "relayer",
3185
+ "name": "relayer",
3186
+ "type": "pubkey"
3187
+ },
3188
+ {
3189
+ "name": "depositor",
3190
+ "type": "pubkey"
3191
+ },
3192
+ {
3193
+ "name": "recipient",
3194
+ "type": "pubkey"
3195
+ },
3196
+ {
3197
+ "name": "message_hash",
3198
+ "type": {
3199
+ "array": [
3200
+ "u8",
3201
+ 32
3202
+ ]
3203
+ }
3204
+ },
3205
+ {
3206
+ "name": "relay_execution_info",
3207
+ "type": {
3208
+ "defined": {
3209
+ "name": "RelayExecutionEventInfo"
3210
+ }
3211
+ }
3212
+ }
3213
+ ]
3214
+ }
3215
+ },
3216
+ {
3217
+ "name": "FillStatus",
3218
+ "type": {
3219
+ "kind": "enum",
3220
+ "variants": [
3221
+ {
3222
+ "name": "Unfilled"
3223
+ },
3224
+ {
3225
+ "name": "RequestedSlowFill"
3226
+ },
3227
+ {
3228
+ "name": "Filled"
3229
+ }
3230
+ ]
3231
+ }
3232
+ },
3233
+ {
3234
+ "name": "FillStatusAccount",
3235
+ "type": {
3236
+ "kind": "struct",
3237
+ "fields": [
3238
+ {
3239
+ "name": "status",
3240
+ "type": {
3241
+ "defined": {
3242
+ "name": "FillStatus"
3243
+ }
3244
+ }
3245
+ },
3246
+ {
3247
+ "name": "rent_recipient",
4561
3248
  "type": "pubkey"
4562
3249
  },
4563
3250
  {
4564
- "name": "depositor",
4565
- "type": "pubkey"
4566
- },
3251
+ "name": "fill_deadline",
3252
+ "type": "u32"
3253
+ }
3254
+ ]
3255
+ }
3256
+ },
3257
+ {
3258
+ "name": "FillType",
3259
+ "type": {
3260
+ "kind": "enum",
3261
+ "variants": [
4567
3262
  {
4568
- "name": "recipient",
4569
- "type": "pubkey"
3263
+ "name": "FastFill"
4570
3264
  },
4571
3265
  {
4572
- "name": "message_hash",
4573
- "type": {
4574
- "array": [
4575
- "u8",
4576
- 32
4577
- ]
4578
- }
3266
+ "name": "ReplacedSlowFill"
4579
3267
  },
4580
3268
  {
4581
- "name": "relay_execution_info",
4582
- "type": {
4583
- "defined": {
4584
- "name": "RelayExecutionEventInfo"
4585
- }
4586
- }
3269
+ "name": "SlowFill"
4587
3270
  }
4588
3271
  ]
4589
3272
  }
@@ -4658,6 +3341,42 @@
4658
3341
  ]
4659
3342
  }
4660
3343
  },
3344
+ {
3345
+ "name": "GatewayContextV1",
3346
+ "docs": [
3347
+ "Version 1 of the Gateway-attested context prepended to every adapter call.",
3348
+ "",
3349
+ "Field order and widths are part of the Gateway dispatch ABI. A context-layout change requires a new Gateway",
3350
+ "dispatch ABI and adapter entrypoint rather than a new [`V5AdapterInput`] variant."
3351
+ ],
3352
+ "type": {
3353
+ "kind": "struct",
3354
+ "fields": [
3355
+ {
3356
+ "name": "step_id",
3357
+ "type": {
3358
+ "array": [
3359
+ "u8",
3360
+ 32
3361
+ ]
3362
+ }
3363
+ },
3364
+ {
3365
+ "name": "path_id",
3366
+ "type": {
3367
+ "array": [
3368
+ "u8",
3369
+ 32
3370
+ ]
3371
+ }
3372
+ },
3373
+ {
3374
+ "name": "submitter",
3375
+ "type": "pubkey"
3376
+ }
3377
+ ]
3378
+ }
3379
+ },
4661
3380
  {
4662
3381
  "name": "HandleReceiveMessageParams",
4663
3382
  "type": {
@@ -4776,39 +3495,6 @@
4776
3495
  ]
4777
3496
  }
4778
3497
  },
4779
- {
4780
- "name": "RelayExecutionEventInfo",
4781
- "type": {
4782
- "kind": "struct",
4783
- "fields": [
4784
- {
4785
- "name": "updated_recipient",
4786
- "type": "pubkey"
4787
- },
4788
- {
4789
- "name": "updated_message_hash",
4790
- "type": {
4791
- "array": [
4792
- "u8",
4793
- 32
4794
- ]
4795
- }
4796
- },
4797
- {
4798
- "name": "updated_output_amount",
4799
- "type": "u64"
4800
- },
4801
- {
4802
- "name": "fill_type",
4803
- "type": {
4804
- "defined": {
4805
- "name": "FillType"
4806
- }
4807
- }
4808
- }
4809
- ]
4810
- }
4811
- },
4812
3498
  {
4813
3499
  "name": "RelayedRootBundle",
4814
3500
  "type": {
@@ -4876,15 +3562,32 @@
4876
3562
  }
4877
3563
  },
4878
3564
  {
4879
- "name": "RequestSlowFillParams",
3565
+ "name": "RelayExecutionEventInfo",
4880
3566
  "type": {
4881
3567
  "kind": "struct",
4882
3568
  "fields": [
4883
3569
  {
4884
- "name": "relay_data",
3570
+ "name": "updated_recipient",
3571
+ "type": "pubkey"
3572
+ },
3573
+ {
3574
+ "name": "updated_message_hash",
3575
+ "type": {
3576
+ "array": [
3577
+ "u8",
3578
+ 32
3579
+ ]
3580
+ }
3581
+ },
3582
+ {
3583
+ "name": "updated_output_amount",
3584
+ "type": "u64"
3585
+ },
3586
+ {
3587
+ "name": "fill_type",
4885
3588
  "type": {
4886
3589
  "defined": {
4887
- "name": "RelayData"
3590
+ "name": "FillType"
4888
3591
  }
4889
3592
  }
4890
3593
  }
@@ -5004,30 +3707,6 @@
5004
3707
  ]
5005
3708
  }
5006
3709
  },
5007
- {
5008
- "name": "SlowFill",
5009
- "type": {
5010
- "kind": "struct",
5011
- "fields": [
5012
- {
5013
- "name": "relay_data",
5014
- "type": {
5015
- "defined": {
5016
- "name": "RelayData"
5017
- }
5018
- }
5019
- },
5020
- {
5021
- "name": "chain_id",
5022
- "type": "u64"
5023
- },
5024
- {
5025
- "name": "updated_output_amount",
5026
- "type": "u64"
5027
- }
5028
- ]
5029
- }
5030
- },
5031
3710
  {
5032
3711
  "name": "State",
5033
3712
  "type": {
@@ -5095,6 +3774,157 @@
5095
3774
  }
5096
3775
  ]
5097
3776
  }
3777
+ },
3778
+ {
3779
+ "name": "V5AdapterInput",
3780
+ "docs": [
3781
+ "Committed input for an Across V5 adapter call.",
3782
+ "",
3783
+ "`V5` is the Across protocol generation; each variant's `V1` is its SVM wire-schema revision. Borsh discriminants",
3784
+ "are frozen as `DepositV1 = 0` and `FillV1 = 1`. Append a new versioned variant when one payload changes; never",
3785
+ "reorder existing variants. A safe old variant may remain accepted while in-flight inputs drain, while an unsafe",
3786
+ "variant can be rejected immediately."
3787
+ ],
3788
+ "type": {
3789
+ "kind": "enum",
3790
+ "variants": [
3791
+ {
3792
+ "name": "DepositV1",
3793
+ "fields": [
3794
+ {
3795
+ "defined": {
3796
+ "name": "AcrossDepositInput"
3797
+ }
3798
+ }
3799
+ ]
3800
+ },
3801
+ {
3802
+ "name": "FillV1",
3803
+ "fields": [
3804
+ {
3805
+ "defined": {
3806
+ "name": "V5FillInput"
3807
+ }
3808
+ }
3809
+ ]
3810
+ }
3811
+ ]
3812
+ }
3813
+ },
3814
+ {
3815
+ "name": "V5DepositModificationRules",
3816
+ "type": {
3817
+ "kind": "struct",
3818
+ "fields": [
3819
+ {
3820
+ "name": "authority",
3821
+ "type": {
3822
+ "array": [
3823
+ "u8",
3824
+ 20
3825
+ ]
3826
+ }
3827
+ },
3828
+ {
3829
+ "name": "allow_output_amount",
3830
+ "type": "bool"
3831
+ },
3832
+ {
3833
+ "name": "allow_exclusive_relayer",
3834
+ "type": "bool"
3835
+ }
3836
+ ]
3837
+ }
3838
+ },
3839
+ {
3840
+ "name": "V5FillFloatWithdrawn",
3841
+ "type": {
3842
+ "kind": "struct",
3843
+ "fields": [
3844
+ {
3845
+ "name": "submitter",
3846
+ "type": "pubkey"
3847
+ },
3848
+ {
3849
+ "name": "amount",
3850
+ "type": "u64"
3851
+ }
3852
+ ]
3853
+ }
3854
+ },
3855
+ {
3856
+ "name": "V5FillInput",
3857
+ "docs": [
3858
+ "Destination acceptance bounds. Unlike the EVM executor-mode input, the SVM adapter omits a callback message",
3859
+ "because V5 adapter fills do not execute recipient callbacks."
3860
+ ],
3861
+ "type": {
3862
+ "kind": "struct",
3863
+ "fields": [
3864
+ {
3865
+ "name": "recipient",
3866
+ "type": "pubkey"
3867
+ },
3868
+ {
3869
+ "name": "output_token",
3870
+ "type": "pubkey"
3871
+ },
3872
+ {
3873
+ "name": "min_output_amount",
3874
+ "type": "u64"
3875
+ }
3876
+ ]
3877
+ }
3878
+ },
3879
+ {
3880
+ "name": "V5FillJit",
3881
+ "type": {
3882
+ "kind": "struct",
3883
+ "fields": [
3884
+ {
3885
+ "name": "relay_data",
3886
+ "type": {
3887
+ "defined": {
3888
+ "name": "RelayData"
3889
+ }
3890
+ }
3891
+ },
3892
+ {
3893
+ "name": "repayment_chain_id",
3894
+ "type": "u64"
3895
+ },
3896
+ {
3897
+ "name": "repayment_address",
3898
+ "type": "pubkey"
3899
+ }
3900
+ ]
3901
+ }
3902
+ },
3903
+ {
3904
+ "name": "V5InputAmountMode",
3905
+ "docs": [
3906
+ "Literal uses the committed `input_amount`. Balance-relative mode resolves `bips` of the canonical Gateway input",
3907
+ "vault's live token amount, rounded down, and later enforces the committed amount as a floor. Gateway vaults are",
3908
+ "shared per mint, not isolated per execution, so the continuing tape must leave no residual balance; Gateway does",
3909
+ "not currently enforce that net-zero settlement invariant."
3910
+ ],
3911
+ "type": {
3912
+ "kind": "enum",
3913
+ "variants": [
3914
+ {
3915
+ "name": "Literal"
3916
+ },
3917
+ {
3918
+ "name": "InputVaultBalance",
3919
+ "fields": [
3920
+ {
3921
+ "name": "bips",
3922
+ "type": "u16"
3923
+ }
3924
+ ]
3925
+ }
3926
+ ]
3927
+ }
5098
3928
  }
5099
3929
  ]
5100
- }
3930
+ }