CLI Docs
This tool is a command line interface to Wormhole.
Installation
Pull down the repo if you don't already have it and cd to the appropriate directory:
git clone https://github.com/wormhole-foundation/wormhole
cd wormhole/clients/jsBuild and install the cli tool:
make installThis installs two binaries, worm-fetch-governance and worm on your $PATH.
To use worm, set up $HOME/.wormhole/.env with your private keys, based on .env.sample in this folder.
Usage
worm <command>
Commands:
worm aptos Aptos utilities
worm edit-vaa Edits or generates a VAA
worm evm EVM utilities
worm generate generate VAAs (devnet and testnet only)
worm info Contract, chain, rpc and address information utilities
worm near NEAR utilities
worm parse <vaa> Parse a VAA (can be in either hex or base64
format)
worm recover <digest> <signature> Recover an address from a signature
worm submit <vaa> Execute a VAA
worm sui Sui utilities
worm verify-vaa Verifies a VAA by querying the core contract on Ethereum
Options:
--help Show help [boolean]
--version Show version number [boolean]Subcommands
Examples
VAA generation
Use generate to create VAAs for testing. For example, to create an NFT bridge registration VAA:
Example creating a token attestation VAA:
VAA parsing
Use parse to parse a VAA into JSON. For example,
will fetch governance VAA 13940208096455381020 and print it as JSON.
Submitting VAAs
Use submit to submit a VAA to a chain. It first parses the VAA and figures out what's the destination chain and module. For example, a contract upgrade contains both the target chain and module, so the only required argument is the network moniker (mainnet or testnet):
For VAAs that don't have a specific target chain (like registrations or guardian set upgrades), the script will ask you to specify the target chain. For example, to submit a guardian set upgrade on all chains, simply run:
The VAA payload type (guardian set upgrade) specifies that this VAA should go to the core bridge, and the tool directs it there.
info
To get info about a contract (only EVM supported at this time)
Misc
To get the contract address for a module:
To get the RPC address for a chain
Last updated
Was this helpful?

