cli: add token transfer#732
Merged
evgeniko merged 38 commits intowormhole-foundation:mainfrom Dec 2, 2025
Merged
Conversation
evgeniko
reviewed
Nov 11, 2025
Contributor
|
could you please adjust the Readme inside the cli repo: https://github.com/wormhole-foundation/native-token-transfers/blob/main/cli/README.md, and point to our docs: |
evgeniko
reviewed
Nov 11, 2025
evgeniko
reviewed
Nov 11, 2025
evgeniko
reviewed
Nov 11, 2025
evgeniko
reviewed
Nov 11, 2025
evgeniko
reviewed
Nov 11, 2025
evgeniko
reviewed
Nov 11, 2025
nvsriram
approved these changes
Dec 2, 2025
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.
This pull request introduces improvements to configuration management and error handling in the CLI, along with a new command for token transfers. The key changes are the extraction and centralization of configuration types and loading logic, enhanced error reporting for RPC issues, and the addition of a token transfer command.
Configuration Management Improvements:
ChainConfigandConfigtype definitions, as well as theloadConfigfunction, fromcli/src/index.tsto a new filecli/src/deployments.tsfor better organization and modularity. Imports and exports were updated accordingly.Error Handling Enhancements:
handleRpcErrorfunction tocli/src/error.tsto provide improved error reporting for RPC connection issues, including contextual information about the chain and network.New Feature: Token Transfer Command:
createTokenTransferCommandfromcli/src/tokenTransfer.tsand registering it with the CLI command parser.Examples
# Transfer 5 tokens from Sepolia to Solana using the deployments written to deployment.json ntt token-transfer \ --network Testnet \ --source-chain Sepolia \ --destination-chain Solana \ --amount 5 \ --destination-address Ez6j... \ --deployment-path ./deployment.json# Transfer from an EVM chain to Solana with a custom msgValue to fund executor rent ntt token-transfer \ --network Testnet \ --source-chain Sepolia \ --destination-chain Solana \ --amount 2 \ --destination-address Ez6j... \ --destination-msg-value 15000000 \ --deployment-path ./deployment.jsonCodebase Cleanup:
loadConfigfunction fromcli/src/index.tsafter moving them tocli/src/deployments.ts.