fix(svm): add gateway event_cpi accounts to outbound tx builders - #372
Merged
Merged
Conversation
Aman035
force-pushed
the
fix/F-svm-event-cpi-outbound-accounts
branch
from
September 11, 2026 17:55
832c226 to
7b1bf60
Compare
Member
Author
|
Fixes verifed on testnet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gateway now emits events via Anchor's
#[event_cpi]self-CPI instead of plain logs. That macro appends two accounts,event_authorityand the program itself, to every affected instruction's account list. Our hand-written outbound builders were never updated for it, so every finalize, revert, rescue, and PC20 remint transaction fails on-chain withAccountNotEnoughKeysorConstraintSeeds.event_authorityPDA and gateway program tobuildWithdrawAndExecuteAccounts,buildRevertAccounts(also covers rescue),buildPC20ExportAccounts,buildPC20RemintAccounts.buildPC20RemintAccountswas also missing twoassociated_token_program/rentNoneslots that the plain revert path already carries for the same instruction. Added those too.tx_builder_test.goandtx_builder_pc20_test.goto match.Build, vet, and the full repo test suite (with the
testbuild tag) are green.Not run: the
RUN_SVM_SIM=1on-chain simulation tests, they need a funded devnet relayer key and a live TSS PDA. Recommend running those before merge.