Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d4f6fa4
feat(svm): retire V4 deposit and fill entrypoints
Reinis-FRP Sep 24, 2026
dd5999e
fix(svm): clean up retired V4 code warnings
Reinis-FRP Sep 24, 2026
0d84f28
test(svm): pin frozen legacy deposit counter
Reinis-FRP Sep 24, 2026
344d06c
docs(svm): clarify retained legacy fill test coverage
Reinis-FRP Sep 24, 2026
e75f4a0
fix(svm): preserve public V5 wire codecs in generated IDL
Reinis-FRP Sep 24, 2026
cd947ae
docs(svm): update Gateway guide for V4 retirement
Reinis-FRP Sep 24, 2026
03494de
fix(svm): remove unused V4 errors and message guards
Reinis-FRP Sep 24, 2026
0d00999
docs(svm): restore retirement guide line wrapping
Reinis-FRP Sep 24, 2026
959858d
fix(svm): align refund helper and script account types
Reinis-FRP Sep 24, 2026
d51f744
fix(svm): remove retired V4 delegate client helpers
Reinis-FRP Sep 24, 2026
d8ccf4e
test(svm): port retired V4 coverage to V5 Gateway flows
Reinis-FRP Sep 24, 2026
8b8a980
fix(svm): invalidate artifact caches on build helper changes
Reinis-FRP Sep 25, 2026
b2c336c
docs(svm): distinguish CI and manual V5 regression coverage
Reinis-FRP Sep 25, 2026
bcd8745
fix(svm): export complete V5 payload schemas in IDL
Reinis-FRP Sep 25, 2026
e8295ac
docs(svm): pin retired test coverage to fixed snapshot
Reinis-FRP Sep 25, 2026
50d9a94
test(svm): clarify V5 deposit input nesting
Reinis-FRP Sep 25, 2026
06bee97
refactor(svm): retire legacy deposit ID endpoint
Reinis-FRP Sep 25, 2026
de964dc
test(svm): drop stale retained-endpoint assertion
droplet-rl Sep 25, 2026
e28a6d6
test(svm): typecheck TypeScript tests in CI
Reinis-FRP Sep 25, 2026
d193ab0
refactor(svm): mark reserved slow-fill errors as retired
Reinis-FRP Sep 25, 2026
c7169b6
fix(svm): confirm refund parameter writes before execution
Reinis-FRP Sep 25, 2026
77ffbeb
build(svm): fail on stack-overflow diagnostics
Reinis-FRP Sep 25, 2026
80e5ce9
test(svm): run shared codec vectors after artifact generation
Reinis-FRP Sep 29, 2026
a514edf
docs(svm): clarify paused V5 cutover prerequisites
Reinis-FRP Sep 29, 2026
c8990cc
fix(svm): reject stale verified build artifacts
Reinis-FRP Sep 30, 2026
e7b52c9
docs(svm): clarify unsupported V5 devnet deployment
Reinis-FRP Sep 30, 2026
c5347df
refactor(svm): collapse deposit and fill execution to V5
Reinis-FRP Sep 25, 2026
c6a9209
refactor(svm): separate V5 deposit and fill modules
Reinis-FRP Sep 25, 2026
f782809
refactor(svm): inline V5 fill completion
Reinis-FRP Sep 25, 2026
5ef2b35
refactor(svm): align V5 account helper naming
Reinis-FRP Sep 25, 2026
76aca08
refactor(svm): organize V5 execution and fill-status modules
Reinis-FRP Sep 25, 2026
0185e50
refactor(svm): group fill-status test support with testable utilities
Reinis-FRP Sep 25, 2026
6b29fa9
test(svm): remove redundant mint allowlist predicate test
Reinis-FRP Sep 25, 2026
1134dac
refactor(svm): align V5 deposit delegate naming
Reinis-FRP Sep 25, 2026
94594e3
refactor(svm): use generated adapter discriminator in tests
Reinis-FRP Sep 25, 2026
bc4e845
refactor(svm): order V5 and calldata error ranges
Reinis-FRP Sep 25, 2026
a17da31
refactor(svm): reuse validated V5 message hash
Reinis-FRP Sep 25, 2026
068146b
refactor(svm): clarify V5 hash invariant and mock delegate naming
Reinis-FRP Sep 25, 2026
76e5a93
refactor(svm): share V5 token and Gateway vault loading
Reinis-FRP Sep 29, 2026
faa7721
refactor(svm): remove redundant in-place fill equality check
Reinis-FRP Sep 29, 2026
4fc564f
docs(svm): clarify V5 source deposit replay semantics
Reinis-FRP Sep 30, 2026
bb37ba1
docs(svm): clarify frozen legacy deposit counter
Reinis-FRP Oct 1, 2026
095c442
Merge epic-v5/svm after V4 retirement squash
Reinis-FRP Oct 5, 2026
0436c8b
improve: replace `InPlace` with self-transfer (#1574)
grasphoper Oct 5, 2026
7dbc281
fix(svm): align V5 delegate validation and cover permanent delegates
Reinis-FRP Oct 5, 2026
925c77c
test(svm): give batched ATA creation compute headroom
Reinis-FRP Oct 5, 2026
e036686
refactor(svm): name fill-status rent recipients explicitly
Reinis-FRP Oct 6, 2026
c44014a
fix(svm): discover cleanup accounts by rent recipient
Reinis-FRP Oct 6, 2026
47f44f0
docs(svm): clarify V5 cleanup readiness and delegate validation
Reinis-FRP Oct 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ Located in `contracts/periphery/mintburn/`. A modular framework for executing cr

### SVM Across V5 Gateway integration

`svm_spoke` is a direct Gateway adapter for V5 source deposits and destination fills. External fills transfer tokens;
in-place fills check the shared vault, leaving downstream delivery to the committed Gateway path. See the
`svm_spoke` is a direct Gateway adapter for V5 source deposits and destination fills. All fills use the token program
with sufficient fill-delegate approval; self-transfers validate the shared vault without debiting it, leaving
downstream delivery to the committed Gateway path. See the
[adapter spec](programs/svm-spoke/V5_ADAPTER_SPEC.md#pda-and-token-invariants) for authoritative delivery/security rules
and the [integration guide](test/svm-gateway/README.md) for real-Gateway test execution and coverage.

Expand Down
12 changes: 6 additions & 6 deletions programs/mock-gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub mod mock_gateway {
ApproveChecked {
to: ctx.accounts.gateway_vault.to_account_info(),
mint: ctx.accounts.mint.to_account_info(),
delegate: ctx.accounts.source_delegate.to_account_info(),
delegate: ctx.accounts.deposit_delegate.to_account_info(),
authority: ctx.accounts.vault_authority.to_account_info(),
},
&[vault_seeds],
Expand All @@ -57,7 +57,7 @@ pub mod mock_gateway {
ctx.accounts.spoke_vault.to_account_info(),
ctx.accounts.mint.to_account_info(),
ctx.accounts.token_program.to_account_info(),
ctx.accounts.source_delegate.to_account_info(),
ctx.accounts.deposit_delegate.to_account_info(),
];
invoke_signed(
&Instruction {
Expand All @@ -71,7 +71,7 @@ pub mod mock_gateway {
AccountMeta::new(ctx.accounts.spoke_vault.key(), false),
AccountMeta::new_readonly(ctx.accounts.mint.key(), false),
AccountMeta::new_readonly(ctx.accounts.token_program.key(), false),
AccountMeta::new_readonly(ctx.accounts.source_delegate.key(), false),
AccountMeta::new_readonly(ctx.accounts.deposit_delegate.key(), false),
],
data: svm_spoke::instruction::AdapterExecuteAcrossV5 {
ctx_values: svm_spoke::v5::codec::GatewayContextV1 {
Expand Down Expand Up @@ -222,8 +222,8 @@ pub struct ExecuteAdapter<'info> {
#[account(mint::token_program = token_program)]
pub mint: InterfaceAccount<'info, Mint>,

/// CHECK: The svm-spoke adapter authenticates the static source-delegate key.
pub source_delegate: UncheckedAccount<'info>,
/// CHECK: The svm-spoke adapter authenticates the static V5 deposit-delegate key.
pub deposit_delegate: UncheckedAccount<'info>,

/// CHECK: Validated by the svm-spoke CPI account constraints.
pub state: UncheckedAccount<'info>,
Expand Down Expand Up @@ -262,7 +262,7 @@ pub struct ExecuteFillAdapter<'info> {
#[account(mint::token_program = token_program)]
pub mint: InterfaceAccount<'info, Mint>,

/// CHECK: The svm-spoke adapter authenticates the static fill-delegate key for external delivery.
/// CHECK: The svm-spoke adapter authenticates the static fill-delegate key for all fills.
pub fill_delegate: UncheckedAccount<'info>,

/// CHECK: Validated by svm-spoke against the context submitter.
Expand Down
60 changes: 30 additions & 30 deletions programs/svm-spoke/ERROR_CODES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This release assigns distinct runtime error ranges to `svm_spoke`. **Existing `CommonError` codes are unchanged.**
`SvmError` moves from 6000–6018 to 7000–7016 after unused variants are removed; `CallDataError` moves from
6000–6006 to 8000–8006.
6000–6006 to 9000–9006.
The compatibility baseline is the deployed release
[`v5.0.12-beta.1` (`d8da3000`)](https://github.com/across-protocol/contracts/blob/d8da3000f1aba2593e712a9942a3249bf8e8205b/programs/svm-spoke/src/error.rs),
not intermediate PRs in this undeployed stack. V5 errors are new relative to that baseline. A dash means the
Expand All @@ -17,7 +17,8 @@ Enum membership does not imply reachability: the old `CommonError` slow-fill slo
Use the mapping for the program version being queried. Historical transaction errors retain the old codes;
do not relabel them using the new table. Legacy
numbers overlap across enums, so a number alone cannot identify a historical error. Runtime log names distinguish
the enums. Anchor 0.31.1's generated IDL error table remains incomplete despite the distinct runtime ranges.
the enums. Anchor 0.31.1's generated IDL error table remains incomplete and does not reflect the explicit runtime
offsets; use the runtime mappings below.

Before upgrading, inspect off-chain numeric-code maps and update affected consumers; stale maps can silently
mislabel errors. See [deployment sequencing](V5_ADAPTER_SPEC.md#deployment-sequencing).
Expand Down Expand Up @@ -79,38 +80,37 @@ relayer refund leaves that return tokens to the HubPool. V4 entrypoint retiremen
and `InconsistentOptionalParameters`; neither has a remaining construction site. The final 7000–7016 mapping
includes these removals. Intermediate stack assignments were never deployed and are not compatibility constraints.

## CallDataError

| Error | Before release | This release |
| --------------------- | -------------- | ------------ |
| `InvalidSelector` | 6000 | 8000 |
| `InvalidArgument` | 6001 | 8001 |
| `InvalidBool` | 6002 | 8002 |
| `InvalidAddress` | 6003 | 8003 |
| `InvalidUint32` | 6004 | 8004 |
| `InvalidUint64` | 6005 | 8005 |
| `UnsupportedSelector` | 6006 | 8006 |

## V5Error

| Error | Before release | This release |
| ----------------------------------- | -------------- | ------------ |
| `InvalidWireFormat` | — | 9000 |
| `InvalidParamModificationSignature` | — | 9001 |
| `MissingAccount` | — | 9002 |
| `InvalidDispatchAuthority` | — | 9003 |
| `InvalidAccountMutability` | — | 9004 |
| `ResolvedInputAmountBelowCommitted` | — | 9005 |
| `ParamModificationNotAnImprovement` | — | 9006 |
| `InvalidAmountBips` | — | 9007 |
| `UnsupportedMode` | — | 9008 |
| `InvalidTokenAccount` | — | 9009 |
| `UnsupportedTokenExtension` | — | 9010 |
| `InvalidFillPayer` | — | 9011 |
| `InvalidFillStatusAccount` | — | 9012 |
| `FillCommitmentMismatch` | — | 9013 |
| `FillOutputAmountTooLow` | — | 9014 |
| `InsufficientVaultBalance` | — | 9015 |
| `InvalidWireFormat` | — | 8000 |
| `InvalidParamModificationSignature` | — | 8001 |
| `MissingAccount` | — | 8002 |
| `InvalidDispatchAuthority` | — | 8003 |
| `InvalidAccountMutability` | — | 8004 |
| `ResolvedInputAmountBelowCommitted` | — | 8005 |
| `ParamModificationNotAnImprovement` | — | 8006 |
| `InvalidAmountBips` | — | 8007 |
| `UnsupportedMode` | — | 8008 |
| `InvalidTokenAccount` | — | 8009 |
| `UnsupportedTokenExtension` | — | 8010 |
| `InvalidFillPayer` | — | 8011 |
| `InvalidFillStatusAccount` | — | 8012 |
| `FillCommitmentMismatch` | — | 8013 |
| `FillOutputAmountTooLow` | — | 8014 |

## CallDataError

| Error | Before release | This release |
| --------------------- | -------------- | ------------ |
| `InvalidSelector` | 6000 | 9000 |
| `InvalidArgument` | 6001 | 9001 |
| `InvalidBool` | 6002 | 9002 |
| `InvalidAddress` | 6003 | 9003 |
| `InvalidUint32` | 6004 | 9004 |
| `InvalidUint64` | 6005 | 9005 |
| `UnsupportedSelector` | 6006 | 9006 |

## Removed (AcrossPlusError)

Expand Down
Loading
Loading