cli: add command to cancel in-flight SVM ownership transfer#864
Open
kcsongor wants to merge 2 commits into
Open
cli: add command to cancel in-flight SVM ownership transfer#864kcsongor wants to merge 2 commits into
kcsongor wants to merge 2 commits into
Conversation
kcsongor
force-pushed
the
cli/cancel-ownership-transfer
branch
from
May 20, 2026 01:56
2128c01 to
1e65e36
Compare
tonyjin
requested review from
bengtlofgren,
evan-gray and
kev1n-peters
and removed request for
bengtlofgren
May 20, 2026 04:15
evan-gray
approved these changes
May 20, 2026
Comment on lines
+494
to
+509
| const tx = new Transaction().add(ix); | ||
| tx.feePayer = payerKeypair.publicKey; | ||
| const { blockhash, lastValidBlockHeight } = | ||
| await connection.getLatestBlockhash(); | ||
| tx.recentBlockhash = blockhash; | ||
| tx.sign(payerKeypair); | ||
|
|
||
| const signature = await connection.sendRawTransaction( | ||
| tx.serialize() | ||
| ); | ||
| console.log(`Transaction signature: ${signature}`); | ||
| console.log(`Waiting for finalization...`); | ||
| await connection.confirmTransaction( | ||
| { signature, blockhash, lastValidBlockHeight }, | ||
| "finalized" | ||
| ); |
Contributor
There was a problem hiding this comment.
consider using signSendWait like the rest of the CLI
| solanaNtt.program, | ||
| solanaNtt.pdas | ||
| ); | ||
| if (refreshed.pendingOwner === null) { |
Contributor
There was a problem hiding this comment.
I wonder how useful this sanity check is afterwards - it could possibly read stale state from a load balanced endpoint but maybe unlikely and worth keeping.
| import { options, EXCLUDED_DIFF_PATHS } from "./shared"; | ||
| import { pullDeployments, checkConfigErrors, pushDeployment } from "../index"; | ||
|
|
||
| function hasPendingChanges( |
Contributor
There was a problem hiding this comment.
this seems like it'd be worth some unit tests?
kev1n-peters
approved these changes
May 20, 2026
mdulin2
approved these changes
May 21, 2026
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 Solana contract implements a 2-step ownership transfer whereby the new owner has to claim ownership. If for whatever reason the previous owner wants to cancel the transfer, they can do so by invoking the claim ownership instruction themselves. This PR exposes a convenience CLI function to execute that transaction.