diff --git a/content/docs/avalanche-l1s/avalanche-cli-avalanche-l1s.mdx b/content/docs/avalanche-l1s/avalanche-cli-avalanche-l1s.mdx deleted file mode 100644 index b087ea7ee4d..00000000000 --- a/content/docs/avalanche-l1s/avalanche-cli-avalanche-l1s.mdx +++ /dev/null @@ -1,1241 +0,0 @@ ---- -title: Avalanche-CLI -description: Learn about Avalanche CLI and its different commands for Avalanche L1s. ---- - -Avalanche-CLI is a command-line tool that gives developers access to everything Avalanche. This release specializes in helping developers build and test Avalanche L1s. - -To get started, look at the documentation for the subcommands or jump right in with `avalanche blockchain create myblockchain`. - -[Install Avalanche CLI](/tooling/guides/get-avalanche-cli) - -Primary[​](#primary "Direct link to heading") ---------------------------------------------- - -The `primary` command suite provides a collection of tools for interacting with the Avalanche Primary Network. - -### Primary AddValidator[​](#primary-addvalidator "Direct link to heading") - -The `primary addValidator` command adds an Avalanche node as a validator in the Avalanche Primary Network with [AddPermissionlessValidatorTx](/api-reference/standards/guides/banff-changes#addpermissionlessvalidatortx). - -This command requires the node's BLS key and proof of possession key, more information regarding BLS can be found [here](/api-reference/p-chain/txn-format#proof-of-possession). - -To get a node's BLS key and proof of possession key, call info.getNodeID API as shown [here](/api-reference/info-api#infogetnodeid) - -**Usage**: - -```bash -avalanche primary addValidator [flags] -``` - -**Flags**: - -```bash - --nodeID string the node ID of the validator --k, --key string select the key to use [fuji deploy only] - --weight uint set the staking weight of the validator - --start-time string UTC start time when this validator starts validating, in 'YYYY-MM-DD HH:MM:SS' format - --staking-period duration how long this validator will be staking - --fuji fuji join on fuji (alias for `testnet`) - --testnet testnet join on testnet (alias for `fuji`) - --mainnet mainnet join on mainnet --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji) - --ledger-addrs strings use the given ledger addresses - --public-key string set the BLS public key of the validator - --proof-of-possession string set the BLS proof of possession of the validator - --delegation-fee uint set the delegation fee (20 000 is equivalent to 2%) -``` - -Avalanche L1[​](#avalanche-l1 "Direct link to heading") -------------------------------------------- - -The `blockchain` command suite provides a collection of tools for developing and deploying Avalanche L1s. - -To get started, use the `blockchain create` command wizard to walk through the configuration of your very first Avalanche L1. Then, go ahead and deploy it with the `blockchain deploy` command. You can use the rest of the commands to manage your Avalanche L1 configurations and live deployments. - -### Avalanche L1 AddValidator[​](#avalanche-l1-addvalidator "Direct link to heading") - -The `blockchain addValidator` command whitelists a primary network validator to validate the provided deployed Avalanche L1. - -To add the validator to the Avalanche L1's allow list, you first need to provide the blockchainName and the validator's unique NodeID. The command then prompts for the validation start time, duration, and stake weight. You can bypass these prompts by providing the values with flags. - -This command currently only works on Avalanche L1s deployed to either the Fuji Testnet or Mainnet. - -**Usage**: - -```bash -avalanche blockchain addValidator [blockchainName] [flags] -``` - -**Flags**: - -```bash - --default-validator-params use default weight/start/duration params for Avalanche L1 validator - --devnet devnet add Avalanche L1 validator on devnet - --endpoint string use the given endpoint for network operations --e, --ewoq use ewoq key [fuji/devnet only] - --fuji fuji add Avalanche L1 validator on fuji (alias for `testnet`) --h, --help help for addValidator --k, --key string select the key to use [fuji/devnet only] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) - --ledger-addrs strings use the given ledger addresses - --local local add Avalanche L1 validator on local - --mainnet mainnet add Avalanche L1 validator on mainnet - --nodeID string set the NodeID of the validator to add - --output-tx-path string file path of the add validator tx - --staking-period duration how long this validator will be staking - --start-time string UTC start time when this validator starts validating, in 'YYYY-MM-DD HH:MM:SS' format - --subnet-auth-keys strings control keys that will be used to authenticate add validator tx - --testnet testnet add Avalanche L1 validator on testnet (alias for `fuji`) - --weight uint set the staking weight of the validator to add -``` - -### Remove Validator in an Avalanche L1[​](#remove-validator-in-a-avalanche-l1 "Direct link to heading") - -This command removes a node as a validator in an Avalanche L1. - -**Usage**: - -```bash -avalanche blockchain removeValidator [blockchainName] [flags] -``` - -**Flags**: - -```bash - --fuji remove validator in existing fuji deployment (alias for `testnet`) --k, --key string select the key to use [fuji only] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji) - --ledger-addrs strings use the given ledger addresses - --local remove validator in existing local deployment - --mainnet remove validator in existing mainnet deployment - --nodeID string set the NodeID of the validator to remove - --output-tx-path string file path of the removeValidator tx - --subnet-auth-keys strings control keys that will be used to authenticate removeValidator tx - --testnet remove validator in existing testnet deployment (alias for `fuji`) -``` - -### Avalanche L1 Change Owner[​](#avalanche-l1-change-owner "Direct link to heading") - -The `blockchain changeOwner` changes the owner of the deployed Avalanche L1. This command currently only works on Avalanche L1s deployed to Devnet, Fuji or Mainnet. - -**Usage**: - -```bash -avalanche blockchain changeOwner [blockchainName] [flags] -``` - -**Flags**: - -```bash - --control-keys strings addresses that may make Avalanche L1 changes - --devnet devnet change Avalanche L1 owner on devnet - --endpoint string use the given endpoint for network operations --e, --ewoq use ewoq key [fuji/devnet] - --fuji fuji change Avalanche L1 owner on fuji (alias for `testnet`) --h, --help help for changeOwner --k, --key string select the key to use [fuji/devnet] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) - --ledger-addrs strings use the given ledger addresses - --local local change Avalanche L1 owner on local - --mainnet mainnet change Avalanche L1 owner on mainnet - --output-tx-path string file path of the transfer Avalanche L1 ownership tx --s, --same-control-key use the fee-paying key as control key - --subnet-auth-keys strings control keys that will be used to authenticate transfer Avalanche L1 ownership tx - --testnet testnet change Avalanche L1 owner on testnet (alias for `fuji`) - --threshold uint32 required number of control key signatures to make Avalanche L1 changes -``` - -### Avalanche L1 Configure[​](#avalanche-l1-configure "Direct link to heading") - -AvalancheGo nodes support several different configuration files. Avalanche L1s have their own Avalanche L1 config which applies to all chains/VMs in the Avalanche L1. Each chain within the Avalanche L1 can have its own chain config. This command allows you to set both config files. - -**Usage**: - -```bash -avalanche blockchain configure [blockchainName] [flags] -``` - -**Flags**: - -```bash - --chain-config string path to the chain configuration --h, --help help for configure - --per-node-chain-config string path to per node chain configuration for local network - --subnet-config string path to the Avalanche L1 configuration -``` - -### Avalanche L1 Create[​](#avalanche-l1-create "Direct link to heading") - -The `blockchain create` command builds a new genesis file to configure your Avalanche L1. By default, the command runs an interactive wizard. It walks you through all the steps you need to create your first Avalanche L1. - -The tool supports deploying Subnet-EVM and custom VMs. You can create a custom, user-generated genesis with a custom VM by providing the path to your genesis and VM binaries with the `--genesis` and `--vm` flags. - -By default, running the command with a `blockchainName` that already exists causes the command to fail. If you'd like to overwrite an existing configuration, pass the `-f` flag. - -**Usage**: - -```bash -avalanche blockchain create [blockchainName] [flags] -``` - -**Flags**: - -```bash - --custom use a custom VM template - --custom-vm-branch string custom vm branch - --custom-vm-build-script string custom vm build-script - --custom-vm-path string file path of custom vm to use - --custom-vm-repo-url string custom vm repository url - --evm use the Subnet-EVM as the base template - --evm-chain-id uint chain ID to use with Subnet-EVM - --evm-defaults use default settings for fees/airdrop/precompiles with Subnet-EVM - --evm-token string token name to use with Subnet-EVM --f, --force overwrite the existing configuration if one exists - --from-github-repo generate custom VM binary from github repository - --genesis string file path of genesis to use --h, --help help for create - --latest use latest Subnet-EVM released version, takes precedence over --vm-version - --pre-release use latest Subnet-EVM pre-released version, takes precedence over --vm-version - --teleporter generate a teleporter-ready vm (default true) - --vm string file path of custom vm to use. alias to custom-vm-path - --vm-version string version of Subnet-EVM template to use -``` - -### Avalanche L1 Delete[​](#avalanche-l1-delete "Direct link to heading") - -The `blockchain delete` command deletes an existing Avalanche L1 configuration. - -**Usage**: - -```bash -avalanche blockchain delete [flags] -``` - -**Flags**: - -```bash --h, --help help for delete -``` - -### Avalanche L1 Deploy[​](#avalanche-l1-deploy "Direct link to heading") - -The `blockchain deploy` command deploys your Avalanche L1 configuration locally, to Fuji Testnet, or to Mainnet. - -At the end of the call, the command prints the RPC URL you can use to interact with the Avalanche L1. - -Avalanche-CLI only supports deploying an individual Avalanche L1 once per network. Subsequent attempts to deploy the same Avalanche L1 to the same network (local, Fuji, Mainnet) aren't allowed. If you'd like to redeploy an Avalanche L1 locally for testing, you must first call [avalanche network clean](#network-clean) to reset all deployed chain state. Subsequent local deploys redeploy the chain with fresh state. You can deploy the same Avalanche L1 to multiple networks, so you can take your locally tested Avalanche L1 and deploy it on Fuji or Mainnet. - -**Usage**: - -```bash -avalanche blockchain deploy [blockchainName] [flags] -``` - -**Flags**: - -```bash - --avalanchego-path string use this avalanchego binary path - --avalanchego-version string use this version of avalanchego (ex: v1.17.12) (default "latest") - --control-keys strings addresses that may make Avalanche L1 changes - --devnet deploy to a devnet network - --endpoint string use the given endpoint for network operations --e, --ewoq use ewoq key [fuji/devnet deploy only] --f, --fuji testnet deploy to fuji (alias to testnet --h, --help help for deploy --k, --key string select the key to use [fuji/devnet deploy only] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) - --ledger-addrs strings use the given ledger addresses --l, --local deploy to a local network --m, --mainnet deploy to mainnet - --mainnet-chain-id string use different ChainID for mainnet deployment - --output-tx-path string file path of the blockchain creation tx --s, --same-control-key use creation key as control key - --subnet-auth-keys strings control keys that will be used to authenticate chain creation --u, --subnet-id string deploy into given subnet id --t, --testnet fuji deploy to testnet (alias to fuji) - --threshold uint32 required number of control key signatures to make Avalanche L1 changes -``` - -### Avalanche L1 Describe[​](#avalanche-l1-describe "Direct link to heading") - -The `blockchain describe` command prints the details of an Avalanche L1 configuration to the console. By default, the command prints a summary of the configuration. By providing the `--genesis` flag, the command instead prints out the raw genesis file. - -**Usage**: - -```bash -avalanche blockchain describe [blockchainName] [flags] -``` - -**Flags**: - -```bash --g, --genesis Print the genesis to the console directly instead of the summary --h, --help help for describe -``` - -### Avalanche L1 Export[​](#avalanche-l1-export "Direct link to heading") - -The `blockchain export` command write the details of an existing Avalanche L1 deploy to a file. The command prompts for an output path. You can also provide one with the `--output` flag. - -**Usage**: - -```bash -avalanche blockchain export [blockchainName] [flags] -``` - -**Flags**: - -```bash --h, --help help for export --o, --output string write the export data to the provided file path -``` - -### Avalanche L1 Import[​](#avalanche-l1-import "Direct link to heading") - -The `blockchain import` command imports configurations into Avalanche-CLI. - -This command supports importing from a file created on another computer, or importing from Avalanche L1s running public networks (for example, created manually or with the deprecated Avalanche L1-CLI) - -#### Import from a File[​](#import-from-a-file "Direct link to heading") - -To import from a file, you can optionally provide the path as a command-line argument. Alternatively, running the command without any arguments triggers an interactive wizard. To import from a repository, go through the wizard. By default, an imported Avalanche L1 doesn't overwrite an existing Avalanche L1 with the same name. To allow overwrites, provide the `--force` flag. - -**Usage**: - -```bash -avalanche blockchain import file [blockchainPath] [flags] -``` - -**Flags**: - -```bash - --branch string the repo branch to use if downloading a new repo --f, --force overwrite the existing configuration if one exists --h, --help help for import - --repo string the repo to import (ex: ava-labs/avalanche-plugins-core) or url to download the repo from - --subnet string the Avalanche L1 configuration to import from the provided repo -``` - -#### Import from a Public Network[​](#import-from-a-public-network "Direct link to heading") - -The `blockchain import public` command imports an Avalanche L1 configuration from a running network. - -The genesis file should be available from the disk for this to work. By default, an imported Avalanche L1 doesn't overwrite an existing Avalanche L1 with the same name. To allow overwrites, provide the `--force` flag. - -**Usage**: - -```bash -avalanche blockchain import public [blockchainPath] [flags] -``` - -**Flags**: - -```bash - --custom use a custom VM template - --evm import a subnet-evm --f, --force overwrite the existing configuration if one exists - --fuji fuji import from fuji (alias for `testnet`) - --genesis-file-path string path to the genesis file --h, --help help for public - --mainnet mainnet import from mainnet - --node-url string [optional] URL of an already running Avalanche L1 validator - --subnet-id string the subnet ID - --testnet testnet import from testnet (alias for `fuji`) - -``` - -### Avalanche L1 Join[​](#avalanche-l1-join "Direct link to heading") - -The `blockchain join` command configures your validator node to begin validating a new Avalanche L1. - -To complete this process, you must have access to the machine running your validator. If the CLI is running on the same machine as your validator, it can generate or update your node's config file automatically. Alternatively, the command can print the necessary instructions to update your node manually. To complete the validation process, the Avalanche L1's admins must add the NodeID of your validator to the Avalanche L1's allow list by calling `addValidator` with your NodeID. - -After you update your validator's config, you need to restart your validator manually. If you provide the `--avalanchego-config` flag, this command attempts to edit the config file at that path. - -This command currently only supports Avalanche L1s deployed on the Fuji Testnet and Mainnet. - -**Usage**: - -```bash -avalanche blockchain join [blockchainName] [flags] -``` - -**Flags**: - -```bash - --avalanchego-config string file path of the avalanchego config file - --fail-if-not-validating fail if whitelist check fails - --force-whitelist-check if true, force the whitelist check - --force-write if true, skip to prompt to overwrite the config file - --fuji fuji join on fuji (alias for `testnet`) --h, --help help for join - --mainnet mainnet join on mainnet - --nodeID string set the NodeID of the validator to check - --plugin-dir string file path of avalanchego's plugin directory - --print if true, print the manual config without prompting - --skip-whitelist-check if true, skip the whitelist check - --testnet testnet join on testnet (alias for `fuji`) -``` - -### Avalanche L1 List[​](#avalanche-l1-list "Direct link to heading") - -The `blockchain list` command prints the names of all created Avalanche L1 configurations. Without any flags, it prints some general, static information about the Avalanche L1. With the `--deployed` flag, the command shows additional information including the VMID, BlockchainID and SubnetID. - -**Usage**: - -```bash -avalanche blockchain list [flags] -``` - -**Flags**: - -```bash - --deployed show additional deploy information --h, --help help for list -``` - -### Avalanche L1 Publish[​](#avalanche-l1-publish "Direct link to heading") - -The `blockchain publish` command publishes the Avalanche L1's VM to a repository. - -**Usage**: - -```bash -avalanche blockchain publish [blockchainName] [flags] -``` - -**Flags**: - -```bash - --alias string We publish to a remote repo, but identify the repo locally under a user-provided alias (e.g. myrepo). - --force If true, ignores if the Avalanche L1 has been published in the past, and attempts a forced publish. --h, --help help for publish - --no-repo-path string Do not let the tool manage file publishing, but have it only generate the files and put them in the location given by this flag. - --repo-url string The URL of the repo where we are publishing - --subnet-file-path string Path to the Subnet description file. If not given, a prompting sequence will be initiated. - --vm-file-path string Path to the VM description file. If not given, a prompting sequence will be initiated. -``` - -### Avalanche L1 Stats[​](#avalanche-l1-stats "Direct link to heading") - -The `blockchain stats` command prints validator statistics for the given Avalanche L1. - -**Usage**: - -```bash -avalanche blockchain stats [blockchainName] [flags] -``` - -**Flags**: - -```bash - --fuji fuji print stats on fuji (alias for `testnet`) --h, --help help for stats - --mainnet mainnet print stats on mainnet - --testnet testnet print stats on testnet (alias for `fuji`) -``` - -### Avalanche L1 VMID[​](#avalanche-l1-vmid "Direct link to heading") - -The `blockchain vmid` command prints the virtual machine ID (VMID) for the given Avalanche L1. - -**Usage**: - -```bash -avalanche blockchain vmid [blockchainName] -``` - -Avalanche L1 Upgrade[​](#avalanche-l1-upgrade "Direct link to heading") ------------------------------------------------------------ - -The `blockchain upgrade` command suite provides a collection of tools for updating your developmental and deployed Avalanche L1s. - -### Avalanche L1 Upgrade Apply[​](#avalanche-l1-upgrade-apply "Direct link to heading") - -Apply generated upgrade bytes to running Avalanche L1 nodes to trigger a network upgrade. - -For public networks (Fuji Testnet or Mainnet), to complete this process, you must have access to the machine running your validator. If the CLI is running on the same machine as your validator, it can manipulate your node's configuration automatically. Alternatively, the command can print the necessary instructions to upgrade your node manually. - -After you update your validator's configuration, you need to restart your validator manually. If you provide the `--avalanchego-chain-config-dir` flag, this command attempts to write the upgrade file at that path. Refer to [this doc](/nodes/configure/configs-flags#avalanche-l1-chain-configs) for related documentation. - -**Usage**: - -```bash -avalanche blockchain upgrade apply [blockchainName] [flags] -``` - -**Flags**: - -```bash - --avalanchego-chain-config-dir string avalanchego's chain config file directory (default "/Users/connor/.avalanchego/chains") - --config create upgrade config for future Avalanche L1 deployments (same as generate) - --force If true, don't prompt for confirmation of timestamps in the past - --fuji fuji apply upgrade existing fuji deployment (alias for `testnet`) --h, --help help for apply - --local local apply upgrade existing local deployment - --mainnet mainnet apply upgrade existing mainnet deployment - --print if true, print the manual config without prompting (for public networks only) - --testnet testnet apply upgrade existing testnet deployment (alias for `fuji`) -``` - -### Avalanche L1 Upgrade Export[​](#avalanche-l1-upgrade-export "Direct link to heading") - -Export the upgrade bytes file to a location of choice on disk. - -**Usage**: - -```bash -avalanche blockchain upgrade export [blockchainName] [flags] -``` - -**Flags**: - -```bash - --force If true, overwrite a possibly existing file without prompting --h, --help help for export - --upgrade-filepath string Export upgrade bytes file to location of choice on disk -``` - -### Avalanche L1 Upgrade Generate[​](#avalanche-l1-upgrade-generate "Direct link to heading") - -The `blockchain upgrade generate` command builds a new upgrade.json file to customize your Avalanche L1. It guides the user through the process using an interactive wizard. - -**Usage**: - -```bash -avalanche blockchain upgrade generate [blockchainName] [flags] -``` - -**Flags**: - -```bash --h, --help help for generate -``` - -### Avalanche L1 Upgrade Import[​](#avalanche-l1-upgrade-import "Direct link to heading") - -Import the upgrade bytes file into the local environment. - -**Usage**: - -```bash -avalanche blockchain upgrade import [blockchainName] [flags] -``` - -**Flags**: - -```bash --h, --help help for import - --upgrade-filepath string Import upgrade bytes file into local environment -``` - -### Avalanche L1 Upgrade Print[​](#avalanche-l1-upgrade-print "Direct link to heading") - -Print the upgrade.json file content. - -**Usage**: - -```bash -avalanche blockchain upgrade print [blockchainName] [flags] -``` - -**Flags**: - -```bash --h, --help help for list -``` - -### Avalanche L1 Upgrade VM[​](#avalanche-l1-upgrade-vm "Direct link to heading") - -The `blockchain upgrade vm` command enables the user to upgrade their Avalanche L1's VM binary. The command can upgrade both local Avalanche L1s and publicly deployed Avalanche L1s on Fuji and Mainnet. - -The command walks the user through an interactive wizard. The user can skip the wizard by providing command line flags. - -**Usage**: - -```bash -avalanche blockchain upgrade export [blockchainName] [flags] -``` - -**Flags**: - -```bash - --deployed show additional deploy information --h, --help help for list -``` - -Node[​](#node "Direct link to heading") ---------------------------------------- - -The `node` command suite provides a collection of tools for creating and maintaining validators on the Avalanche Network. - -To get started, use the node create command wizard to walk through the configuration to make your node a primary validator on Avalanche public network. You can use the rest of the commands to maintain your node and make your node an Avalanche L1 Validator. - -### Node Create[​](#node-create "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node create` command sets up a validator on a cloud server of your choice. The validator will be validating the Avalanche Primary Network and Avalanche L1 of your choice. By default, the command runs an interactive wizard. It walks you through all the steps you need to set up a validator. Validators can be deployed in multiple regions/zones simultaneously. Once this command is run, you will have to wait for the validator to finish bootstrapping on the primary network before running further commands on it, for example validating an Avalanche L1. You can check the bootstrapping status by running `avalanche node status`. - -The created node will be part of group of validators called `` and users can call node commands with `` so that the command will apply to all nodes in the cluster. - -**Usage**: - -```bash -avalanche node create [clusterName] [flags] -``` - -**Flags**: - -```bash - --alternative-key-pair-name string key pair name to use if default one generates conflicts - --authorize-access authorize CLI to create cloud resources - --avalanchego-version-from-subnet string install latest avalanchego version, that is compatible with the given Avalanche L1, on node/s - --aws create node/s in AWS cloud - --aws-profile string aws profile to use (default "default") - --custom-avalanchego-version string install given avalanchego version on node/s - --devnet create node/s into a new Devnet - --devnet-api-nodes int number of API nodes(nodes without stake) to create in the new Devnet - --fuji create node/s in Fuji Network - --gcp create node/s in GCP cloud - --gcp-credentials string use given GCP credentials - --gcp-project string use given GCP project --h, --help help for create - --latest-avalanchego-pre-release-version install latest avalanchego pre-release version on node/s - --latest-avalanchego-version install latest avalanchego release version on node/s - --node-type string cloud instance type. Use 'default' to use recommended default instance type - --num-nodes ints number of nodes to create per region(s). Use comma to separate multiple numbers for each region in the same order as --region flag - --region strings create node(s) in given region(s). Use comma to separate multiple regions - --same-monitoring-instance host monitoring for a cloud servers on the same instance - --separate-monitoring-instance host monitoring for all cloud servers on a separate instance - --skip-monitoring don't set up monitoring in created nodes - --ssh-agent-identity string use given ssh identity(only for ssh agent). If not set, default will be used - --use-ssh-agent use ssh agent(ex: Yubikey) for ssh auth - --use-static-ip attach static Public IP on cloud servers (default true) -``` - -### Node Devnet[​](#node-devnet "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node devnet` command suite provides a collection of commands related to devnets. You can check the updated status by calling avalanche node status `` - -### Node Devnet Deploy[​](#node-devnet-deploy "Direct link to heading") - -The `node devnet deploy` command deploys an Avalanche L1 into a devnet cluster, creating Avalanche L1 and blockchain TXs for it. It saves the deploy info both locally and remotely. - -**Usage**: - -```bash -avalanche node devnet deploy [clusterName] [Avalanche L1 Name] [flags] -``` - -**Flags**: - -```bash --h, --help help for list -``` - -### Node Devnet Wiz[​](#node-devnet-wiz "Direct link to heading") - -The `node devnet wiz` command creates a devnet and deploys, sync and validate an Avalanche L1 into it. It creates the Avalanche L1 if so needed. - -**Usage**: - -```bash -avalanche node devnet wiz [clusterName] [blockchainName] [flags] -``` - -**Flags**: - -```bash - --alternative-key-pair-name string key pair name to use if default one generates conflicts - --authorize-access authorize CLI to create cloud resources - --avalanchego-version string install given avalanchego version on node/s - --aws create node/s in AWS cloud - --aws-profile string aws profile to use (default "default") - --chain-config string path to the chain configuration for Avalanche L1 - --custom-subnet use a custom VM as the Avalanche L1 virtual machine - --custom-vm-branch string custom vm branch - --custom-vm-build-script string custom vm build-script - --custom-vm-repo-url string custom vm repository url - --default-validator-params use default weight/start/duration params for Avalanche L1 validator - --devnet-api-nodes int number of API nodes(nodes without stake) to create in the new Devnet - --evm-chain-id uint chain ID to use with Subnet-EVM - --evm-defaults use default settings for fees/airdrop/precompiles with Subnet-EVM - --evm-subnet use Subnet-EVM as the Avalanche L1 virtual machine - --evm-token string token name to use with Subnet-EVM - --evm-version string version of Subnet-EVM to use - --force-subnet-create overwrite the existing Avalanche L1 configuration if one exists - --gcp create node/s in GCP cloud - --gcp-credentials string use given GCP credentials - --gcp-project string use given GCP project --h, --help help for wiz - --latest-avalanchego-pre-release-version install latest avalanchego pre-release version on node/s - --latest-avalanchego-version install latest avalanchego release version on node/s - --latest-evm-version use latest Subnet-EVM released version - --latest-pre-released-evm-version use latest Subnet-EVM pre-released version - --node-config string path to avalanchego node configuration for Avalanche L1 - --node-type string cloud instance type. Use 'default' to use recommended default instance type - --num-nodes ints number of nodes to create per region(s). Use comma to separate multiple numbers for each region in the same order as --region flag - --region strings create node/s in given region(s). Use comma to separate multiple regions - --same-monitoring-instance host monitoring for a cloud servers on the same instance - --separate-monitoring-instance host monitoring for all cloud servers on a separate instance - --skip-monitoring don't set up monitoring in created nodes - --ssh-agent-identity string use given ssh identity(only for ssh agent). If not set, default will be used. - --subnet-config string path to the subnet configuration for Avalanche L1 - --subnet-genesis string file path of the subnet genesis - --use-ssh-agent use ssh agent for ssh - --use-static-ip attach static Public IP on cloud servers (default true) - --validators strings deploy blockchain into given comma separated list of validators. defaults to all cluster nodes -``` - -### Node List[​](#node-list "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node list` command lists all clusters together with their nodes. - -**Usage**: - -```bash -avalanche node list [flags] -``` - -**Flags**: - -```bash --h, --help help for list -``` - -### Node Ssh[​](#node-ssh "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node ssh` command execute a given command using ssh on all nodes in the cluster. If no command is given, just prints the ssh command line to be used to connect to each node. - -**Usage**: - -```bash -avalanche node ssh [clusterName] [flags] -``` - -**Flags**: - -```bash --h, --help help for status -``` - -### Node Status[​](#node-status "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node status` command gets the bootstrap status of all nodes in a cluster with the Primary Network. If no cluster is given, defaults to node list behaviour. - -To get the bootstrap status of a node with an Avalanche L1, use the `--subnet` flag. - -**Usage**: - -```bash -avalanche node status [clusterName] [flags] -``` - -**Flags**: - -```bash --h, --help help for status - --subnet string specify the Avalanche L1 the node is syncing with -``` - -### Node Stop[​](#node-stop "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node stop` command stops a running node in cloud server. Note that a stopped node may still incur cloud server storage fees. - -**Usage**: - -```bash -avalanche node stop [clusterName] [flags] -``` - -**Flags**: - -```bash - --authorize-access authorize CLI to release cloud resources - --authorize-remove authorize CLI to remove all local files related to cloud nodes --h, --help help for stop -``` - -### Node Sync[​](#node-sync "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node sync` command enables all nodes in a cluster to be bootstrapped to an Avalanche L1. You can check the Avalanche L1 bootstrap status by calling avalanche `node status --subnet ` - -**Usage**: - -```bash -avalanche node sync [clusterName] [blockchainName] [flags] -``` - -**Flags**: - -```bash --h, --help help for sync -``` - -### Node Update[​](#node-update "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node update` command suite provides a collection of commands for nodes to update their AvalancheGo version or VM version/config. You can check the status after update by calling `avalanche node status` - -#### Node Update Avalanche L1[​](#node-update-avalanche-l1 "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node update subnet` command updates all nodes in a cluster with latest Avalanche L1 configuration and You can check the updated Avalanche L1 bootstrap status by calling avalanche `node status --subnet ` - -**Usage**: - -```bash -avalanche node update Avalanche L1 [clusterName] [blockchainName] [flags] -``` - -**Flags**: - -```bash --h, --help help for Avalanche L1 -``` - -### Node Validate[​](#node-validate "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node validate` command suite provides a collection of commands for nodes to join the Primary Network and Avalanche L1s as validators. If any of the commands is run before the nodes are bootstrapped on the Primary Network, the command will fail. You can check the bootstrap status by calling `avalanche node status `. - -#### Node Validate Primary[​](#node-validate-primary "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node validate primary` command enables all nodes in a cluster to be validators of Primary Network. - -**Usage**: - -```bash -avalanche node validate primary [clusterName] [flags] -``` - -**Flags**: - -```bash --f, --fuji testnet set up validator in fuji (alias to testnet --h, --help help for primary --k, --key string select the key to use [fuji only] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji) - --ledger-addrs strings use the given ledger addresses --m, --mainnet set up validator in mainnet - --stake-amount uint how many AVAX to stake in the validator - --staking-period duration how long validator validates for after start time --t, --testnet fuji set up validator in testnet (alias to fuji) -``` - -#### Node Validate Avalanche L1[​](#node-validate-avalanche-l1 "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node validate subnet` command enables all nodes in a cluster to be validators of an Avalanche L1. If the command is run before the nodes are Primary Network validators, the command will first make the nodes Primary Network validators before making them Avalanche L1 validators. If the command is run before the nodes are bootstrapped on the Primary Network, the command will fail. You can check the bootstrap status by calling `avalanche node status `. If the command is run before the nodes are synced to the Avalanche L1, the command will fail. You can check the Avalanche L1 sync status by calling `avalanche node status --subnet `. - -**Usage**: - -```bash -avalanche node validate Avalanche L1 [clusterName] [blockchainName] [flags] -``` - -**Flags**: - -```bash - --default-validator-params use default weight/start/duration params for Avalanche L1 validator --d, --devnet set up validator in devnet - --endpoint string use the given endpoint for network operations --e, --ewoq use ewoq key [fuji/devnet only] --f, --fuji testnet set up validator in fuji (alias to testnet --h, --help help for Avalanche L1 --k, --key string select the key to use [fuji/devnet only] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) - --ledger-addrs strings use the given ledger addresses --m, --mainnet set up validator in mainnet - --stake-amount uint how many AVAX to stake in the validator - --staking-period duration how long validator validates for after start time - --start-time string UTC start time when this validator starts validating, in 'YYYY-MM-DD HH:MM:SS' format --t, --testnet fuji set up validator in testnet (alias to fuji) -``` - -### Node Whitelist[​](#node-whitelist "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node whitelist` command suite provides a collection of tools for granting access to the cluster. - -Nodes created by `Avalanche-CLI` are protected by Cloud Security Group and only defined IP addresses are allowed to access. User IP is whitelisted automatically when cluster is created, but this command can be used in case of IP address changes or granting access to additional IPs. This command detects user current IP address automatically if no IP address is provided. - -Secure SSH protocol is used to communicate with cloud instances. `node whitelist` command authorizes SSH public key on all nodes in the cluster if --ssh params is specified. Please keep your SSH private keys safe and secure, only share public keys to grant shell access to cloud instances running `avalanchego`. - -**Usage**: - -```bash -avalanche node whitelist [--ip ] [--ssh ""] [flags] -``` - -**Flags**: - -```bash - -h, --help help for whitelist - --ip string ip address to whitelist - --ssh string ssh public key to whitelist -``` - -### Node Export[​](#node-export "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node export` command exports cluster configuration including their nodes to a text file. If no file is specified, the configuration is printed to the stdout. Use `--include-secrets` to include keys in the export. In this case this command can be used to backup your cluster configuration. Please keep the file secure as it contains sensitive information. - -Exported cluster configuration without secrets it can be imported by another user using `node import` command. - -**Usage**: - -```bash -avalanche node export [clusterName] [flags] -``` - -**Flags**: - -```bash - --file string specify the file to export the cluster configuration to - --force overwrite the file if it exists - -h, --help help for export - --include-secrets include keys in the export -``` - -### Node Import[​](#node-import "Direct link to heading") - -The `node import` command imports cluster configuration and cluster nodes from a text file. This file should be created using the `node export` command. - -This command is useful with `node whitelist` command. With your SSH public key and IP whitelisted by cluster owner you will be able to execute commands and use `avalanche-cli` to manage this cluster. Please note, that this imported cluster will be considered as EXTERNAL by `avalanche-cli` so some commands affecting cloud nodes like `node create` or `node destroy` will be not applicable for it. - -**Usage**: - -```bash -avalanche node import [clusterName] [flags] -``` - -**Flags**: -```bash - --file string specify the file to export the cluster configuration to - -h, --help help for import -``` - -### Node Resize[​](#node-resize "Direct link to heading") - - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node resize` command can be used to resize cluster instance size and/or size of the cloud persistent storage attached to the instance. In another words, it can change amount of CPU, memory and disk space available for the cluster nodes. - -Please note that disk resize operation can affect disk performance during cloud operation to resize it. Please note that instance resize operation will replace cluster instances one by one, which might affect cluster stability. - -**Usage**: - -```bash -avalanche node resize [clusterName] [flags] -``` - -**Flags**: - -```bash - --aws-profile string aws profile to use (default "default") - --disk-size string Disk size to resize in Gb (e.g. 1000Gb) - -h, --help help for resize - --node-type string Node type to resize (e.g. t3.2xlarge) -``` - -Network[​](#network "Direct link to heading") ---------------------------------------------- - -The `network` command suite provides a collection of tools for managing local Avalanche L1 deployments. - -When you deploy an Avalanche L1 locally, it runs on a local, multi-node Avalanche network. The `blockchain deploy` command starts this network in the background. This command suite allows you to shutdown, restart, and clear that network. - -This network currently supports multiple, concurrently deployed Avalanche L1s. - -### Network Clean[​](#network-clean "Direct link to heading") - -The `network clean` command shuts down your local, multi-node network. All deployed Avalanche L1s shutdown and delete their state. You can restart the network by deploying a new Avalanche L1 configuration. - -**Usage**: - -```bash -avalanche network clean [flags] -``` - -**Flags**: - -```bash - --hard Also clean downloaded avalanchego and plugin binaries --h, --help help for clean -``` - -### Network Start[​](#network-start "Direct link to heading") - -The `network start` command starts a local, multi-node Avalanche network on your machine. - -By default, the command loads the default snapshot. If you provide the `--snapshot-name` flag, the network loads that snapshot instead. The command fails if the local network is already running. - -**Usage**: - -```bash -avalanche network start [flags] -``` - -**Flags**: - -```bash - --avalanchego-path string use this avalanchego binary path - --avalanchego-version string use this version of avalanchego (ex: v1.17.12) (default "latest") --h, --help help for start - --snapshot-name string name of snapshot to use to start the network from (default "default-1654102509") -``` - -### Network Status[​](#network-status "Direct link to heading") - -The `network status` command prints whether or not a local Avalanche network is running and some basic stats about the network. - -**Usage**: - -```bash -avalanche network status [flags] -``` - -**Flags**: - -```bash --h, --help help for status -``` - -### Network Stop[​](#network-stop "Direct link to heading") - -The `network stop` command shuts down your local, multi-node network. - -All deployed Avalanche L1s shutdown gracefully and save their state. If you provide the `--snapshot-name` flag, the network saves its state under this named snapshot. You can reload this snapshot with `network start --snapshot-name `. Otherwise, the network saves to the default snapshot, overwriting any existing state. You can reload the default snapshot with `network start`. - -**Usage**: - -```bash -avalanche network stop [flags] -``` - -**Flags**: - -```bash --h, --help help for stop - --snapshot-name string name of snapshot to use to save network state into (default "default-1654102509") -``` - -Transaction[​](#transaction "Direct link to heading") ------------------------------------------------------ - -The `transaction` command suite provides all of the utilities required to sign multisig transactions. - -### Transaction Commit[​](#transaction-commit "Direct link to heading") - -The `transaction commit` command commits a transaction by submitting it to the P-Chain. - -**Usage**: - -```bash -avalanche transaction commit [blockchainName] [flags] -``` - -**Flags**: - -```bash --h, --help help for commit - --input-tx-filepath string Path to the transaction signed by all signatories -``` - -### Transaction Sign[​](#transaction-sign "Direct link to heading") - -The `transaction sign` command signs a multisig transaction. - -**Usage**: - -```bash -avalanche transaction sign [blockchainName] [flags] -``` - -**Flags**: - -```bash --h, --help help for sign - --input-tx-filepath string Path to the transaction file for signing --k, --key string select the key to use [fuji only] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji) - --ledger-addrs strings use the given ledger addresses -``` - -Key[​](#key "Direct link to heading") -------------------------------------- - -The `key` command suite provides a collection of tools for creating and managing signing keys. You can use these keys to deploy Avalanche L1s to the Fuji Testnet, but these keys are NOT suitable to use in production environments. DO NOT use these keys on Mainnet. - -To get started, use the `key create` command. - -### Key Create[​](#key-create "Direct link to heading") - -The `key create` command generates a new private key to use for creating and controlling test Avalanche L1s. Keys generated by this command are NOT cryptographically secure enough to use in production environments. DO NOT use these keys on Mainnet. - -The command works by generating a secp256 key and storing it with the provided `keyName`. You can use this key in other commands by providing this `keyName`. - -If you'd like to import an existing key instead of generating one from scratch, provide the `--file` flag. - -**Usage**: - -```bash -avalanche key create [keyName] [flags] -``` - -**Flags**: - -```bash - --file string import the key from an existing key file --f, --force overwrite an existing key with the same name --h, --help help for create -``` - -### Key Delete[​](#key-delete "Direct link to heading") - -The `key delete` command deletes an existing signing key. - -To delete a key, provide the `keyName`. The command prompts for confirmation before deleting the key. To skip the confirmation, provide the `--force` flag. - -**Usage**: - -```bash -avalanche key delete [keyName] [flags] -``` - -**Flags**: - -```bash --f, --force delete the key without confirmation --h, --help help for delete -``` - -### Key Export[​](#key-export "Direct link to heading") - -The `key export` command exports a created signing key. You can use an exported key in other applications or import it into another instance of Avalanche-CLI. - -By default, the tool writes the hex encoded key to stdout. If you provide the `--output` flag, the command writes the key to a file of your choosing. - -**Usage**: - -```bash -avalanche key export [keyName] [flags] -``` - -**Flags**: - -```bash --h, --help help for export --o, --output string write the key to the provided file path -``` - -### Key List[​](#key-list "Direct link to heading") - -The `key list` command prints information for all stored signing keys or for the ledger addresses associated to certain indices. - -**Usage**: - -```bash -avalanche key list [flags] -``` - -**Flags**: - -```bash --a, --all-networks list all network addresses --c, --cchain list C-Chain addresses (default true) --f, --fuji list testnet (fuji) network addresses --h, --help help for list --g, --ledger uints list ledger addresses for the given indices (default []) --l, --local list local network addresses --m, --mainnet list mainnet network addresses - --pchain list P-Chain addresses (default true) - --subnet string provide balance information for the given Avalanche L1 (Subnet-Evm based only) --t, --testnet list testnet (fuji) network addresses --n, --use-nano-avax use nano Avax for balances - --xchain list X-Chain addresses (default true) -``` - -### Key Transfer[​](#key-transfer "Direct link to heading") - -The `key transfer` command allows to transfer funds between stored keys or ledger addresses. - -**Usage**: - -```bash -avalanche key transfer [options] [flags] -``` - -**Flags**: - -```bash --o, --amount float amount to send or receive (AVAX units) --f, --force avoid transfer confirmation --u, --fuji transfer between testnet (fuji) addresses - --fund-p-chain fund P-Chain account on target - --fund-x-chain fund X-Chain account on target --h, --help help for transfer --k, --key string key associated to the sender or receiver address --i, --ledger uint32 ledger index associated to the sender or receiver address (default 32768) --l, --local transfer between local network addresses --m, --mainnet transfer between mainnet addresses --g, --receive receive the transfer --r, --receive-recovery-step uint receive step to use for multiple step transaction recovery --s, --send send the transfer --a, --target-addr string receiver address --t, --testnet transfer between testnet (fuji) addresses -``` - diff --git a/content/docs/avalanche-l1s/build-first-avalanche-l1.mdx b/content/docs/avalanche-l1s/build-first-avalanche-l1.mdx index 637a7be44b1..a4ef26d13ab 100644 --- a/content/docs/avalanche-l1s/build-first-avalanche-l1.mdx +++ b/content/docs/avalanche-l1s/build-first-avalanche-l1.mdx @@ -47,6 +47,20 @@ The following sections walk through each question in the wizard. Select `SubnetEVM`. +### Choose Your Validator Manager Contract[​](#choose-your-validator-management "Direct link to heading") +Choose either Proof of Authority (PoA) or Proof of Stake (PoS) as your consensus mechanism. + +```bash +? Which validator management type would you like to use in your blockchain?: + ▸ Proof Of Authority + Proof Of Stake + Explain the difference +``` +For this tutorial, select `Proof of Authority (PoA)`. + +For more info, reference the [Validator Management Contracts](/evm-l1s/validator-manager/contract). + + ### Enter Your Avalanche L1's ChainID[​](#enter-your-avalanche-l1s-chainid "Direct link to heading") Choose a positive integer for your EVM-style ChainID. diff --git a/content/docs/tooling/avalanche-cli.mdx b/content/docs/tooling/avalanche-cli.mdx index e939500ac61..d53202e6e94 100644 --- a/content/docs/tooling/avalanche-cli.mdx +++ b/content/docs/tooling/avalanche-cli.mdx @@ -1,1229 +1,3489 @@ --- title: Introduction -description: Avalanche-CLI is a command-line tool that gives developers access to everything Avalanche. +description: Avalanche-CLI is a command-line tool that gives developers access to everything Avalanche. This release specializes in helping developers build and test Subnets. --- +To get started, look at the documentation for the subcommands or jump right in with `avalanche subnet create myNewSubnet`. + +**Commands:** + +- [`blockchain`](#blockchain): The blockchain command suite provides a collection of tools for developing +and deploying Blockchains. + +To get started, use the blockchain create command wizard to walk through the +configuration of your very first Blockchain. Then, go ahead and deploy it +with the blockchain deploy command. You can use the rest of the commands to +manage your Blockchain configurations and live deployments. +- [`config`](#config): Customize configuration for Avalanche-CLI +- [`contract`](#contract): The contract command suite provides a collection of tools for deploying +and interacting with smart contracts. +- [`help`](#help): Help provides help for any command in the application. +Simply type avalanche help [path to command] for full details. +- [`ictt`](#ictt): The ictt command suite provides tools to deploy and manage Interchain Token Transferrers. +- [`interchain`](#interchain): The interchain command suite provides a collection of tools to +set and manage interoperability between blockchains. +- [`key`](#key): The key command suite provides a collection of tools for creating and managing +signing keys. You can use these keys to deploy Subnets to the Fuji Testnet, +but these keys are NOT suitable to use in production environments. DO NOT use +these keys on Mainnet. + +To get started, use the key create command. +- [`network`](#network): The network command suite provides a collection of tools for managing local Subnet +deployments. + +When you deploy a Subnet locally, it runs on a local, multi-node Avalanche network. The +subnet deploy command starts this network in the background. This command suite allows you +to shutdown, restart, and clear that network. + +This network currently supports multiple, concurrently deployed Subnets. +- [`node`](#node): The node command suite provides a collection of tools for creating and maintaining +validators on Avalanche Network. + +To get started, use the node create command wizard to walk through the +configuration to make your node a primary validator on Avalanche public network. You can use the +rest of the commands to maintain your node and make your node a Subnet Validator. +- [`primary`](#primary): The primary command suite provides a collection of tools for interacting with the +Primary Network +- [`subnet`](#subnet): The subnet command suite provides a collection of tools for developing +and deploying Blockchains. + +To get started, use the subnet create command wizard to walk through the +configuration of your very first Blockchain. Then, go ahead and deploy it +with the subnet deploy command. You can use the rest of the commands to +manage your Blockchain configurations and live deployments. + +Deprecation notice: use 'avalanche blockchain' +- [`teleporter`](#teleporter): The teleporter command suite provides a collection of tools for interacting +with Teleporter-Enabled Subnets. +- [`transaction`](#transaction): The transaction command suite provides all of the utilities required to sign multisig transactions. +- [`update`](#update): Check if an update is available, and prompt the user to install it + +## avalanche blockchain + +The blockchain command suite provides a collection of tools for developing +and deploying Blockchains. + +To get started, use the blockchain create command wizard to walk through the +configuration of your very first Blockchain. Then, go ahead and deploy it +with the blockchain deploy command. You can use the rest of the commands to +manage your Blockchain configurations and live deployments. + +**Usage:** `avalanche blockchain [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for blockchain | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`addValidator`](#blockchain-addvalidator): The blockchain addValidator command whitelists a primary network validator to +validate the subnet of the provided deployed Blockchain. + +To add the validator to the Subnet's allow list, you first need to provide +the blockchainName and the validator's unique NodeID. The command then prompts +for the validation start time, duration, and stake weight. You can bypass +these prompts by providing the values with flags. + +This command currently only works on Blockchains deployed to either the Fuji +Testnet or Mainnet. +- [`changeOwner`](#blockchain-changeowner): The blockchain changeOwner changes the owner of the subnet of the deployed Blockchain. +- [`configure`](#blockchain-configure): AvalancheGo nodes support several different configuration files. Subnets have their own +Subnet config which applies to all chains/VMs in the Subnet. Each chain within the Subnet +can have its own chain config. A chain can also have special requirements for the AvalancheGo node +configuration itself. This command allows you to set all those files. +- [`create`](#blockchain-create): The blockchain create command builds a new genesis file to configure your Blockchain. +By default, the command runs an interactive wizard. It walks you through +all the steps you need to create your first Blockchain. + +The tool supports deploying Subnet-EVM, and custom VMs. You +can create a custom, user-generated genesis with a custom VM by providing +the path to your genesis and VM binaries with the --genesis and --vm flags. + +By default, running the command with a blockchainName that already exists +causes the command to fail. If you'd like to overwrite an existing +configuration, pass the -f flag. +- [`delete`](#blockchain-delete): The blockchain delete command deletes an existing blockchain configuration. +- [`deploy`](#blockchain-deploy): The blockchain deploy command deploys your Blockchain configuration locally, to Fuji Testnet, or to Mainnet. + +At the end of the call, the command prints the RPC URL you can use to interact with the Subnet. + +Avalanche-CLI only supports deploying an individual Blockchain once per network. Subsequent +attempts to deploy the same Blockchain to the same network (local, Fuji, Mainnet) aren't +allowed. If you'd like to redeploy a Blockchain locally for testing, you must first call +avalanche network clean to reset all deployed chain state. Subsequent local deploys +redeploy the chain with fresh state. You can deploy the same Blockchain to multiple networks, +so you can take your locally tested Subnet and deploy it on Fuji or Mainnet. +- [`describe`](#blockchain-describe): The blockchain describe command prints the details of a Blockchain configuration to the console. +By default, the command prints a summary of the configuration. By providing the --genesis +flag, the command instead prints out the raw genesis file. +- [`export`](#blockchain-export): The blockchain export command write the details of an existing Blockchain deploy to a file. + +The command prompts for an output path. You can also provide one with +the --output flag. +- [`import`](#blockchain-import): Import blockchain configurations into avalanche-cli. + +This command suite supports importing from a file created on another computer, +or importing from blockchains running public networks +(e.g. created manually or with the deprecated subnet-cli) +- [`join`](#blockchain-join): The subnet join command configures your validator node to begin validating a new Blockchain. + +To complete this process, you must have access to the machine running your validator. If the +CLI is running on the same machine as your validator, it can generate or update your node's +config file automatically. Alternatively, the command can print the necessary instructions +to update your node manually. To complete the validation process, the Subnet's admins must add +the NodeID of your validator to the Subnet's allow list by calling addValidator with your +NodeID. + +After you update your validator's config, you need to restart your validator manually. If +you provide the --avalanchego-config flag, this command attempts to edit the config file +at that path. + +This command currently only supports Blockchains deployed on the Fuji Testnet and Mainnet. +- [`list`](#blockchain-list): The blockchain list command prints the names of all created Blockchain configurations. Without any flags, +it prints some general, static information about the Blockchain. With the --deployed flag, the command +shows additional information including the VMID, BlockchainID and SubnetID. +- [`publish`](#blockchain-publish): The blockchain publish command publishes the Blockchain's VM to a repository. +- [`removeValidator`](#blockchain-removevalidator): The blockchain removeValidator command stops a whitelisted, subnet network validator from +validating your deployed Blockchain. + +To remove the validator from the Subnet's allow list, provide the validator's unique NodeID. You can bypass +these prompts by providing the values with flags. +- [`stats`](#blockchain-stats): The blockchain stats command prints validator statistics for the given Blockchain. +- [`upgrade`](#blockchain-upgrade): The blockchain upgrade command suite provides a collection of tools for +updating your developmental and deployed Blockchains. +- [`validators`](#blockchain-validators): The blockchain validators command lists the validators of a blockchain's subnet and provides +several statistics about them. +- [`vmid`](#blockchain-vmid): The blockchain vmid command prints the virtual machine ID (VMID) for the given Blockchain. + +### addValidator + +The blockchain addValidator command whitelists a primary network validator to +validate the subnet of the provided deployed Blockchain. + +To add the validator to the Subnet's allow list, you first need to provide +the blockchainName and the validator's unique NodeID. The command then prompts +for the validation start time, duration, and stake weight. You can bypass +these prompts by providing the values with flags. + +This command currently only works on Blockchains deployed to either the Fuji +Testnet or Mainnet. + +**Usage:** `avalanche blockchain addValidator [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--default-duration` | set duration so as to validate until primary validator ends its period | +| `--default-start-time` | use default start time for subnet validator (5 minutes later for fuji & mainnet, 30 seconds later for devnet) | +| `--default-validator-params` | use default weight/start/duration params for subnet validator | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-e, --ewoq` | use ewoq key [fuji/devnet only] | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for addValidator | +| `-k, --key` | string select the key to use [fuji/devnet only] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--nodeID` | string set the NodeID of the validator to add | +| `--output-tx-path` | string file path of the add validator tx | +| `--staking-period` | duration how long this validator will be staking | +| `--start-time` | string UTC start time when this validator starts validating, in 'YYYY-MM-DD HH:MM:SS' format | +| `--subnet-auth-keys` | strings control keys that will be used to authenticate add validator tx | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--wait-for-tx-acceptance` | just issue the add validator tx, without waiting for its acceptance (default true) | +| `--weight` | uint set the staking weight of the validator to add | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### changeOwner + +The blockchain changeOwner changes the owner of the subnet of the deployed Blockchain. + +**Usage:** `avalanche blockchain changeOwner [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--control-keys` | strings addresses that may make subnet changes | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-e, --ewoq` | use ewoq key [fuji/devnet] | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for changeOwner | +| `-k, --key` | string select the key to use [fuji/devnet] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--output-tx-path` | string file path of the transfer subnet ownership tx | +| `-s, --same-control-key` | use the fee-paying key as control key | +| `--subnet-auth-keys` | strings control keys that will be used to authenticate transfer subnet ownership tx | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--threshold` | uint32 required number of control key signatures to make subnet changes | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### configure + +AvalancheGo nodes support several different configuration files. Subnets have their own +Subnet config which applies to all chains/VMs in the Subnet. Each chain within the Subnet +can have its own chain config. A chain can also have special requirements for the AvalancheGo node +configuration itself. This command allows you to set all those files. + +**Usage:** `avalanche blockchain configure [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--chain-config` | string path to the chain configuration | +| `-h, --help` | help for configure | +| `--node-config` | string path to avalanchego node configuration | +| `--per-node-chain-config` | string path to per node chain configuration for local network | +| `--subnet-config` | string path to the subnet configuration | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### create + +The blockchain create command builds a new genesis file to configure your Blockchain. +By default, the command runs an interactive wizard. It walks you through +all the steps you need to create your first Blockchain. + +The tool supports deploying Subnet-EVM, and custom VMs. You +can create a custom, user-generated genesis with a custom VM by providing +the path to your genesis and VM binaries with the --genesis and --vm flags. + +By default, running the command with a blockchainName that already exists +causes the command to fail. If you'd like to overwrite an existing +configuration, pass the -f flag. + +**Usage:** `avalanche blockchain create [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--custom` | use a custom VM template | +| `--custom-vm-branch` | string custom vm branch or commit | +| `--custom-vm-build-script` | string custom vm build-script | +| `--custom-vm-path` | string file path of custom vm to use | +| `--custom-vm-repo-url` | string custom vm repository url | +| `--debug` | enable blockchain debugging | +| `--evm` | use the Subnet-EVM as the base template | +| `--evm-chain-id` | uint chain ID to use with Subnet-EVM | +| `--evm-defaults` | deprecation notice: use '--production-defaults' | +| `--evm-token` | string token symbol to use with Subnet-EVM | +| `--external-gas-token` | use a gas token from another blockchain | +| `-f, --force` | overwrite the existing configuration if one exists | +| `--from-github-repo` | generate custom VM binary from github repository | +| `--genesis` | string file path of genesis to use | +| `-h, --help` | help for create | +| `--latest` | use latest Subnet-EVM released version, takes precedence over --vm-version | +| `--pre-release` | use latest Subnet-EVM pre-released version, takes precedence over --vm-version | +| `--production-defaults` | use default production settings for your blockchain | +| `--teleporter` | interoperate with other blockchains using teleporter | +| `--test-defaults` | use default test settings for your blockchain | +| `--vm` | string file path of custom vm to use. alias to custom-vm-path | +| `--vm-version` | string version of Subnet-EVM template to use | +| `--warp` | generate a vm with warp support (needed for teleporter) (default true) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### delete + +The blockchain delete command deletes an existing blockchain configuration. + +**Usage:** `avalanche blockchain delete [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for delete | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### deploy + +The blockchain deploy command deploys your Blockchain configuration locally, to Fuji Testnet, or to Mainnet. + +At the end of the call, the command prints the RPC URL you can use to interact with the Subnet. + +Avalanche-CLI only supports deploying an individual Blockchain once per network. Subsequent +attempts to deploy the same Blockchain to the same network (local, Fuji, Mainnet) aren't +allowed. If you'd like to redeploy a Blockchain locally for testing, you must first call +avalanche network clean to reset all deployed chain state. Subsequent local deploys +redeploy the chain with fresh state. You can deploy the same Blockchain to multiple networks, +so you can take your locally tested Subnet and deploy it on Fuji or Mainnet. + +**Usage:** `avalanche blockchain deploy [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--avalanchego-path` | string use this avalanchego binary path | +| `--avalanchego-version` | string use this version of avalanchego (ex: v1.17.12) (default "latest") | +| `--cluster` | string operate on the given cluster | +| `--control-keys` | strings addresses that may make subnet changes | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-e, --ewoq` | use ewoq key [fuji/devnet deploy only] | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for deploy | +| `-k, --key` | string select the key to use [fuji/devnet deploy only] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--mainnet-chain-id` | uint32 use different ChainID for mainnet deployment | +| `--output-tx-path` | string file path of the blockchain creation tx | +| `-s, --same-control-key` | use the fee-paying key as control key | +| `--skip-local-teleporter` | skip automatic teleporter deploy on local networks [to be deprecated] | +| `--skip-relayer` | skip relayer deploy | +| `--skip-teleporter-deploy` | skip automatic teleporter deploy | +| `--subnet-auth-keys` | strings control keys that will be used to authenticate chain creation | +| `-u, --subnet-id` | string do not create a subnet, deploy the blockchain into the given subnet id | +| `--subnet-only` | only create a subnet | +| `--teleporter-messenger-contract-address-path` | string path to an interchain messenger contract address file | +| `--teleporter-messenger-deployer-address-path` | string path to an interchain messenger deployer address file | +| `--teleporter-messenger-deployer-tx-path` | string path to an interchain messenger deployer tx file | +| `--teleporter-registry-bytecode-path` | string path to an interchain messenger registry bytecode file | +| `--teleporter-version` | string teleporter version to deploy (default "latest") | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--threshold` | uint32 required number of control key signatures to make subnet changes | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### describe + +The blockchain describe command prints the details of a Blockchain configuration to the console. +By default, the command prints a summary of the configuration. By providing the --genesis +flag, the command instead prints out the raw genesis file. + +**Usage:** `avalanche blockchain describe [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-g, --genesis` | Print the genesis to the console directly instead of the summary | +| `-h, --help` | help for describe | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### export + +The blockchain export command write the details of an existing Blockchain deploy to a file. + +The command prompts for an output path. You can also provide one with +the --output flag. + +**Usage:** `avalanche blockchain export [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--custom-vm-branch` | string custom vm branch | +| `--custom-vm-build-script` | string custom vm build-script | +| `--custom-vm-repo-url` | string custom vm repository url | +| `-h, --help` | help for export | +| `-o, --output` | string write the export data to the provided file path | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### import + +Import blockchain configurations into avalanche-cli. + +This command suite supports importing from a file created on another computer, +or importing from blockchains running public networks +(e.g. created manually or with the deprecated subnet-cli) + +**Usage:** `avalanche blockchain import [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for import | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`file`](#import-file): The blockchain import command will import a blockchain configuration from a file or a git repository. + +To import from a file, you can optionally provide the path as a command-line argument. +Alternatively, running the command without any arguments triggers an interactive wizard. +To import from a repository, go through the wizard. By default, an imported Blockchain doesn't +overwrite an existing Blockchain with the same name. To allow overwrites, provide the --force +flag. +- [`public`](#import-public): The blockchain import public command imports a Blockchain configuration from a running network. + +By default, an imported Blockchain +doesn't overwrite an existing Blockchain with the same name. To allow overwrites, provide the --force +flag. + +#### import file + +The blockchain import command will import a blockchain configuration from a file or a git repository. + +To import from a file, you can optionally provide the path as a command-line argument. +Alternatively, running the command without any arguments triggers an interactive wizard. +To import from a repository, go through the wizard. By default, an imported Blockchain doesn't +overwrite an existing Blockchain with the same name. To allow overwrites, provide the --force +flag. + +**Usage:** `avalanche blockchain import file [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--branch` | string the repo branch to use if downloading a new repo | +| `-f, --force` | overwrite the existing configuration if one exists | +| `-h, --help` | help for file | +| `--repo` | string the repo to import (ex: ava-labs/avalanche-plugins-core) or url to download the repo from | +| `--subnet` | string the subnet configuration to import from the provided repo | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +#### import public + +The blockchain import public command imports a Blockchain configuration from a running network. + +By default, an imported Blockchain +doesn't overwrite an existing Blockchain with the same name. To allow overwrites, provide the --force +flag. + +**Usage:** `avalanche blockchain import public [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--blockchain-id` | string the blockchain ID | +| `--cluster` | string operate on the given cluster | +| `--custom` | use a custom VM template | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `--evm` | import a subnet-evm | +| `--force` | overwrite the existing configuration if one exists | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for public | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--node-url` | string [optional] URL of an already running subnet validator | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### join + +The subnet join command configures your validator node to begin validating a new Blockchain. + +To complete this process, you must have access to the machine running your validator. If the +CLI is running on the same machine as your validator, it can generate or update your node's +config file automatically. Alternatively, the command can print the necessary instructions +to update your node manually. To complete the validation process, the Subnet's admins must add +the NodeID of your validator to the Subnet's allow list by calling addValidator with your +NodeID. + +After you update your validator's config, you need to restart your validator manually. If +you provide the --avalanchego-config flag, this command attempts to edit the config file +at that path. + +This command currently only supports Blockchains deployed on the Fuji Testnet and Mainnet. + +**Usage:** `avalanche blockchain join [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--avalanchego-config` | string file path of the avalanchego config file | +| `--cluster` | string operate on the given cluster | +| `--data-dir` | string path of avalanchego's data dir directory | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `--force-write` | if true, skip to prompt to overwrite the config file | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for join | +| `-k, --key` | string select the key to use [fuji only] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--nodeID` | string set the NodeID of the validator to check | +| `--plugin-dir` | string file path of avalanchego's plugin directory | +| `--print` | if true, print the manual config without prompting | +| `--stake-amount` | uint amount of tokens to stake on validator | +| `--staking-period` | duration how long validator validates for after start time | +| `--start-time` | string start time that validator starts validating | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### list + +The blockchain list command prints the names of all created Blockchain configurations. Without any flags, +it prints some general, static information about the Blockchain. With the --deployed flag, the command +shows additional information including the VMID, BlockchainID and SubnetID. + +**Usage:** `avalanche blockchain list [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--deployed` | show additional deploy information | +| `-h, --help` | help for list | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### publish + +The blockchain publish command publishes the Blockchain's VM to a repository. + +**Usage:** `avalanche blockchain publish [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--alias` | string We publish to a remote repo, but identify the repo locally under a user-provided alias (e.g. myrepo). | +| `--force` | If true, ignores if the subnet has been published in the past, and attempts a forced publish. | +| `-h, --help` | help for publish | +| `--no-repo-path` | string Do not let the tool manage file publishing, but have it only generate the files and put them in the location given by this flag. | +| `--repo-url` | string The URL of the repo where we are publishing | +| `--subnet-file-path` | string Path to the Subnet description file. If not given, a prompting sequence will be initiated. | +| `--vm-file-path` | string Path to the VM description file. If not given, a prompting sequence will be initiated. | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### removeValidator + +The blockchain removeValidator command stops a whitelisted, subnet network validator from +validating your deployed Blockchain. + +To remove the validator from the Subnet's allow list, provide the validator's unique NodeID. You can bypass +these prompts by providing the values with flags. + +**Usage:** `avalanche blockchain removeValidator [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for removeValidator | +| `-k, --key` | string select the key to use [fuji deploy only] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--nodeID` | string set the NodeID of the validator to remove | +| `--output-tx-path` | string file path of the removeValidator tx | +| `--subnet-auth-keys` | strings control keys that will be used to authenticate the removeValidator tx | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### stats + +The blockchain stats command prints validator statistics for the given Blockchain. + +**Usage:** `avalanche blockchain stats [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for stats | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### upgrade + +The blockchain upgrade command suite provides a collection of tools for +updating your developmental and deployed Blockchains. + +**Usage:** `avalanche blockchain upgrade [subcommand] [flags]` -To get started, look at the documentation for the subcommands or jump right in with `avalanche blockchain create myblockchain`. +**Flags:** -[Install Avalanche CLI](/tooling/guides/get-avalanche-cli) +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for upgrade | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`apply`](#upgrade-apply): Apply generated upgrade bytes to running Blockchain nodes to trigger a network upgrade. + +For public networks (Fuji Testnet or Mainnet), to complete this process, +you must have access to the machine running your validator. +If the CLI is running on the same machine as your validator, it can manipulate your node's +configuration automatically. Alternatively, the command can print the necessary instructions +to upgrade your node manually. -Primary[​](#primary "Direct link to heading") ---------------------------------------------- +After you update your validator's configuration, you need to restart your validator manually. +If you provide the --avalanchego-chain-config-dir flag, this command attempts to write the upgrade file at that path. +Refer to https://docs.avax.network/nodes/maintain/chain-config-flags#subnet-chain-configs for related documentation. +- [`export`](#upgrade-export): Export the upgrade bytes file to a location of choice on disk +- [`generate`](#upgrade-generate): The blockchain upgrade generate command builds a new upgrade.json file to customize your Blockchain. It +guides the user through the process using an interactive wizard. +- [`import`](#upgrade-import): Import the upgrade bytes file into the local environment +- [`print`](#upgrade-print): Print the upgrade.json file content +- [`vm`](#upgrade-vm): The blockchain upgrade vm command enables the user to upgrade their Blockchain's VM binary. The command +can upgrade both local Blockchains and publicly deployed Blockchains on Fuji and Mainnet. + +The command walks the user through an interactive wizard. The user can skip the wizard by providing +command line flags. -The `primary` command suite provides a collection of tools for interacting with the Avalanche Primary Network. +#### upgrade apply -### Primary AddValidator +Apply generated upgrade bytes to running Blockchain nodes to trigger a network upgrade. -The `primary addValidator` command adds an Avalanche node as a validator in the Avalanche Primary Network with [AddPermissionlessValidatorTx](/api-reference/standards/guides/banff-changes#addpermissionlessvalidatortx). +For public networks (Fuji Testnet or Mainnet), to complete this process, +you must have access to the machine running your validator. +If the CLI is running on the same machine as your validator, it can manipulate your node's +configuration automatically. Alternatively, the command can print the necessary instructions +to upgrade your node manually. -This command requires the node's BLS key and proof of possession key, more information regarding BLS can be found [here](/api-reference/p-chain/txn-format#proof-of-possession). +After you update your validator's configuration, you need to restart your validator manually. +If you provide the --avalanchego-chain-config-dir flag, this command attempts to write the upgrade file at that path. +Refer to https://docs.avax.network/nodes/maintain/chain-config-flags#subnet-chain-configs for related documentation. -To get a node's BLS key and proof of possession key, call info.getNodeID API as shown [here](/api-reference/info-api#infogetnodeid) +**Usage:** `avalanche blockchain upgrade apply [subcommand] [flags]` -**Usage**: +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--avalanchego-chain-config-dir` | string avalanchego's chain config file directory (default "/Users/owen.wahlgren/.avalanchego/chains") | +| `--config` | create upgrade config for future subnet deployments (same as generate) | +| `--force` | If true, don't prompt for confirmation of timestamps in the past | +| `--fuji` | fuji apply upgrade existing fuji deployment (alias for `testnet`) | +| `-h, --help` | help for apply | +| `--local` | local apply upgrade existing local deployment | +| `--mainnet` | mainnet apply upgrade existing mainnet deployment | +| `--print` | if true, print the manual config without prompting (for public networks only) | +| `--testnet` | testnet apply upgrade existing testnet deployment (alias for `fuji`) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -```bash -avalanche primary addValidator [flags] -``` +#### upgrade export -**Flags**: +Export the upgrade bytes file to a location of choice on disk -```bash - --nodeID string the node ID of the validator --k, --key string select the key to use [fuji deploy only] - --weight uint set the staking weight of the validator - --start-time string UTC start time when this validator starts validating, in 'YYYY-MM-DD HH:MM:SS' format - --staking-period duration how long this validator will be staking - --fuji fuji join on fuji (alias for `testnet`) - --testnet testnet join on testnet (alias for `fuji`) - --mainnet mainnet join on mainnet --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji) - --ledger-addrs strings use the given ledger addresses - --public-key string set the BLS public key of the validator - --proof-of-possession string set the BLS proof of possession of the validator - --delegation-fee uint set the delegation fee (20 000 is equivalent to 2%) -``` +**Usage:** `avalanche blockchain upgrade export [subcommand] [flags]` -Blockchain[​](#avalanche-blockchain "Direct link to heading") -------------------------------------------- +**Flags:** -The `blockchain` command suite provides a collection of tools for developing and deploying Avalanche L1s. +| Flag | Description | +| ---- | ----------- | +| `--force` | If true, overwrite a possibly existing file without prompting | +| `-h, --help` | help for export | +| `--upgrade-filepath` | string Export upgrade bytes file to location of choice on disk | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -To get started, use the `blockchain create` command wizard to walk through the configuration of your very first Avalanche L1. Then, go ahead and deploy it with the `blockchain deploy` command. You can use the rest of the commands to manage your Avalanche L1 configurations and live deployments. +#### upgrade generate -### Add Validator +The blockchain upgrade generate command builds a new upgrade.json file to customize your Blockchain. It +guides the user through the process using an interactive wizard. -The `blockchain addValidator` command whitelists a primary network validator to validate the provided deployed Avalanche L1. +**Usage:** `avalanche blockchain upgrade generate [subcommand] [flags]` -To add the validator to the Avalanche L1's allow list, you first need to provide the blockchainName and the validator's unique NodeID. The command then prompts for the validation start time, duration, and stake weight. You can bypass these prompts by providing the values with flags. +**Flags:** -This command currently only works on Avalanche L1s deployed to either the Fuji Testnet or Mainnet. +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for generate | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -**Usage**: +#### upgrade import -```bash -avalanche blockchain addValidator [blockchainName] [flags] -``` +Import the upgrade bytes file into the local environment -**Flags**: +**Usage:** `avalanche blockchain upgrade import [subcommand] [flags]` -```bash - --default-validator-params use default weight/start/duration params for subnet validator - --devnet devnet add subnet validator on devnet - --endpoint string use the given endpoint for network operations --e, --ewoq use ewoq key [fuji/devnet only] - --fuji fuji add subnet validator on fuji (alias for `testnet`) --h, --help help for addValidator --k, --key string select the key to use [fuji/devnet only] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) - --ledger-addrs strings use the given ledger addresses - --local local add subnet validator on local - --mainnet mainnet add subnet validator on mainnet - --nodeID string set the NodeID of the validator to add - --output-tx-path string file path of the add validator tx - --staking-period duration how long this validator will be staking - --start-time string UTC start time when this validator starts validating, in 'YYYY-MM-DD HH:MM:SS' format - --subnet-auth-keys strings control keys that will be used to authenticate add validator tx - --testnet testnet add subnet validator on testnet (alias for `fuji`) - --weight uint set the staking weight of the validator to add -``` +**Flags:** -### Remove Validator +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for import | +| `--upgrade-filepath` | string Import upgrade bytes file into local environment | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -This command removes a node as a validator in an Avalanche L1. +#### upgrade print -**Usage**: +Print the upgrade.json file content -```bash -avalanche blockchain removeValidator [blockchainName] [flags] -``` +**Usage:** `avalanche blockchain upgrade print [subcommand] [flags]` -**Flags**: +**Flags:** -```bash - --fuji remove validator in existing fuji deployment (alias for `testnet`) --k, --key string select the key to use [fuji only] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji) - --ledger-addrs strings use the given ledger addresses - --local remove validator in existing local deployment - --mainnet remove validator in existing mainnet deployment - --nodeID string set the NodeID of the validator to remove - --output-tx-path string file path of the removeValidator tx - --subnet-auth-keys strings control keys that will be used to authenticate removeValidator tx - --testnet remove validator in existing testnet deployment (alias for `fuji`) -``` - -### Change Owner - -The `blockchain changeOwner` changes the owner of the deployed Avalanche L1. - -This command currently only works on Avalanche L1s deployed to Devnet, Fuji or Mainnet. - -**Usage**: - -```bash -avalanche blockchain changeOwner [blockchainName] [flags] -``` - -**Flags**: - -```bash - --control-keys strings addresses that may make subnet changes - --devnet devnet change subnet owner on devnet - --endpoint string use the given endpoint for network operations --e, --ewoq use ewoq key [fuji/devnet] - --fuji fuji change subnet owner on fuji (alias for `testnet`) --h, --help help for changeOwner --k, --key string select the key to use [fuji/devnet] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) - --ledger-addrs strings use the given ledger addresses - --local local change subnet owner on local - --mainnet mainnet change subnet owner on mainnet - --output-tx-path string file path of the transfer subnet ownership tx --s, --same-control-key use the fee-paying key as control key - --subnet-auth-keys strings control keys that will be used to authenticate transfer subnet ownership tx - --testnet testnet change subnet owner on testnet (alias for `fuji`) - --threshold uint32 required number of control key signatures to make subnet changes -``` +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for print | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -### Configure - -AvalancheGo nodes support several different configuration files. Avalanche L1s have their own Avalanche L1 config which applies to all chains/VMs in the Avalanche L1. Each chain within the Avalanche L1 can have its own chain config. This command allows you to set both config files. - -**Usage**: - -```bash -avalanche blockchain configure [blockchainName] [flags] -``` - -**Flags**: - -```bash - --chain-config string path to the chain configuration --h, --help help for configure - --per-node-chain-config string path to per node chain configuration for local network - --subnet-config string path to the subnet configuration -``` - -### Create -The `blockchain create` command builds a new genesis file to configure your Avalanche L1. By default, the command runs an interactive wizard. It walks you through all the steps you need to create your first Avalanche L1. - -The tool supports deploying Subnet-EVM and custom VMs. You can create a custom, user-generated genesis with a custom VM by providing the path to your genesis and VM binaries with the `--genesis` and `--vm` flags. - -By default, running the command with a `blockchainName` that already exists causes the command to fail. If you'd like to overwrite an existing configuration, pass the `-f` flag. - -**Usage**: - -```bash -avalanche blockchain create [blockchainName] [flags] -``` - -**Flags**: - -```bash - --custom use a custom VM template - --custom-vm-branch string custom vm branch - --custom-vm-build-script string custom vm build-script - --custom-vm-path string file path of custom vm to use - --custom-vm-repo-url string custom vm repository url - --evm use the Subnet-EVM as the base template - --evm-chain-id uint chain ID to use with Subnet-EVM - --evm-defaults use default settings for fees/airdrop/precompiles with Subnet-EVM - --evm-token string token name to use with Subnet-EVM --f, --force overwrite the existing configuration if one exists - --from-github-repo generate custom VM binary from github repository - --genesis string file path of genesis to use --h, --help help for create - --latest use latest Subnet-EVM released version, takes precedence over --vm-version - --pre-release use latest Subnet-EVM pre-released version, takes precedence over --vm-version - --relayer run AWM relayer when deploying the vm - --teleporter generate a teleporter-ready vm (default true) - --vm string file path of custom vm to use. alias to custom-vm-path - --vm-version string version of Subnet-EVM template to use - --warp generate a vm with warp support (needed for teleporter) -``` +#### upgrade vm -### Delete +The blockchain upgrade vm command enables the user to upgrade their Blockchain's VM binary. The command +can upgrade both local Blockchains and publicly deployed Blockchains on Fuji and Mainnet. -The `blockchain delete` command deletes an existing Avalanche L1 configuration. +The command walks the user through an interactive wizard. The user can skip the wizard by providing +command line flags. -**Usage**: +**Usage:** `avalanche blockchain upgrade vm [subcommand] [flags]` -```bash -avalanche blockchain delete [flags] -``` +**Flags:** -**Flags**: +| Flag | Description | +| ---- | ----------- | +| `--binary` | string Upgrade to custom binary | +| `--config` | upgrade config for future subnet deployments | +| `--fuji` | fuji upgrade existing fuji deployment (alias for `testnet`) | +| `-h, --help` | help for vm | +| `--latest` | upgrade to latest version | +| `--local` | local upgrade existing local deployment | +| `--mainnet` | mainnet upgrade existing mainnet deployment | +| `--plugin-dir` | string plugin directory to automatically upgrade VM | +| `--print` | print instructions for upgrading | +| `--testnet` | testnet upgrade existing testnet deployment (alias for `fuji`) | +| `--version` | string Upgrade to custom version | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -```bash --h, --help help for delete -``` +### validators -### Deploy +The blockchain validators command lists the validators of a blockchain's subnet and provides +several statistics about them. -The `blockchain deploy` command deploys your Avalanche L1 configuration locally, to Fuji Testnet, or to Mainnet. +**Usage:** `avalanche blockchain validators [subcommand] [flags]` -At the end of the call, the command prints the RPC URL you can use to interact with the Avalanche L1. +**Flags:** -Avalanche-CLI only supports deploying an individual Avalanche L1 once per network. Subsequent attempts to deploy the same Avalanche L1 to the same network (local, Fuji, Mainnet) aren't allowed. If you'd like to redeploy an Avalanche L1 locally for testing, you must first call [avalanche network clean](#network-clean) to reset all deployed chain state. Subsequent local deploys redeploy the chain with fresh state. You can deploy the same Avalanche L1 to multiple networks, so you can take your locally tested Avalanche L1 and deploy it on Fuji or Mainnet. +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for validators | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -**Usage**: +### vmid -```bash -avalanche blockchain deploy [blockchainName] [flags] -``` +The blockchain vmid command prints the virtual machine ID (VMID) for the given Blockchain. -**Flags**: +**Usage:** `avalanche blockchain vmid [subcommand] [flags]` -```bash - --avalanchego-path string use this avalanchego binary path - --avalanchego-version string use this version of avalanchego (ex: v1.17.12) (default "latest") - --control-keys strings addresses that may make subnet changes - --devnet deploy to a devnet network - --endpoint string use the given endpoint for network operations --e, --ewoq use ewoq key [fuji/devnet deploy only] --f, --fuji testnet deploy to fuji (alias to testnet --h, --help help for deploy --k, --key string select the key to use [fuji/devnet deploy only] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) - --ledger-addrs strings use the given ledger addresses --l, --local deploy to a local network --m, --mainnet deploy to mainnet - --mainnet-chain-id string use different ChainID for mainnet deployment - --output-tx-path string file path of the blockchain creation tx --s, --same-control-key use creation key as control key - --subnet-auth-keys strings control keys that will be used to authenticate chain creation --u, --subnet-id string deploy into given subnet id --t, --testnet fuji deploy to testnet (alias to fuji) - --threshold uint32 required number of control key signatures to make subnet changes -``` +**Flags:** -### Describe +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for vmid | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -The `blockchain describe` command prints the details of an Avalanche L1 configuration to the console. By default, the command prints a summary of the configuration. By providing the `--genesis` flag, the command instead prints out the raw genesis file. +## avalanche config -**Usage**: +Customize configuration for Avalanche-CLI -```bash -avalanche blockchain describe [blockchainName] [flags] -``` +**Usage:** `avalanche config [subcommand] [flags]` -**Flags**: +**Flags:** -```bash --g, --genesis Print the genesis to the console directly instead of the summary --h, --help help for describe -``` +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for config | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -### Export +**Subcommands:** -The `blockchain export` command write the details of an existing Avalanche L1 deploy to a file. +- [`authorize-cloud-access`](#config-authorize-cloud-access): set preferences to authorize access to cloud resources +- [`metrics`](#config-metrics): set user metrics collection preferences +- [`migrate`](#config-migrate): migrate command migrates old ~/.avalanche-cli.json and ~/.avalanche-cli/config to /.avalanche-cli/config.json.. +- [`singleNode`](#config-singlenode): set user preference between single node and five nodes local network +- [`snapshotsAutoSave`](#config-snapshotsautosave): set user preference between auto saving local network snapshots or not -The command prompts for an output path. You can also provide one with the `--output` flag. +### authorize-cloud-access -**Usage**: +set preferences to authorize access to cloud resources -```bash -avalanche blockchain export [blockchainName] [flags] -``` +**Usage:** `avalanche config authorize-cloud-access [subcommand] [flags]` -**Flags**: +**Flags:** -```bash --h, --help help for export --o, --output string write the export data to the provided file path -``` +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for authorize-cloud-access | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -### Import +### metrics -The `blockchain import` command imports configurations into Avalanche-CLI. +set user metrics collection preferences -This command supports importing from a file created on another computer, or importing from Avalanche L1s running public networks (for example, created manually or with the deprecated Avalanche-CLI) +**Usage:** `avalanche config metrics [subcommand] [flags]` -#### Import from a File +**Flags:** -To import from a file, you can optionally provide the path as a command-line argument. Alternatively, running the command without any arguments triggers an interactive wizard. To import from a repository, go through the wizard. By default, an imported Avalanche L1 doesn't overwrite an existing Avalanche L1 with the same name. To allow overwrites, provide the `--force` flag. +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for metrics | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -**Usage**: +### migrate -```bash -avalanche blockchain import file [blockchainPath] [flags] -``` +migrate command migrates old ~/.avalanche-cli.json and ~/.avalanche-cli/config to /.avalanche-cli/config.json.. -**Flags**: +**Usage:** `avalanche config migrate [subcommand] [flags]` -```bash - --branch string the repo branch to use if downloading a new repo --f, --force overwrite the existing configuration if one exists --h, --help help for import - --repo string the repo to import (ex: ava-labs/avalanche-plugins-core) or url to download the repo from - --subnet string the subnet configuration to import from the provided repo -``` +**Flags:** -#### Import from a Public Network +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for migrate | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -The `blockchain import public` command imports an Avalanche L1 configuration from a running network. +### singleNode -The genesis file should be available from the disk for this to work. By default, an imported Avalanche L1 doesn't overwrite an existing Avalanche L1 with the same name. To allow overwrites, provide the `--force` flag. +set user preference between single node and five nodes local network -**Usage**: +**Usage:** `avalanche config singleNode [subcommand] [flags]` -```bash -avalanche blockchain import public [blockchainPath] [flags] -``` +**Flags:** -**Flags**: +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for singleNode | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -```bash - --custom use a custom VM template - --evm import a subnet-evm --f, --force overwrite the existing configuration if one exists - --fuji fuji import from fuji (alias for `testnet`) - --genesis-file-path string path to the genesis file --h, --help help for public - --mainnet mainnet import from mainnet - --node-url string [optional] URL of an already running subnet validator - --subnet-id string the subnet ID - --testnet testnet import from testnet (alias for `fuji`) +### snapshotsAutoSave -``` +set user preference between auto saving local network snapshots or not -### Join +**Usage:** `avalanche config snapshotsAutoSave [subcommand] [flags]` -The `blockchain join` command configures your validator node to begin validating a new Avalanche L1. +**Flags:** -To complete this process, you must have access to the machine running your validator. If the CLI is running on the same machine as your validator, it can generate or update your node's config file automatically. Alternatively, the command can print the necessary instructions to update your node manually. To complete the validation process, the Avalanche L1's admins must add the NodeID of your validator to the Avalanche L1's allow list by calling `addValidator` with your NodeID. +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for snapshotsAutoSave | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -After you update your validator's config, you need to restart your validator manually. If you provide the `--avalanchego-config` flag, this command attempts to edit the config file at that path. +## avalanche contract -This command currently only supports Avalanche L1s deployed on the Fuji Testnet and Mainnet. +The contract command suite provides a collection of tools for deploying +and interacting with smart contracts. -**Usage**: +**Usage:** `avalanche contract [subcommand] [flags]` -```bash -avalanche blockchain join [blockchainName] [flags] -``` +**Flags:** -**Flags**: +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for contract | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -```bash - --avalanchego-config string file path of the avalanchego config file - --fail-if-not-validating fail if whitelist check fails - --force-whitelist-check if true, force the whitelist check - --force-write if true, skip to prompt to overwrite the config file - --fuji fuji join on fuji (alias for `testnet`) --h, --help help for join - --mainnet mainnet join on mainnet - --nodeID string set the NodeID of the validator to check - --plugin-dir string file path of avalanchego's plugin directory - --print if true, print the manual config without prompting - --skip-whitelist-check if true, skip the whitelist check - --testnet testnet join on testnet (alias for `fuji`) -``` +**Subcommands:** -### List +- [`deploy`](#contract-deploy): The contract command suite provides a collection of tools for deploying +smart contracts. -The `blockchain list` command prints the names of all created Avalanche L1 configurations. Without any flags, it prints some general, static information about the Avalanche L1. With the `--deployed` flag, the command shows additional information including the VMID, BlockchainID and SubnetID. +### deploy -**Usage**: +The contract command suite provides a collection of tools for deploying +smart contracts. -```bash -avalanche blockchain list [flags] -``` +**Usage:** `avalanche contract deploy [subcommand] [flags]` -**Flags**: +**Flags:** -```bash - --deployed show additional deploy information --h, --help help for list -``` +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for deploy | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -### Publish +**Subcommands:** -The `blockchain publish` command publishes the Avalanche L1's VM to a repository. +- [`erc20`](#deploy-erc20): Deploy an ERC20 token into a given Network and Blockchain -**Usage**: +#### deploy erc20 -```bash -avalanche blockchain publish [blockchainName] [flags] -``` +Deploy an ERC20 token into a given Network and Blockchain -**Flags**: +**Usage:** `avalanche contract deploy erc20 [subcommand] [flags]` -```bash - --alias string We publish to a remote repo, but identify the repo locally under a user-provided alias (e.g. myrepo). - --force If true, ignores if the subnet has been published in the past, and attempts a forced publish. --h, --help help for publish - --no-repo-path string Do not let the tool manage file publishing, but have it only generate the files and put them in the location given by this flag. - --repo-url string The URL of the repo where we are publishing - --subnet-file-path string Path to the Subnet description file. If not given, a prompting sequence will be initiated. - --vm-file-path string Path to the VM description file. If not given, a prompting sequence will be initiated. -``` +**Flags:** -### Stats +| Flag | Description | +| ---- | ----------- | +| `--blockchain` | string deploy the ERC20 contract into the given CLI blockchain | +| `--blockchain-id` | string deploy the ERC20 contract into the given blockchain ID/Alias | +| `--c-chain` | deploy the ERC20 contract into C-Chain | +| `--cluster` | string operate on the given cluster | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `--funded` | string set the funded address | +| `--genesis-key` | use genesis allocated key as contract deployer | +| `-h, --help` | help for erc20 | +| `--key` | string CLI stored key to use as contract deployer | +| `-l, --local` | operate on a local network | +| `--private-key` | string private key to use as contract deployer | +| `--rpc` | string deploy the contract into the given rpc endpoint | +| `--subnet` | string deploy the ERC20 contract into the given CLI blockchain | +| `--supply` | uint set the token supply | +| `--symbol` | string set the token symbol | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -The `blockchain stats` command prints validator statistics for the given Avalanche L1. +## avalanche help -**Usage**: +Help provides help for any command in the application. +Simply type avalanche help [path to command] for full details. -```bash -avalanche blockchain stats [blockchainName] [flags] -``` +**Usage:** `avalanche help [subcommand] [flags]` -**Flags**: +**Flags:** -```bash - --fuji fuji print stats on fuji (alias for `testnet`) --h, --help help for stats - --mainnet mainnet print stats on mainnet - --testnet testnet print stats on testnet (alias for `fuji`) -``` +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for help | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -### VMID +## avalanche ictt -The `blockchain vmid` command prints the virtual machine ID (VMID) for the given Avalanche L1. +The ictt command suite provides tools to deploy and manage Interchain Token Transferrers. -**Usage**: +**Usage:** `avalanche ictt [subcommand] [flags]` -```bash -avalanche blockchain vmid [blockchainName] -``` +**Flags:** -Blockchain Upgrade[​](#avalanche-blockchain-upgrade "Direct link to heading") ------------------------------------------------------------ +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for ictt | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -The `blockchain upgrade` command suite provides a collection of tools for updating your developmental and deployed Avalanche L1s. +**Subcommands:** -### Apply +- [`deploy`](#ictt-deploy): Deploys a Token Transferrer into a given Network and Subnets -Apply generated upgrade bytes to running Avalanche L1 nodes to trigger a network upgrade. +### deploy -For public networks (Fuji Testnet or Mainnet), to complete this process, you must have access to the machine running your validator. If the CLI is running on the same machine as your validator, it can manipulate your node's configuration automatically. Alternatively, the command can print the necessary instructions to upgrade your node manually. +Deploys a Token Transferrer into a given Network and Subnets -After you update your validator's configuration, you need to restart your validator manually. If you provide the `--avalanchego-chain-config-dir` flag, this command attempts to write the upgrade file at that path. Refer to [this doc](/nodes/configure/configs-flags#avalanche-l1-chain-configs) for related documentation. +**Usage:** `avalanche ictt deploy [subcommand] [flags]` -**Usage**: +**Flags:** -```bash -avalanche blockchain upgrade apply [blockchainName] [flags] -``` +| Flag | Description | +| ---- | ----------- | +| `--c-chain-home` | set the Transferrer's Home Chain into C-Chain | +| `--c-chain-remote` | set the Transferrer's Remote Chain into C-Chain | +| `--cluster` | string operate on the given cluster | +| `--deploy-erc20-home` | string deploy a Transferrer Home for the given Chain's ERC20 Token | +| `--deploy-native-home` | deploy a Transferrer Home for the Chain's Native Token | +| `--deploy-native-remote` | deploy a Transferrer Remote for the Chain's Native Token | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for deploy | +| `--home-blockchain` | string set the Transferrer's Home Chain into the given CLI blockchain | +| `--home-genesis-key` | use genesis allocated key to deploy Transferrer Home | +| `--home-key` | string CLI stored key to use to deploy Transferrer Home | +| `--home-private-key` | string private key to use to deploy Transferrer Home | +| `--home-rpc` | string use the given RPC URL to connect to the home blockchain | +| `-l, --local` | operate on a local network | +| `--remote-blockchain` | string set the Transferrer's Remote Chain into the given CLI blockchain | +| `--remote-genesis-key` | use genesis allocated key to deploy Transferrer Remote | +| `--remote-key` | string CLI stored key to use to deploy Transferrer Remote | +| `--remote-private-key` | string private key to use to deploy Transferrer Remote | +| `--remote-rpc` | string use the given RPC URL to connect to the remote blockchain | +| `--remote-token-decimals` | uint8 use the given number of token decimals for the Transferrer Remote [defaults to token home's decimals (18 for a new wrapped native home token)] | +| `--remove-minter-admin` | remove the native minter precompile admin found on remote blockchain genesis | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--use-home` | string use the given Transferrer's Home Address | +| `--version` | string tag/branch/commit of Avalanche Interchain Token Transfer (ICTT) to be used (defaults to main branch) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +## avalanche interchain + +The interchain command suite provides a collection of tools to +set and manage interoperability between blockchains. + +**Usage:** `avalanche interchain [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for interchain | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`tokenTransferrer`](#interchain-tokentransferrer): The tokenTransfer command suite provides tools to deploy and manage Token Transferrers. + +### tokenTransferrer + +The tokenTransfer command suite provides tools to deploy and manage Token Transferrers. + +**Usage:** `avalanche interchain tokenTransferrer [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for tokenTransferrer | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`deploy`](#tokentransferrer-deploy): Deploys a Token Transferrer into a given Network and Subnets -**Flags**: +#### tokenTransferrer deploy -```bash - --avalanchego-chain-config-dir string avalanchego's chain config file directory (default "/Users/connor/.avalanchego/chains") - --config create upgrade config for future subnet deployments (same as generate) - --force If true, don't prompt for confirmation of timestamps in the past - --fuji fuji apply upgrade existing fuji deployment (alias for `testnet`) --h, --help help for apply - --local local apply upgrade existing local deployment - --mainnet mainnet apply upgrade existing mainnet deployment - --print if true, print the manual config without prompting (for public networks only) - --testnet testnet apply upgrade existing testnet deployment (alias for `fuji`) -``` +Deploys a Token Transferrer into a given Network and Subnets + +**Usage:** `avalanche interchain tokenTransferrer deploy [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--c-chain-home` | set the Transferrer's Home Chain into C-Chain | +| `--c-chain-remote` | set the Transferrer's Remote Chain into C-Chain | +| `--cluster` | string operate on the given cluster | +| `--deploy-erc20-home` | string deploy a Transferrer Home for the given Chain's ERC20 Token | +| `--deploy-native-home` | deploy a Transferrer Home for the Chain's Native Token | +| `--deploy-native-remote` | deploy a Transferrer Remote for the Chain's Native Token | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for deploy | +| `--home-blockchain` | string set the Transferrer's Home Chain into the given CLI blockchain | +| `--home-genesis-key` | use genesis allocated key to deploy Transferrer Home | +| `--home-key` | string CLI stored key to use to deploy Transferrer Home | +| `--home-private-key` | string private key to use to deploy Transferrer Home | +| `--home-rpc` | string use the given RPC URL to connect to the home blockchain | +| `-l, --local` | operate on a local network | +| `--remote-blockchain` | string set the Transferrer's Remote Chain into the given CLI blockchain | +| `--remote-genesis-key` | use genesis allocated key to deploy Transferrer Remote | +| `--remote-key` | string CLI stored key to use to deploy Transferrer Remote | +| `--remote-private-key` | string private key to use to deploy Transferrer Remote | +| `--remote-rpc` | string use the given RPC URL to connect to the remote blockchain | +| `--remote-token-decimals` | uint8 use the given number of token decimals for the Transferrer Remote [defaults to token home's decimals (18 for a new wrapped native home token)] | +| `--remove-minter-admin` | remove the native minter precompile admin found on remote blockchain genesis | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--use-home` | string use the given Transferrer's Home Address | +| `--version` | string tag/branch/commit of Avalanche Interchain Token Transfer (ICTT) to be used (defaults to main branch) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +## avalanche key -### Export +The key command suite provides a collection of tools for creating and managing +signing keys. You can use these keys to deploy Subnets to the Fuji Testnet, +but these keys are NOT suitable to use in production environments. DO NOT use +these keys on Mainnet. -Export the upgrade bytes file to a location of choice on disk. +To get started, use the key create command. -**Usage**: +**Usage:** `avalanche key [subcommand] [flags]` -```bash -avalanche blockchain upgrade export [blockchainName] [flags] -``` +**Flags:** -**Flags**: +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for key | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -```bash - --force If true, overwrite a possibly existing file without prompting --h, --help help for export - --upgrade-filepath string Export upgrade bytes file to location of choice on disk -``` +**Subcommands:** -### Generate +- [`create`](#key-create): The key create command generates a new private key to use for creating and controlling +test Subnets. Keys generated by this command are NOT cryptographically secure enough to +use in production environments. DO NOT use these keys on Mainnet. -The `blockchain upgrade generate` command builds a new upgrade.json file to customize your Avalanche L1. It guides the user through the process using an interactive wizard. +The command works by generating a secp256 key and storing it with the provided keyName. You +can use this key in other commands by providing this keyName. -**Usage**: +If you'd like to import an existing key instead of generating one from scratch, provide the +--file flag. +- [`delete`](#key-delete): The key delete command deletes an existing signing key. -```bash -avalanche blockchain upgrade generate [blockchainName] [flags] -``` +To delete a key, provide the keyName. The command prompts for confirmation +before deleting the key. To skip the confirmation, provide the --force flag. +- [`export`](#key-export): The key export command exports a created signing key. You can use an exported key in other +applications or import it into another instance of Avalanche-CLI. + +By default, the tool writes the hex encoded key to stdout. If you provide the --output +flag, the command writes the key to a file of your choosing. +- [`list`](#key-list): The key list command prints information for all stored signing +keys or for the ledger addresses associated to certain indices. +- [`transfer`](#key-transfer): The key transfer command allows to transfer funds between stored keys or ledger addresses. + +### create + +The key create command generates a new private key to use for creating and controlling +test Subnets. Keys generated by this command are NOT cryptographically secure enough to +use in production environments. DO NOT use these keys on Mainnet. + +The command works by generating a secp256 key and storing it with the provided keyName. You +can use this key in other commands by providing this keyName. + +If you'd like to import an existing key instead of generating one from scratch, provide the +--file flag. + +**Usage:** `avalanche key create [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--file` | string import the key from an existing key file | +| `-f, --force` | overwrite an existing key with the same name | +| `-h, --help` | help for create | +| `--skip-balances` | do not query public network balances for an imported key | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### delete + +The key delete command deletes an existing signing key. + +To delete a key, provide the keyName. The command prompts for confirmation +before deleting the key. To skip the confirmation, provide the --force flag. + +**Usage:** `avalanche key delete [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-f, --force` | delete the key without confirmation | +| `-h, --help` | help for delete | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### export + +The key export command exports a created signing key. You can use an exported key in other +applications or import it into another instance of Avalanche-CLI. + +By default, the tool writes the hex encoded key to stdout. If you provide the --output +flag, the command writes the key to a file of your choosing. + +**Usage:** `avalanche key export [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for export | +| `-o, --output` | string write the key to the provided file path | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### list + +The key list command prints information for all stored signing +keys or for the ledger addresses associated to certain indices. + +**Usage:** `avalanche key list [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-a, --all-networks` | list all network addresses | +| `--blockchains` | strings blockchains to show information about (p=p-chain, x=x-chain, c=c-chain, and blockchain names) (default p,x,c) | +| `-c, --cchain` | list C-Chain addresses (default true) | +| `--cluster` | string operate on the given cluster | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for list | +| `--keys` | strings list addresses for the given keys | +| `-g, --ledger` | uints list ledger addresses for the given indices (default []) | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--pchain` | list P-Chain addresses (default true) | +| `--subnets` | strings subnets to show information about (p=p-chain, x=x-chain, c=c-chain, and subnet names) (default p,x,c) | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--tokens` | strings provide balance information for the given token contract addresses (Evm only) (default [Native]) | +| `--use-gwei` | use gwei for EVM balances | +| `-n, --use-nano-avax` | use nano Avax for balances | +| `--xchain` | list X-Chain addresses (default true) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### transfer + +The key transfer command allows to transfer funds between stored keys or ledger addresses. + +**Usage:** `avalanche key transfer [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-o, --amount` | float amount to send or receive (AVAX or TOKEN units) | +| `--cluster` | string operate on the given cluster | +| `-a, --destination-addr` | string destination address | +| `--destination-key` | string key associated to a destination address | +| `--destination-subnet` | string subnet where the funds will be sent (token transferrer experimental) | +| `--destination-transferrer-address` | string token transferrer address at the destination subnet (token transferrer experimental) | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `--force` | avoid transfer confirmation | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `--fund-p-chain` | fund P-Chain account on destination | +| `--fund-x-chain` | fund X-Chain account on destination | +| `-h, --help` | help for transfer | +| `-k, --key` | string key associated to the sender or receiver address | +| `-i, --ledger` | uint32 ledger index associated to the sender or receiver address (default 32768) | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--origin-subnet` | string subnet where the funds belong (token transferrer experimental) | +| `--origin-transferrer-address` | string token transferrer address at the origin subnet (token transferrer experimental) | +| `-g, --receive` | receive the transfer | +| `-r, --receive-recovery-step` | uint receive step to use for multiple step transaction recovery | +| `-s, --send` | send the transfer | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +## avalanche network + +The network command suite provides a collection of tools for managing local Subnet +deployments. + +When you deploy a Subnet locally, it runs on a local, multi-node Avalanche network. The +subnet deploy command starts this network in the background. This command suite allows you +to shutdown, restart, and clear that network. + +This network currently supports multiple, concurrently deployed Subnets. + +**Usage:** `avalanche network [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for network | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`clean`](#network-clean): The network clean command shuts down your local, multi-node network. All deployed Subnets +shutdown and delete their state. You can restart the network by deploying a new Subnet +configuration. +- [`start`](#network-start): The network start command starts a local, multi-node Avalanche network on your machine. + +By default, the command loads the default snapshot. If you provide the --snapshot-name +flag, the network loads that snapshot instead. The command fails if the local network is +already running. +- [`status`](#network-status): The network status command prints whether or not a local Avalanche +network is running and some basic stats about the network. +- [`stop`](#network-stop): The network stop command shuts down your local, multi-node network. + +All deployed Subnets shutdown gracefully and save their state. If you provide the +--snapshot-name flag, the network saves its state under this named snapshot. You can +reload this snapshot with network start --snapshot-name `snapshotName`. Otherwise, the +network saves to the default snapshot, overwriting any existing state. You can reload the +default snapshot with network start. + +### clean + +The network clean command shuts down your local, multi-node network. All deployed Subnets +shutdown and delete their state. You can restart the network by deploying a new Subnet +configuration. + +**Usage:** `avalanche network clean [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--hard` | Also clean downloaded avalanchego and plugin binaries | +| `-h, --help` | help for clean | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### start + +The network start command starts a local, multi-node Avalanche network on your machine. + +By default, the command loads the default snapshot. If you provide the --snapshot-name +flag, the network loads that snapshot instead. The command fails if the local network is +already running. + +**Usage:** `avalanche network start [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--avalanchego-path` | string use this avalanchego binary path | +| `--avalanchego-version` | string use this version of avalanchego (ex: v1.17.12) (default "latest") | +| `-h, --help` | help for start | +| `--snapshot-name` | string name of snapshot to use to start the network from (default "default-1654102509") | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -**Flags**: +### status -```bash --h, --help help for generate -``` +The network status command prints whether or not a local Avalanche +network is running and some basic stats about the network. -### Import +**Usage:** `avalanche network status [subcommand] [flags]` -Import the upgrade bytes file into the local environment. +**Flags:** -**Usage**: +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for status | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -```bash -avalanche blockchain upgrade import [blockchainName] [flags] -``` +### stop -**Flags**: +The network stop command shuts down your local, multi-node network. -```bash --h, --help help for import - --upgrade-filepath string Import upgrade bytes file into local environment -``` +All deployed Subnets shutdown gracefully and save their state. If you provide the +--snapshot-name flag, the network saves its state under this named snapshot. You can +reload this snapshot with network start --snapshot-name `snapshotName`. Otherwise, the +network saves to the default snapshot, overwriting any existing state. You can reload the +default snapshot with network start. -### Print +**Usage:** `avalanche network stop [subcommand] [flags]` -Print the upgrade.json file content. +**Flags:** -**Usage**: +| Flag | Description | +| ---- | ----------- | +| `--dont-save` | do not save snapshot, just stop the network | +| `-h, --help` | help for stop | +| `--snapshot-name` | string name of snapshot to use to save network state into (default "default-1654102509") | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -```bash -avalanche blockchain upgrade print [blockchainName] [flags] -``` +## avalanche node -**Flags**: +The node command suite provides a collection of tools for creating and maintaining +validators on Avalanche Network. -### VM +To get started, use the node create command wizard to walk through the +configuration to make your node a primary validator on Avalanche public network. You can use the +rest of the commands to maintain your node and make your node a Subnet Validator. -The `blockchain upgrade vm` command enables the user to upgrade their Avalanche L1's VM binary. The command can upgrade both local Avalanche L1s and publicly deployed Avalanche L1s on Fuji and Mainnet. +**Usage:** `avalanche node [subcommand] [flags]` -The command walks the user through an interactive wizard. The user can skip the wizard by providing command line flags. +**Flags:** -**Usage**: +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for node | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -```bash -avalanche blockchain upgrade export [blockchainName] [flags] -``` +**Subcommands:** -**Flags**: +- [`addDashboard`](#node-adddashboard): (ALPHA Warning) This command is currently in experimental mode. -```bash - --deployed show additional deploy information --h, --help help for list -``` +The node addDashboard command adds custom dashboard to the Grafana monitoring dashboard for the +cluster. +- [`create`](#node-create): (ALPHA Warning) This command is currently in experimental mode. -Node[​](#node "Direct link to heading") ---------------------------------------- +The node create command sets up a validator on a cloud server of your choice. +The validator will be validating the Avalanche Primary Network and Subnet +of your choice. By default, the command runs an interactive wizard. It +walks you through all the steps you need to set up a validator. +Once this command is completed, you will have to wait for the validator +to finish bootstrapping on the primary network before running further +commands on it, e.g. validating a Subnet. You can check the bootstrapping +status by running avalanche node status -The `node` command suite provides a collection of tools for creating and maintaining validators on the Avalanche Network. +The created node will be part of group of validators called `clusterName` +and users can call node commands with `clusterName` so that the command +will apply to all nodes in the cluster +- [`destroy`](#node-destroy): (ALPHA Warning) This command is currently in experimental mode. -To get started, use the node create command wizard to walk through the configuration to make your node a primary validator on Avalanche public network. You can use the rest of the commands to maintain your node and make your node an Avalanche L1 Validator. +The node destroy command terminates all running nodes in cloud server and deletes all storage disks. -### Create +If there is a static IP address attached, it will be released. +- [`devnet`](#node-devnet): (ALPHA Warning) This command is currently in experimental mode. + +The node devnet command suite provides a collection of commands related to devnets. +You can check the updated status by calling avalanche node status `clusterName` +- [`export`](#node-export): (ALPHA Warning) This command is currently in experimental mode. + +The node export command exports cluster configuration and its nodes config to a text file. + +If no file is specified, the configuration is printed to the stdout. + +Use --include-secrets to include keys in the export. In this case please keep the file secure as it contains sensitive information. + +Exported cluster configuration without secrets can be imported by another user using node import command. +- [`import`](#node-import): (ALPHA Warning) This command is currently in experimental mode. + +The node import command imports cluster configuration and its nodes configuration from a text file +created from the node export command. + +Prior to calling this command, call node whitelist command to have your SSH public key and IP whitelisted by +the cluster owner. This will enable you to use avalanche-cli commands to manage the imported cluster. + +Please note, that this imported cluster will be considered as EXTERNAL by avalanche-cli, so some commands +affecting cloud nodes like node create or node destroy will be not applicable to it. +- [`list`](#node-list): (ALPHA Warning) This command is currently in experimental mode. + +The node list command lists all clusters together with their nodes. +- [`loadtest`](#node-loadtest): (ALPHA Warning) This command is currently in experimental mode. + +The node loadtest command suite starts and stops a load test for an existing devnet cluster. +- [`refresh-ips`](#node-refresh-ips): (ALPHA Warning) This command is currently in experimental mode. + +The node refresh-ips command obtains the current IP for all nodes with dynamic IPs in the cluster, +and updates the local node information used by CLI commands. +- [`resize`](#node-resize): (ALPHA Warning) This command is currently in experimental mode. + +The node resize command can change the amount of CPU, memory and disk space available for the cluster nodes. +- [`scp`](#node-scp): (ALPHA Warning) This command is currently in experimental mode. + +The node scp command securely copies files to and from nodes. Remote source or destionation can be specified using the following format: +[clusterName|nodeID|instanceID|IP]:/path/to/file. Regular expressions are supported for the source files like /tmp/*.txt. +File transfer to the nodes are parallelized. IF source or destination is cluster, the other should be a local file path. +If both destinations are remote, they must be nodes for the same cluster and not clusters themselves. +For example: +$ avalanche node scp [cluster1|node1]:/tmp/file.txt /tmp/file.txt +$ avalanche node scp /tmp/file.txt [cluster1|NodeID-XXXX]:/tmp/file.txt +$ avalanche node scp node1:/tmp/file.txt NodeID-XXXX:/tmp/file.txt +- [`ssh`](#node-ssh): (ALPHA Warning) This command is currently in experimental mode. + +The node ssh command execute a given command [cmd] using ssh on all nodes in the cluster if ClusterName is given. +If no command is given, just prints the ssh command to be used to connect to each node in the cluster. +For provided NodeID or InstanceID or IP, the command [cmd] will be executed on that node. +If no [cmd] is provided for the node, it will open ssh shell there. +- [`status`](#node-status): (ALPHA Warning) This command is currently in experimental mode. + +The node status command gets the bootstrap status of all nodes in a cluster with the Primary Network. +If no cluster is given, defaults to node list behaviour. + +To get the bootstrap status of a node with a Blockchain, use --blockchain flag +- [`sync`](#node-sync): (ALPHA Warning) This command is currently in experimental mode. + +The node sync command enables all nodes in a cluster to be bootstrapped to a Blockchain. +You can check the blockchain bootstrap status by calling avalanche node status `clusterName` --blockchain `blockchainName` +- [`update`](#node-update): (ALPHA Warning) This command is currently in experimental mode. + +The node update command suite provides a collection of commands for nodes to update +their avalanchego or VM config. + +You can check the status after update by calling avalanche node status +- [`upgrade`](#node-upgrade): (ALPHA Warning) This command is currently in experimental mode. + +The node update command suite provides a collection of commands for nodes to update +their avalanchego or VM version. + +You can check the status after upgrade by calling avalanche node status +- [`validate`](#node-validate): (ALPHA Warning) This command is currently in experimental mode. + +The node validate command suite provides a collection of commands for nodes to join +the Primary Network and Subnets as validators. +If any of the commands is run before the nodes are bootstrapped on the Primary Network, the command +will fail. You can check the bootstrap status by calling avalanche node status `clusterName` +- [`whitelist`](#node-whitelist): (ALPHA Warning) The whitelist command suite provides a collection of tools for granting access to the cluster. + + Command adds IP if --ip params provided to cloud security access rules allowing it to access all nodes in the cluster via ssh or http. + It also command adds SSH public key to all nodes in the cluster if --ssh params is there. + If no params provided it detects current user IP automaticaly and whitelists it + +### addDashboard + +(ALPHA Warning) This command is currently in experimental mode. + +The node addDashboard command adds custom dashboard to the Grafana monitoring dashboard for the +cluster. + +**Usage:** `avalanche node addDashboard [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--add-grafana-dashboard` | string path to additional grafana dashboard json file | +| `-h, --help` | help for addDashboard | +| `--subnet` | string subnet that the dasbhoard is intended for (if any) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### create + +(ALPHA Warning) This command is currently in experimental mode. + +The node create command sets up a validator on a cloud server of your choice. +The validator will be validating the Avalanche Primary Network and Subnet +of your choice. By default, the command runs an interactive wizard. It +walks you through all the steps you need to set up a validator. +Once this command is completed, you will have to wait for the validator +to finish bootstrapping on the primary network before running further +commands on it, e.g. validating a Subnet. You can check the bootstrapping +status by running avalanche node status + +The created node will be part of group of validators called `clusterName` +and users can call node commands with `clusterName` so that the command +will apply to all nodes in the cluster + +**Usage:** `avalanche node create [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--add-grafana-dashboard` | string path to additional grafana dashboard json file | +| `--alternative-key-pair-name` | string key pair name to use if default one generates conflicts | +| `--authorize-access` | authorize CLI to create cloud resources | +| `--auto-replace-keypair` | automatically replaces key pair to access node if previous key pair is not found | +| `--avalanchego-version-from-subnet` | string install latest avalanchego version, that is compatible with the given subnet, on node/s | +| `--aws` | create node/s in AWS cloud | +| `--aws-profile` | string aws profile to use (default "default") | +| `--aws-volume-iops` | int AWS iops (for gp3, io1, and io2 volume types only) (default 3000) | +| `--aws-volume-size` | int AWS volume size in GB (default 1000) | +| `--aws-volume-throughput` | int AWS throughput in MiB/s (for gp3 volume type only) (default 125) | +| `--aws-volume-type` | string AWS volume type (default "gp3") | +| `--cluster` | string operate on the given cluster | +| `--custom-avalanchego-version` | string install given avalanchego version on node/s | +| `--devnet` | operate on a devnet network | +| `--enable-monitoring` | set up Prometheus monitoring for created nodes. This option creates a separate monitoring cloud instance and incures additional cost | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `--gcp` | create node/s in GCP cloud | +| `--gcp-credentials` | string use given GCP credentials | +| `--gcp-project` | string use given GCP project | +| `--grafana-pkg` | string use grafana pkg instead of apt repo(by default), for example https://dl.grafana.com/oss/release/grafana_10.4.1_amd64.deb | +| `-h, --help` | help for create | +| `--latest-avalanchego-pre-release-version` | install latest avalanchego pre-release version on node/s | +| `--latest-avalanchego-version` | install latest avalanchego release version on node/s | +| `--node-type` | string cloud instance type. Use 'default' to use recommended default instance type | +| `--num-apis` | ints number of API nodes(nodes without stake) to create in the new Devnet | +| `--num-validators` | ints number of nodes to create per region(s). Use comma to separate multiple numbers for each region in the same order as --region flag | +| `--public-http-port` | allow public access to avalanchego HTTP port | +| `--region` | strings create node(s) in given region(s). Use comma to separate multiple regions | +| `--ssh-agent-identity` | string use given ssh identity(only for ssh agent). If not set, default will be used | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--use-ssh-agent` | use ssh agent(ex: Yubikey) for ssh auth | +| `--use-static-ip` | attach static Public IP on cloud servers (default true) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### destroy - -(ALPHA Warning) This command is currently in experimental mode. - - -The `node create` command sets up a validator on a cloud server of your choice. The validator will be validating the Avalanche Primary Network and Avalanche L1 of your choice. By default, the command runs an interactive wizard. It walks you through all the steps you need to set up a validator. Validators can be deployed in multiple regions/zones simultaneously. Once this command is run, you will have to wait for the validator to finish bootstrapping on the primary network before running further commands on it, for example validating an Avalanche L1. You can check the bootstrapping status by running `avalanche node status`. - -The created node will be part of group of validators called `` and users can call node commands with `` so that the command will apply to all nodes in the cluster. - -**Usage**: - -```bash -avalanche node create [clusterName] [flags] -``` - -**Flags**: - -```bash - --alternative-key-pair-name string key pair name to use if default one generates conflicts - --authorize-access authorize CLI to create cloud resources - --avalanchego-version-from-subnet string install latest avalanchego version, that is compatible with the given subnet, on node/s - --aws create node/s in AWS cloud - --aws-profile string aws profile to use (default "default") - --custom-avalanchego-version string install given avalanchego version on node/s - --devnet create node/s into a new Devnet - --devnet-api-nodes int number of API nodes(nodes without stake) to create in the new Devnet - --fuji create node/s in Fuji Network - --gcp create node/s in GCP cloud - --gcp-credentials string use given GCP credentials - --gcp-project string use given GCP project --h, --help help for create - --latest-avalanchego-pre-release-version install latest avalanchego pre-release version on node/s - --latest-avalanchego-version install latest avalanchego release version on node/s - --node-type string cloud instance type. Use 'default' to use recommended default instance type - --num-nodes ints number of nodes to create per region(s). Use comma to separate multiple numbers for each region in the same order as --region flag - --region strings create node(s) in given region(s). Use comma to separate multiple regions - --same-monitoring-instance host monitoring for a cloud servers on the same instance - --separate-monitoring-instance host monitoring for all cloud servers on a separate instance - --skip-monitoring don't set up monitoring in created nodes - --ssh-agent-identity string use given ssh identity(only for ssh agent). If not set, default will be used - --use-ssh-agent use ssh agent(ex: Yubikey) for ssh auth - --use-static-ip attach static Public IP on cloud servers (default true) -``` - -### Devnet - - (ALPHA Warning) This command is currently in experimental mode. - - -The `node devnet` command suite provides a collection of commands related to devnets. You can check the updated status by calling avalanche node status `` - -### Devnet Deploy - -The `node devnet deploy` command deploys an Avalanche L1 into a devnet cluster, creating Avalanche L1 and blockchain TXs for it. It saves the deploy info both locally and remotely. - -**Usage**: - -```bash -avalanche node devnet deploy [clusterName] [blockchainName] [flags] -``` - -### Devnet Wiz - -The `node devnet wiz` command creates a devnet and deploys, sync and validate an Avalanche L1 into it. It creates the Avalanche L1 if so needed. - -**Usage**: - -```bash -avalanche node devnet wiz [clusterName] [blockchainName] [flags] -``` - -**Flags**: - -``` - --alternative-key-pair-name string key pair name to use if default one generates conflicts - --authorize-access authorize CLI to create cloud resources - --avalanchego-version string install given avalanchego version on node/s - --aws create node/s in AWS cloud - --aws-profile string aws profile to use (default "default") - --chain-config string path to the chain configuration for subnet - --custom-subnet use a custom VM as the subnet virtual machine - --custom-vm-branch string custom vm branch - --custom-vm-build-script string custom vm build-script - --custom-vm-repo-url string custom vm repository url - --default-validator-params use default weight/start/duration params for subnet validator - --devnet-api-nodes int number of API nodes(nodes without stake) to create in the new Devnet - --evm-chain-id uint chain ID to use with Subnet-EVM - --evm-defaults use default settings for fees/airdrop/precompiles with Subnet-EVM - --evm-subnet use Subnet-EVM as the subnet virtual machine - --evm-token string token name to use with Subnet-EVM - --evm-version string version of Subnet-EVM to use - --force-subnet-create overwrite the existing subnet configuration if one exists - --gcp create node/s in GCP cloud - --gcp-credentials string use given GCP credentials - --gcp-project string use given GCP project --h, --help help for wiz - --latest-avalanchego-pre-release-version install latest avalanchego pre-release version on node/s - --latest-avalanchego-version install latest avalanchego release version on node/s - --latest-evm-version use latest Subnet-EVM released version - --latest-pre-released-evm-version use latest Subnet-EVM pre-released version - --node-config string path to avalanchego node configuration for subnet - --node-type string cloud instance type. Use 'default' to use recommended default instance type - --num-nodes ints number of nodes to create per region(s). Use comma to separate multiple numbers for each region in the same order as --region flag - --region strings create node/s in given region(s). Use comma to separate multiple regions - --same-monitoring-instance host monitoring for a cloud servers on the same instance - --separate-monitoring-instance host monitoring for all cloud servers on a separate instance - --skip-monitoring don't set up monitoring in created nodes - --ssh-agent-identity string use given ssh identity(only for ssh agent). If not set, default will be used. - --subnet-config string path to the subnet configuration for subnet - --subnet-genesis string file path of the subnet genesis - --use-ssh-agent use ssh agent for ssh - --use-static-ip attach static Public IP on cloud servers (default true) - --validators strings deploy subnet into given comma separated list of validators. defaults to all cluster nodes -``` - -### List - - + +The node destroy command terminates all running nodes in cloud server and deletes all storage disks. + +If there is a static IP address attached, it will be released. + +**Usage:** `avalanche node destroy [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--all` | destroy all existing clusters created by Avalanche CLI | +| `--authorize-access` | authorize CLI to release cloud resources | +| `-y, --authorize-all` | authorize all CLI requests | +| `--authorize-remove` | authorize CLI to remove all local files related to cloud nodes | +| `--aws-profile` | string aws profile to use (default "default") | +| `-h, --help` | help for destroy | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### devnet + (ALPHA Warning) This command is currently in experimental mode. - -The `node list` command lists all clusters together with their nodes. +The node devnet command suite provides a collection of commands related to devnets. +You can check the updated status by calling avalanche node status `clusterName` -**Usage**: +**Usage:** `avalanche node devnet [subcommand] [flags]` -```bash -avalanche node list [flags] -``` +**Flags:** -### Ssh +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for devnet | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`deploy`](#devnet-deploy): (ALPHA Warning) This command is currently in experimental mode. + +The node devnet deploy command deploys a subnet into a devnet cluster, creating subnet and blockchain txs for it. +It saves the deploy info both locally and remotely. +- [`wiz`](#devnet-wiz): (ALPHA Warning) This command is currently in experimental mode. + +The node wiz command creates a devnet and deploys, sync and validate a subnet into it. It creates the subnet if so needed. + +#### devnet deploy - (ALPHA Warning) This command is currently in experimental mode. - -The `node ssh` command execute a given command using ssh on all nodes in the cluster. If no command is given, just prints the ssh command line to be used to connect to each node. +The node devnet deploy command deploys a subnet into a devnet cluster, creating subnet and blockchain txs for it. +It saves the deploy info both locally and remotely. -**Usage**: +**Usage:** `avalanche node devnet deploy [subcommand] [flags]` -```bash -avalanche node ssh [clusterName] [flags] -``` +**Flags:** -**Flags**: +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for deploy | +| `--no-checks` | do not check for healthy status or rpc compatibility of nodes against subnet | +| `--subnet-aliases` | strings additional subnet aliases to be used for RPC calls in addition to subnet blockchain name | +| `--subnet-only` | only create a subnet | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -```bash --h, --help help for status -``` +#### devnet wiz -### Status +(ALPHA Warning) This command is currently in experimental mode. + +The node wiz command creates a devnet and deploys, sync and validate a subnet into it. It creates the subnet if so needed. + +**Usage:** `avalanche node devnet wiz [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--add-grafana-dashboard` | string path to additional grafana dashboard json file | +| `--alternative-key-pair-name` | string key pair name to use if default one generates conflicts | +| `--authorize-access` | authorize CLI to create cloud resources | +| `--auto-replace-keypair` | automatically replaces key pair to access node if previous key pair is not found | +| `--aws` | create node/s in AWS cloud | +| `--aws-profile` | string aws profile to use (default "default") | +| `--aws-volume-iops` | int AWS iops (for gp3, io1, and io2 volume types only) (default 3000) | +| `--aws-volume-size` | int AWS volume size in GB (default 1000) | +| `--aws-volume-throughput` | int AWS throughput in MiB/s (for gp3 volume type only) (default 125) | +| `--aws-volume-type` | string AWS volume type (default "gp3") | +| `--chain-config` | string path to the chain configuration for subnet | +| `--custom-avalanchego-version` | string install given avalanchego version on node/s | +| `--custom-subnet` | use a custom VM as the subnet virtual machine | +| `--custom-vm-branch` | string custom vm branch or commit | +| `--custom-vm-build-script` | string custom vm build-script | +| `--custom-vm-repo-url` | string custom vm repository url | +| `--default-validator-params` | use default weight/start/duration params for subnet validator | +| `--deploy-teleporter-messenger` | deploy Interchain Messenger (default true) | +| `--deploy-teleporter-registry` | deploy Interchain Registry (default true) | +| `--enable-monitoring` | set up Prometheus monitoring for created nodes. Please note that this option creates a separate monitoring instance and incures additional cost | +| `--evm-chain-id` | uint chain ID to use with Subnet-EVM | +| `--evm-defaults` | use default production settings with Subnet-EVM | +| `--evm-production-defaults` | use default production settings for your blockchain | +| `--evm-subnet` | use Subnet-EVM as the subnet virtual machine | +| `--evm-test-defaults` | use default test settings for your blockchain | +| `--evm-token` | string token name to use with Subnet-EVM | +| `--evm-version` | string version of Subnet-EVM to use | +| `--force-subnet-create` | overwrite the existing subnet configuration if one exists | +| `--gcp` | create node/s in GCP cloud | +| `--gcp-credentials` | string use given GCP credentials | +| `--gcp-project` | string use given GCP project | +| `--grafana-pkg` | string use grafana pkg instead of apt repo(by default), for example https://dl.grafana.com/oss/release/grafana_10.4.1_amd64.deb | +| `-h, --help` | help for wiz | +| `--latest-avalanchego-pre-release-version` | install latest avalanchego pre-release version on node/s | +| `--latest-avalanchego-version` | install latest avalanchego release version on node/s | +| `--latest-evm-version` | use latest Subnet-EVM released version | +| `--latest-pre-released-evm-version` | use latest Subnet-EVM pre-released version | +| `--node-config` | string path to avalanchego node configuration for subnet | +| `--node-type` | string cloud instance type. Use 'default' to use recommended default instance type | +| `--num-apis` | ints number of API nodes(nodes without stake) to create in the new Devnet | +| `--num-validators` | ints number of nodes to create per region(s). Use comma to separate multiple numbers for each region in the same order as --region flag | +| `--public-http-port` | allow public access to avalanchego HTTP port | +| `--region` | strings create node/s in given region(s). Use comma to separate multiple regions | +| `--relayer` | run AWM relayer when deploying the vm | +| `--ssh-agent-identity` | string use given ssh identity(only for ssh agent). If not set, default will be used. | +| `--subnet-aliases` | strings additional subnet aliases to be used for RPC calls in addition to subnet blockchain name | +| `--subnet-config` | string path to the subnet configuration for subnet | +| `--subnet-genesis` | string file path of the subnet genesis | +| `--teleporter` | generate a teleporter-ready vm | +| `--teleporter-messenger-contract-address-path` | string path to a teleporter messenger contract address file | +| `--teleporter-messenger-deployer-address-path` | string path to a teleporter messenger deployer address file | +| `--teleporter-messenger-deployer-tx-path` | string path to a teleporter messenger deployer tx file | +| `--teleporter-registry-bytecode-path` | string path to a teleporter registry bytecode file | +| `--teleporter-version` | string teleporter version to deploy (default "latest") | +| `--use-ssh-agent` | use ssh agent for ssh | +| `--use-static-ip` | attach static Public IP on cloud servers (default true) | +| `--validators` | strings deploy subnet into given comma separated list of validators. defaults to all cluster nodes | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### export - (ALPHA Warning) This command is currently in experimental mode. - -The `node status` command gets the bootstrap status of all nodes in a cluster with the Primary Network. If no cluster is given, defaults to node list behaviour. +The node export command exports cluster configuration and its nodes config to a text file. + +If no file is specified, the configuration is printed to the stdout. -To get the bootstrap status of a node with an Avalanche L1, use the `--subnet` flag. +Use --include-secrets to include keys in the export. In this case please keep the file secure as it contains sensitive information. -**Usage**: +Exported cluster configuration without secrets can be imported by another user using node import command. -```bash -avalanche node status [clusterName] [flags] -``` +**Usage:** `avalanche node export [subcommand] [flags]` -**Flags**: +**Flags:** -```bash --h, --help help for status - --subnet string specify the subnet the node is syncing with -``` +| Flag | Description | +| ---- | ----------- | +| `--file` | string specify the file to export the cluster configuration to | +| `--force` | overwrite the file if it exists | +| `-h, --help` | help for export | +| `--include-secrets` | include keys in the export | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -### Stop +### import - (ALPHA Warning) This command is currently in experimental mode. - -The `node stop` command stops a running node in cloud server +The node import command imports cluster configuration and its nodes configuration from a text file +created from the node export command. -Note that a stopped node may still incur cloud server storage fees. +Prior to calling this command, call node whitelist command to have your SSH public key and IP whitelisted by +the cluster owner. This will enable you to use avalanche-cli commands to manage the imported cluster. -**Usage**: +Please note, that this imported cluster will be considered as EXTERNAL by avalanche-cli, so some commands +affecting cloud nodes like node create or node destroy will be not applicable to it. -```bash -avalanche node stop [clusterName] [flags] -``` +**Usage:** `avalanche node import [subcommand] [flags]` -**Flags**: +**Flags:** -```bash - --authorize-access authorize CLI to release cloud resources - --authorize-remove authorize CLI to remove all local files related to cloud nodes --h, --help help for stop -``` +| Flag | Description | +| ---- | ----------- | +| `--file` | string specify the file to export the cluster configuration to | +| `-h, --help` | help for import | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -### Sync +### list - (ALPHA Warning) This command is currently in experimental mode. - -The `node sync` command enables all nodes in a cluster to be bootstrapped to an Avalanche L1. You can check the Avalanche L1 bootstrap status by calling avalanche `node status --subnet ` +The node list command lists all clusters together with their nodes. + +**Usage:** `avalanche node list [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for list | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### loadtest + +(ALPHA Warning) This command is currently in experimental mode. + +The node loadtest command suite starts and stops a load test for an existing devnet cluster. + +**Usage:** `avalanche node loadtest [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for loadtest | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`start`](#loadtest-start): (ALPHA Warning) This command is currently in experimental mode. + +The node loadtest command starts load testing for an existing devnet cluster. If the cluster does +not have an existing load test host, the command creates a separate cloud server and builds the load +test binary based on the provided load test Git Repo URL and load test binary build command. + +The command will then run the load test binary based on the provided load test run command. +- [`stop`](#loadtest-stop): (ALPHA Warning) This command is currently in experimental mode. -**Usage**: +The node loadtest stop command stops load testing for an existing devnet cluster and terminates the +separate cloud server created to host the load test. -```bash -avalanche node sync [clusterName] [blockchainName] [flags] -``` +#### loadtest start -### Update +(ALPHA Warning) This command is currently in experimental mode. + +The node loadtest command starts load testing for an existing devnet cluster. If the cluster does +not have an existing load test host, the command creates a separate cloud server and builds the load +test binary based on the provided load test Git Repo URL and load test binary build command. + +The command will then run the load test binary based on the provided load test run command. + +**Usage:** `avalanche node loadtest start [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--authorize-access` | authorize CLI to create cloud resources | +| `--aws` | create loadtest node in AWS cloud | +| `--aws-profile` | string aws profile to use (default "default") | +| `--gcp` | create loadtest in GCP cloud | +| `-h, --help` | help for start | +| `--load-test-branch` | string load test branch or commit | +| `--load-test-build-cmd` | string command to build load test binary | +| `--load-test-cmd` | string command to run load test | +| `--load-test-repo` | string load test repo url to use | +| `--node-type` | string cloud instance type for loadtest script | +| `--region` | string create load test node in a given region | +| `--ssh-agent-identity` | string use given ssh identity(only for ssh agent). If not set, default will be used | +| `--use-ssh-agent` | use ssh agent(ex: Yubikey) for ssh auth | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +#### loadtest stop + +(ALPHA Warning) This command is currently in experimental mode. + +The node loadtest stop command stops load testing for an existing devnet cluster and terminates the +separate cloud server created to host the load test. + +**Usage:** `avalanche node loadtest stop [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for stop | +| `--load-test` | strings stop specified load test node(s). Use comma to separate multiple load test instance names | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### refresh-ips - (ALPHA Warning) This command is currently in experimental mode. - -The `node update` command suite provides a collection of commands for nodes to update their AvalancheGo version or VM version/config. You can check the status after update by running `avalanche node status` +The node refresh-ips command obtains the current IP for all nodes with dynamic IPs in the cluster, +and updates the local node information used by CLI commands. + +**Usage:** `avalanche node refresh-ips [subcommand] [flags]` + +**Flags:** -### Update Subnet +| Flag | Description | +| ---- | ----------- | +| `--aws-profile` | string aws profile to use (default "default") | +| `-h, --help` | help for refresh-ips | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### resize - (ALPHA Warning) This command is currently in experimental mode. - -The `node update subnet` command updates all nodes in a cluster with latest Avalanche L1 configuration and You can check the updated Avalanche L1 bootstrap status by calling avalanche `node status --subnet ` +The node resize command can change the amount of CPU, memory and disk space available for the cluster nodes. + +**Usage:** `avalanche node resize [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--aws-profile` | string aws profile to use (default "default") | +| `--disk-size` | string Disk size to resize in Gb (e.g. 1000Gb) | +| `-h, --help` | help for resize | +| `--node-type` | string Node type to resize (e.g. t3.2xlarge) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### scp + +(ALPHA Warning) This command is currently in experimental mode. -**Usage**: +The node scp command securely copies files to and from nodes. Remote source or destionation can be specified using the following format: +[clusterName|nodeID|instanceID|IP]:/path/to/file. Regular expressions are supported for the source files like /tmp/*.txt. +File transfer to the nodes are parallelized. IF source or destination is cluster, the other should be a local file path. +If both destinations are remote, they must be nodes for the same cluster and not clusters themselves. +For example: +$ avalanche node scp [cluster1|node1]:/tmp/file.txt /tmp/file.txt +$ avalanche node scp /tmp/file.txt [cluster1|NodeID-XXXX]:/tmp/file.txt +$ avalanche node scp node1:/tmp/file.txt NodeID-XXXX:/tmp/file.txt -```bash -avalanche node update subnet [clusterName] [blockchainName] [flags] -``` +**Usage:** `avalanche node scp [subcommand] [flags]` -**Flags**: +**Flags:** -```bash --h, --help help for subnet -``` +| Flag | Description | +| ---- | ----------- | +| `--compress` | use compression for ssh | +| `-h, --help` | help for scp | +| `--recursive` | copy directories recursively | +| `--with-loadtest` | include loadtest node for scp cluster operations | +| `--with-monitor` | include monitoring node for scp cluster operations | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -### Validate +### ssh - (ALPHA Warning) This command is currently in experimental mode. - -The `node validate` command suite provides a collection of commands for nodes to join the Primary Network and Avalanche L1s as validators. If any of the commands is run before the nodes are bootstrapped on the Primary Network, the command will fail. +The node ssh command execute a given command [cmd] using ssh on all nodes in the cluster if ClusterName is given. +If no command is given, just prints the ssh command to be used to connect to each node in the cluster. +For provided NodeID or InstanceID or IP, the command [cmd] will be executed on that node. +If no [cmd] is provided for the node, it will open ssh shell there. -You can check the bootstrap status by running `avalanche node status `. +**Usage:** `avalanche node ssh [subcommand] [flags]` -### Validate Primary +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for ssh | +| `--parallel` | run ssh command on all nodes in parallel | +| `--with-loadtest` | include loadtest node for ssh cluster operations | +| `--with-monitor` | include monitoring node for ssh cluster operations | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### status - (ALPHA Warning) This command is currently in experimental mode. - -The `node validate primary` command enables all nodes in a cluster to be validators of Primary Network. +The node status command gets the bootstrap status of all nodes in a cluster with the Primary Network. +If no cluster is given, defaults to node list behaviour. -**Usage**: +To get the bootstrap status of a node with a Blockchain, use --blockchain flag -```bash -avalanche node validate primary [clusterName] [flags] -``` +**Usage:** `avalanche node status [subcommand] [flags]` -**Flags**: +**Flags:** -```bash --f, --fuji testnet set up validator in fuji (alias to testnet --h, --help help for primary --k, --key string select the key to use [fuji only] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji) - --ledger-addrs strings use the given ledger addresses --m, --mainnet set up validator in mainnet - --stake-amount uint how many AVAX to stake in the validator - --staking-period duration how long validator validates for after start time --t, --testnet fuji set up validator in testnet (alias to fuji) -``` +| Flag | Description | +| ---- | ----------- | +| `--blockchain` | string specify the blockchain the node is syncing with | +| `-h, --help` | help for status | +| `--subnet` | string specify the blockchain the node is syncing with | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -### Validate Subnet +### sync - (ALPHA Warning) This command is currently in experimental mode. - - -The `node validate subnet` command enables all nodes in a cluster to be validators of an Avalanche L1. If the command is run before the nodes are Primary Network validators, the command will first make the nodes Primary Network validators before making them Avalanche L1 validators. If The command is run before the nodes are bootstrapped on the Primary Network, the command will fail. You can check the bootstrap status by calling `avalanche node status `. If The command is run before the nodes are synced to the Avalanche L1, the command will fail. You can check the Avalanche L1 sync status by calling `avalanche node status --subnet `. - -**Usage**: - -```bash -avalanche node validate subnet [clusterName] [blockchainName] [flags] -``` - -**Flags**: - -```bash - --default-validator-params use default weight/start/duration params for subnet validator --d, --devnet set up validator in devnet - --endpoint string use the given endpoint for network operations --e, --ewoq use ewoq key [fuji/devnet only] --f, --fuji testnet set up validator in fuji (alias to testnet --h, --help help for subnet --k, --key string select the key to use [fuji/devnet only] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) - --ledger-addrs strings use the given ledger addresses --m, --mainnet set up validator in mainnet - --stake-amount uint how many AVAX to stake in the validator - --staking-period duration how long validator validates for after start time - --start-time string UTC start time when this validator starts validating, in 'YYYY-MM-DD HH:MM:SS' format --t, --testnet fuji set up validator in testnet (alias to fuji) -``` - -### Whitelist - - + +The node sync command enables all nodes in a cluster to be bootstrapped to a Blockchain. +You can check the blockchain bootstrap status by calling avalanche node status `clusterName` --blockchain `blockchainName` + +**Usage:** `avalanche node sync [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for sync | +| `--no-checks` | do not check for bootstrapped/healthy status or rpc compatibility of nodes against subnet | +| `--subnet-aliases` | strings subnet alias to be used for RPC calls. defaults to subnet blockchain ID | +| `--validators` | strings sync subnet into given comma separated list of validators. defaults to all cluster nodes | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### update + (ALPHA Warning) This command is currently in experimental mode. - -The `node whitelist` command suite provides a collection of tools for granting access to the cluster. +The node update command suite provides a collection of commands for nodes to update +their avalanchego or VM config. -Nodes created by `Avalanche-CLI` are protected by Cloud Security Group and only defined IP addresses are allowed to access. User IP is whitelisted automatically when cluster is created, but this command can be used in case of IP address changes or granting access to additional IPs. This command detects user current IP address automatically if no IP address is provided. +You can check the status after update by calling avalanche node status -Secure SSH protocol is used to communicate with cloud instances. `node whitelist` command authorizes SSH public key on all nodes in the cluster if --ssh params is specified. Please keep your SSH private keys safe and secure, only share public keys to grant shell access to cloud instances running `avalanchego`. +**Usage:** `avalanche node update [subcommand] [flags]` -**Usage**: +**Flags:** -```bash -avalanche node whitelist [--ip ] [--ssh ""] [flags] -``` +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for update | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -**Flags**: +**Subcommands:** -```bash - -h, --help help for whitelist - --ip string ip address to whitelist - --ssh string ssh public key to whitelist -``` +- [`subnet`](#update-subnet): (ALPHA Warning) This command is currently in experimental mode. -### Export +The node update subnet command updates all nodes in a cluster with latest Subnet configuration and VM for custom VM. +You can check the updated subnet bootstrap status by calling avalanche node status `clusterName` --subnet `subnetName` + +#### update subnet - (ALPHA Warning) This command is currently in experimental mode. - -The `node export` command exports cluster configuration including their nodes to a text file. If no file is specified, the configuration is printed to the stdout. Use `--include-secrets` to include keys in the export. In this case this command can be used to backup your cluster configuration. Please keep the file secure as it contains sensitive information. +The node update subnet command updates all nodes in a cluster with latest Subnet configuration and VM for custom VM. +You can check the updated subnet bootstrap status by calling avalanche node status `clusterName` --subnet `subnetName` + +**Usage:** `avalanche node update subnet [subcommand] [flags]` -Exported cluster configuration without secrets it can be imported by another user using `node import` command. +**Flags:** -**Usage**: +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for subnet | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -```bash -avalanche node export [clusterName] [flags] -``` +### upgrade -**Flags**: +(ALPHA Warning) This command is currently in experimental mode. + +The node update command suite provides a collection of commands for nodes to update +their avalanchego or VM version. + +You can check the status after upgrade by calling avalanche node status + +**Usage:** `avalanche node upgrade [subcommand] [flags]` + +**Flags:** -```bash - --file string specify the file to export the cluster configuration to - --force overwrite the file if it exists - -h, --help help for export - --include-secrets include keys in the export -``` +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for upgrade | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -### Import +### validate - (ALPHA Warning) This command is currently in experimental mode. - -The `node import` command imports cluster configuration and cluster nodes from a text file. This file should be created using the `node export` command. +The node validate command suite provides a collection of commands for nodes to join +the Primary Network and Subnets as validators. +If any of the commands is run before the nodes are bootstrapped on the Primary Network, the command +will fail. You can check the bootstrap status by calling avalanche node status `clusterName` -This command is useful with `node whitelist` command. With your SSH public key and IP whitelisted by cluster owner you will be able to execute commands and use `avalanche-cli` to manage this cluster. Please note, that this imported cluster will be considered as EXTERNAL by `avalanche-cli` so some commands affecting cloud nodes like `node create` or `node destroy` will be not applicable for it. +**Usage:** `avalanche node validate [subcommand] [flags]` -**Usage**: +**Flags:** -```bash -avalanche node import [clusterName] [flags] -``` +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for validate | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -**Flags**: +**Subcommands:** -```bash - --file string specify the file to export the cluster configuration to - -h, --help help for import -``` +- [`primary`](#validate-primary): (ALPHA Warning) This command is currently in experimental mode. -### Resize +The node validate primary command enables all nodes in a cluster to be validators of Primary +Network. +- [`subnet`](#validate-subnet): (ALPHA Warning) This command is currently in experimental mode. + +The node validate subnet command enables all nodes in a cluster to be validators of a Subnet. +If the command is run before the nodes are Primary Network validators, the command will first +make the nodes Primary Network validators before making them Subnet validators. +If The command is run before the nodes are bootstrapped on the Primary Network, the command will fail. +You can check the bootstrap status by calling avalanche node status `clusterName` +If The command is run before the nodes are synced to the subnet, the command will fail. +You can check the subnet sync status by calling avalanche node status `clusterName` --subnet `subnetName` + +#### validate primary - (ALPHA Warning) This command is currently in experimental mode. - -The `node resize` command can be used to resize cluster instance size and/or size of the cloud persistent storage attached to the instance. In another words, it can change amount of CPU, memory and disk space available for the cluster nodes. +The node validate primary command enables all nodes in a cluster to be validators of Primary +Network. + +**Usage:** `avalanche node validate primary [subcommand] [flags]` -Please note that disk resize operation can affect disk performance during cloud operation to resize it. Please note that instance resize operation will replace cluster instances one by one, which might affect cluster stability. +**Flags:** -**Usage**: +| Flag | Description | +| ---- | ----------- | +| `-e, --ewoq` | use ewoq key [fuji/devnet only] | +| `-h, --help` | help for primary | +| `-k, --key` | string select the key to use [fuji only] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `--stake-amount` | uint how many AVAX to stake in the validator | +| `--staking-period` | duration how long validator validates for after start time | +| `--start-time` | string UTC start time when this validator starts validating, in 'YYYY-MM-DD HH:MM:SS' format | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -```bash -avalanche node resize [clusterName] [flags] -``` +#### validate subnet + +(ALPHA Warning) This command is currently in experimental mode. -**Flags**: +The node validate subnet command enables all nodes in a cluster to be validators of a Subnet. +If the command is run before the nodes are Primary Network validators, the command will first +make the nodes Primary Network validators before making them Subnet validators. +If The command is run before the nodes are bootstrapped on the Primary Network, the command will fail. +You can check the bootstrap status by calling avalanche node status `clusterName` +If The command is run before the nodes are synced to the subnet, the command will fail. +You can check the subnet sync status by calling avalanche node status `clusterName` --subnet `subnetName` + +**Usage:** `avalanche node validate subnet [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--default-validator-params` | use default weight/start/duration params for subnet validator | +| `-e, --ewoq` | use ewoq key [fuji/devnet only] | +| `-h, --help` | help for subnet | +| `-k, --key` | string select the key to use [fuji/devnet only] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `--no-checks` | do not check for bootstrapped status or healthy status | +| `--no-validation-checks` | do not check if subnet is already synced or validated (default true) | +| `--stake-amount` | uint how many AVAX to stake in the validator | +| `--staking-period` | duration how long validator validates for after start time | +| `--start-time` | string UTC start time when this validator starts validating, in 'YYYY-MM-DD HH:MM:SS' format | +| `--validators` | strings validate subnet for the given comma separated list of validators. defaults to all cluster nodes | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### whitelist + +(ALPHA Warning) The whitelist command suite provides a collection of tools for granting access to the cluster. + + Command adds IP if --ip params provided to cloud security access rules allowing it to access all nodes in the cluster via ssh or http. + It also command adds SSH public key to all nodes in the cluster if --ssh params is there. + If no params provided it detects current user IP automaticaly and whitelists it + +**Usage:** `avalanche node whitelist [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-y, --current-ip` | whitelist current host ip | +| `-h, --help` | help for whitelist | +| `--ip` | string ip address to whitelist | +| `--ssh` | string ssh public key to whitelist | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +## avalanche primary + +The primary command suite provides a collection of tools for interacting with the +Primary Network + +**Usage:** `avalanche primary [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for primary | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`addValidator`](#primary-addvalidator): The primary addValidator command adds a node as a validator +in the Primary Network +- [`describe`](#primary-describe): The subnet describe command prints details of the primary network configuration to the console. + +### addValidator + +The primary addValidator command adds a node as a validator +in the Primary Network + +**Usage:** `avalanche primary addValidator [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--delegation-fee` | uint32 set the delegation fee (20 000 is equivalent to 2%) | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for addValidator | +| `-k, --key` | string select the key to use [fuji only] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `-m, --mainnet` | operate on mainnet | +| `--nodeID` | string set the NodeID of the validator to add | +| `--proof-of-possession` | string set the BLS proof of possession of the validator to add | +| `--public-key` | string set the BLS public key of the validator to add | +| `--staking-period` | duration how long this validator will be staking | +| `--start-time` | string UTC start time when this validator starts validating, in 'YYYY-MM-DD HH:MM:SS' format | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--weight` | uint set the staking weight of the validator to add | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### describe + +The subnet describe command prints details of the primary network configuration to the console. + +**Usage:** `avalanche primary describe [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `-h, --help` | help for describe | +| `-l, --local` | operate on a local network | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +## avalanche subnet + +The subnet command suite provides a collection of tools for developing +and deploying Blockchains. + +To get started, use the subnet create command wizard to walk through the +configuration of your very first Blockchain. Then, go ahead and deploy it +with the subnet deploy command. You can use the rest of the commands to +manage your Blockchain configurations and live deployments. + +Deprecation notice: use 'avalanche blockchain' + +**Usage:** `avalanche subnet [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for subnet | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`addValidator`](#subnet-addvalidator): The blockchain addValidator command whitelists a primary network validator to +validate the subnet of the provided deployed Blockchain. + +To add the validator to the Subnet's allow list, you first need to provide +the blockchainName and the validator's unique NodeID. The command then prompts +for the validation start time, duration, and stake weight. You can bypass +these prompts by providing the values with flags. + +This command currently only works on Blockchains deployed to either the Fuji +Testnet or Mainnet. +- [`changeOwner`](#subnet-changeowner): The blockchain changeOwner changes the owner of the subnet of the deployed Blockchain. +- [`configure`](#subnet-configure): AvalancheGo nodes support several different configuration files. Subnets have their own +Subnet config which applies to all chains/VMs in the Subnet. Each chain within the Subnet +can have its own chain config. A chain can also have special requirements for the AvalancheGo node +configuration itself. This command allows you to set all those files. +- [`create`](#subnet-create): The blockchain create command builds a new genesis file to configure your Blockchain. +By default, the command runs an interactive wizard. It walks you through +all the steps you need to create your first Blockchain. + +The tool supports deploying Subnet-EVM, and custom VMs. You +can create a custom, user-generated genesis with a custom VM by providing +the path to your genesis and VM binaries with the --genesis and --vm flags. + +By default, running the command with a blockchainName that already exists +causes the command to fail. If you'd like to overwrite an existing +configuration, pass the -f flag. +- [`delete`](#subnet-delete): The blockchain delete command deletes an existing blockchain configuration. +- [`deploy`](#subnet-deploy): The blockchain deploy command deploys your Blockchain configuration locally, to Fuji Testnet, or to Mainnet. + +At the end of the call, the command prints the RPC URL you can use to interact with the Subnet. + +Avalanche-CLI only supports deploying an individual Blockchain once per network. Subsequent +attempts to deploy the same Blockchain to the same network (local, Fuji, Mainnet) aren't +allowed. If you'd like to redeploy a Blockchain locally for testing, you must first call +avalanche network clean to reset all deployed chain state. Subsequent local deploys +redeploy the chain with fresh state. You can deploy the same Blockchain to multiple networks, +so you can take your locally tested Subnet and deploy it on Fuji or Mainnet. +- [`describe`](#subnet-describe): The blockchain describe command prints the details of a Blockchain configuration to the console. +By default, the command prints a summary of the configuration. By providing the --genesis +flag, the command instead prints out the raw genesis file. +- [`export`](#subnet-export): The blockchain export command write the details of an existing Blockchain deploy to a file. + +The command prompts for an output path. You can also provide one with +the --output flag. +- [`import`](#subnet-import): Import blockchain configurations into avalanche-cli. + +This command suite supports importing from a file created on another computer, +or importing from blockchains running public networks +(e.g. created manually or with the deprecated subnet-cli) +- [`join`](#subnet-join): The subnet join command configures your validator node to begin validating a new Blockchain. + +To complete this process, you must have access to the machine running your validator. If the +CLI is running on the same machine as your validator, it can generate or update your node's +config file automatically. Alternatively, the command can print the necessary instructions +to update your node manually. To complete the validation process, the Subnet's admins must add +the NodeID of your validator to the Subnet's allow list by calling addValidator with your +NodeID. + +After you update your validator's config, you need to restart your validator manually. If +you provide the --avalanchego-config flag, this command attempts to edit the config file +at that path. + +This command currently only supports Blockchains deployed on the Fuji Testnet and Mainnet. +- [`list`](#subnet-list): The blockchain list command prints the names of all created Blockchain configurations. Without any flags, +it prints some general, static information about the Blockchain. With the --deployed flag, the command +shows additional information including the VMID, BlockchainID and SubnetID. +- [`publish`](#subnet-publish): The blockchain publish command publishes the Blockchain's VM to a repository. +- [`removeValidator`](#subnet-removevalidator): The blockchain removeValidator command stops a whitelisted, subnet network validator from +validating your deployed Blockchain. + +To remove the validator from the Subnet's allow list, provide the validator's unique NodeID. You can bypass +these prompts by providing the values with flags. +- [`stats`](#subnet-stats): The blockchain stats command prints validator statistics for the given Blockchain. +- [`upgrade`](#subnet-upgrade): The blockchain upgrade command suite provides a collection of tools for +updating your developmental and deployed Blockchains. +- [`validators`](#subnet-validators): The blockchain validators command lists the validators of a blockchain's subnet and provides +several statistics about them. +- [`vmid`](#subnet-vmid): The blockchain vmid command prints the virtual machine ID (VMID) for the given Blockchain. + +### addValidator + +The blockchain addValidator command whitelists a primary network validator to +validate the subnet of the provided deployed Blockchain. + +To add the validator to the Subnet's allow list, you first need to provide +the blockchainName and the validator's unique NodeID. The command then prompts +for the validation start time, duration, and stake weight. You can bypass +these prompts by providing the values with flags. + +This command currently only works on Blockchains deployed to either the Fuji +Testnet or Mainnet. + +**Usage:** `avalanche subnet addValidator [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--default-duration` | set duration so as to validate until primary validator ends its period | +| `--default-start-time` | use default start time for subnet validator (5 minutes later for fuji & mainnet, 30 seconds later for devnet) | +| `--default-validator-params` | use default weight/start/duration params for subnet validator | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-e, --ewoq` | use ewoq key [fuji/devnet only] | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for addValidator | +| `-k, --key` | string select the key to use [fuji/devnet only] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--nodeID` | string set the NodeID of the validator to add | +| `--output-tx-path` | string file path of the add validator tx | +| `--staking-period` | duration how long this validator will be staking | +| `--start-time` | string UTC start time when this validator starts validating, in 'YYYY-MM-DD HH:MM:SS' format | +| `--subnet-auth-keys` | strings control keys that will be used to authenticate add validator tx | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--wait-for-tx-acceptance` | just issue the add validator tx, without waiting for its acceptance (default true) | +| `--weight` | uint set the staking weight of the validator to add | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### changeOwner + +The blockchain changeOwner changes the owner of the subnet of the deployed Blockchain. + +**Usage:** `avalanche subnet changeOwner [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--control-keys` | strings addresses that may make subnet changes | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-e, --ewoq` | use ewoq key [fuji/devnet] | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for changeOwner | +| `-k, --key` | string select the key to use [fuji/devnet] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--output-tx-path` | string file path of the transfer subnet ownership tx | +| `-s, --same-control-key` | use the fee-paying key as control key | +| `--subnet-auth-keys` | strings control keys that will be used to authenticate transfer subnet ownership tx | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--threshold` | uint32 required number of control key signatures to make subnet changes | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### configure + +AvalancheGo nodes support several different configuration files. Subnets have their own +Subnet config which applies to all chains/VMs in the Subnet. Each chain within the Subnet +can have its own chain config. A chain can also have special requirements for the AvalancheGo node +configuration itself. This command allows you to set all those files. + +**Usage:** `avalanche subnet configure [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--chain-config` | string path to the chain configuration | +| `-h, --help` | help for configure | +| `--node-config` | string path to avalanchego node configuration | +| `--per-node-chain-config` | string path to per node chain configuration for local network | +| `--subnet-config` | string path to the subnet configuration | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### create + +The blockchain create command builds a new genesis file to configure your Blockchain. +By default, the command runs an interactive wizard. It walks you through +all the steps you need to create your first Blockchain. + +The tool supports deploying Subnet-EVM, and custom VMs. You +can create a custom, user-generated genesis with a custom VM by providing +the path to your genesis and VM binaries with the --genesis and --vm flags. + +By default, running the command with a blockchainName that already exists +causes the command to fail. If you'd like to overwrite an existing +configuration, pass the -f flag. + +**Usage:** `avalanche subnet create [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--custom` | use a custom VM template | +| `--custom-vm-branch` | string custom vm branch or commit | +| `--custom-vm-build-script` | string custom vm build-script | +| `--custom-vm-path` | string file path of custom vm to use | +| `--custom-vm-repo-url` | string custom vm repository url | +| `--debug` | enable blockchain debugging | +| `--evm` | use the Subnet-EVM as the base template | +| `--evm-chain-id` | uint chain ID to use with Subnet-EVM | +| `--evm-defaults` | deprecation notice: use '--production-defaults' | +| `--evm-token` | string token symbol to use with Subnet-EVM | +| `--external-gas-token` | use a gas token from another blockchain | +| `-f, --force` | overwrite the existing configuration if one exists | +| `--from-github-repo` | generate custom VM binary from github repository | +| `--genesis` | string file path of genesis to use | +| `-h, --help` | help for create | +| `--latest` | use latest Subnet-EVM released version, takes precedence over --vm-version | +| `--pre-release` | use latest Subnet-EVM pre-released version, takes precedence over --vm-version | +| `--production-defaults` | use default production settings for your blockchain | +| `--teleporter` | interoperate with other blockchains using teleporter | +| `--test-defaults` | use default test settings for your blockchain | +| `--vm` | string file path of custom vm to use. alias to custom-vm-path | +| `--vm-version` | string version of Subnet-EVM template to use | +| `--warp` | generate a vm with warp support (needed for teleporter) (default true) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### delete + +The blockchain delete command deletes an existing blockchain configuration. + +**Usage:** `avalanche subnet delete [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for delete | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### deploy + +The blockchain deploy command deploys your Blockchain configuration locally, to Fuji Testnet, or to Mainnet. + +At the end of the call, the command prints the RPC URL you can use to interact with the Subnet. + +Avalanche-CLI only supports deploying an individual Blockchain once per network. Subsequent +attempts to deploy the same Blockchain to the same network (local, Fuji, Mainnet) aren't +allowed. If you'd like to redeploy a Blockchain locally for testing, you must first call +avalanche network clean to reset all deployed chain state. Subsequent local deploys +redeploy the chain with fresh state. You can deploy the same Blockchain to multiple networks, +so you can take your locally tested Subnet and deploy it on Fuji or Mainnet. + +**Usage:** `avalanche subnet deploy [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--avalanchego-path` | string use this avalanchego binary path | +| `--avalanchego-version` | string use this version of avalanchego (ex: v1.17.12) (default "latest") | +| `--cluster` | string operate on the given cluster | +| `--control-keys` | strings addresses that may make subnet changes | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-e, --ewoq` | use ewoq key [fuji/devnet deploy only] | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for deploy | +| `-k, --key` | string select the key to use [fuji/devnet deploy only] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji/devnet) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--mainnet-chain-id` | uint32 use different ChainID for mainnet deployment | +| `--output-tx-path` | string file path of the blockchain creation tx | +| `-s, --same-control-key` | use the fee-paying key as control key | +| `--skip-local-teleporter` | skip automatic teleporter deploy on local networks [to be deprecated] | +| `--skip-relayer` | skip relayer deploy | +| `--skip-teleporter-deploy` | skip automatic teleporter deploy | +| `--subnet-auth-keys` | strings control keys that will be used to authenticate chain creation | +| `-u, --subnet-id` | string do not create a subnet, deploy the blockchain into the given subnet id | +| `--subnet-only` | only create a subnet | +| `--teleporter-messenger-contract-address-path` | string path to an interchain messenger contract address file | +| `--teleporter-messenger-deployer-address-path` | string path to an interchain messenger deployer address file | +| `--teleporter-messenger-deployer-tx-path` | string path to an interchain messenger deployer tx file | +| `--teleporter-registry-bytecode-path` | string path to an interchain messenger registry bytecode file | +| `--teleporter-version` | string teleporter version to deploy (default "latest") | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--threshold` | uint32 required number of control key signatures to make subnet changes | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### describe + +The blockchain describe command prints the details of a Blockchain configuration to the console. +By default, the command prints a summary of the configuration. By providing the --genesis +flag, the command instead prints out the raw genesis file. + +**Usage:** `avalanche subnet describe [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-g, --genesis` | Print the genesis to the console directly instead of the summary | +| `-h, --help` | help for describe | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### export + +The blockchain export command write the details of an existing Blockchain deploy to a file. + +The command prompts for an output path. You can also provide one with +the --output flag. + +**Usage:** `avalanche subnet export [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--custom-vm-branch` | string custom vm branch | +| `--custom-vm-build-script` | string custom vm build-script | +| `--custom-vm-repo-url` | string custom vm repository url | +| `-h, --help` | help for export | +| `-o, --output` | string write the export data to the provided file path | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### import + +Import blockchain configurations into avalanche-cli. + +This command suite supports importing from a file created on another computer, +or importing from blockchains running public networks +(e.g. created manually or with the deprecated subnet-cli) + +**Usage:** `avalanche subnet import [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for import | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`file`](#import-file): The blockchain import command will import a blockchain configuration from a file or a git repository. + +To import from a file, you can optionally provide the path as a command-line argument. +Alternatively, running the command without any arguments triggers an interactive wizard. +To import from a repository, go through the wizard. By default, an imported Blockchain doesn't +overwrite an existing Blockchain with the same name. To allow overwrites, provide the --force +flag. +- [`public`](#import-public): The blockchain import public command imports a Blockchain configuration from a running network. + +By default, an imported Blockchain +doesn't overwrite an existing Blockchain with the same name. To allow overwrites, provide the --force +flag. + +#### import file + +The blockchain import command will import a blockchain configuration from a file or a git repository. + +To import from a file, you can optionally provide the path as a command-line argument. +Alternatively, running the command without any arguments triggers an interactive wizard. +To import from a repository, go through the wizard. By default, an imported Blockchain doesn't +overwrite an existing Blockchain with the same name. To allow overwrites, provide the --force +flag. + +**Usage:** `avalanche subnet import file [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--branch` | string the repo branch to use if downloading a new repo | +| `-f, --force` | overwrite the existing configuration if one exists | +| `-h, --help` | help for file | +| `--repo` | string the repo to import (ex: ava-labs/avalanche-plugins-core) or url to download the repo from | +| `--subnet` | string the subnet configuration to import from the provided repo | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +#### import public + +The blockchain import public command imports a Blockchain configuration from a running network. + +By default, an imported Blockchain +doesn't overwrite an existing Blockchain with the same name. To allow overwrites, provide the --force +flag. + +**Usage:** `avalanche subnet import public [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--blockchain-id` | string the blockchain ID | +| `--cluster` | string operate on the given cluster | +| `--custom` | use a custom VM template | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `--evm` | import a subnet-evm | +| `--force` | overwrite the existing configuration if one exists | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for public | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--node-url` | string [optional] URL of an already running subnet validator | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### join + +The subnet join command configures your validator node to begin validating a new Blockchain. + +To complete this process, you must have access to the machine running your validator. If the +CLI is running on the same machine as your validator, it can generate or update your node's +config file automatically. Alternatively, the command can print the necessary instructions +to update your node manually. To complete the validation process, the Subnet's admins must add +the NodeID of your validator to the Subnet's allow list by calling addValidator with your +NodeID. + +After you update your validator's config, you need to restart your validator manually. If +you provide the --avalanchego-config flag, this command attempts to edit the config file +at that path. + +This command currently only supports Blockchains deployed on the Fuji Testnet and Mainnet. + +**Usage:** `avalanche subnet join [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--avalanchego-config` | string file path of the avalanchego config file | +| `--cluster` | string operate on the given cluster | +| `--data-dir` | string path of avalanchego's data dir directory | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `--force-write` | if true, skip to prompt to overwrite the config file | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for join | +| `-k, --key` | string select the key to use [fuji only] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--nodeID` | string set the NodeID of the validator to check | +| `--plugin-dir` | string file path of avalanchego's plugin directory | +| `--print` | if true, print the manual config without prompting | +| `--stake-amount` | uint amount of tokens to stake on validator | +| `--staking-period` | duration how long validator validates for after start time | +| `--start-time` | string start time that validator starts validating | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### list + +The blockchain list command prints the names of all created Blockchain configurations. Without any flags, +it prints some general, static information about the Blockchain. With the --deployed flag, the command +shows additional information including the VMID, BlockchainID and SubnetID. + +**Usage:** `avalanche subnet list [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--deployed` | show additional deploy information | +| `-h, --help` | help for list | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### publish + +The blockchain publish command publishes the Blockchain's VM to a repository. + +**Usage:** `avalanche subnet publish [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--alias` | string We publish to a remote repo, but identify the repo locally under a user-provided alias (e.g. myrepo). | +| `--force` | If true, ignores if the subnet has been published in the past, and attempts a forced publish. | +| `-h, --help` | help for publish | +| `--no-repo-path` | string Do not let the tool manage file publishing, but have it only generate the files and put them in the location given by this flag. | +| `--repo-url` | string The URL of the repo where we are publishing | +| `--subnet-file-path` | string Path to the Subnet description file. If not given, a prompting sequence will be initiated. | +| `--vm-file-path` | string Path to the VM description file. If not given, a prompting sequence will be initiated. | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### removeValidator + +The blockchain removeValidator command stops a whitelisted, subnet network validator from +validating your deployed Blockchain. + +To remove the validator from the Subnet's allow list, provide the validator's unique NodeID. You can bypass +these prompts by providing the values with flags. + +**Usage:** `avalanche subnet removeValidator [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for removeValidator | +| `-k, --key` | string select the key to use [fuji deploy only] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `--nodeID` | string set the NodeID of the validator to remove | +| `--output-tx-path` | string file path of the removeValidator tx | +| `--subnet-auth-keys` | strings control keys that will be used to authenticate the removeValidator tx | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### stats + +The blockchain stats command prints validator statistics for the given Blockchain. + +**Usage:** `avalanche subnet stats [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for stats | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### upgrade + +The blockchain upgrade command suite provides a collection of tools for +updating your developmental and deployed Blockchains. + +**Usage:** `avalanche subnet upgrade [subcommand] [flags]` -```bash - --aws-profile string aws profile to use (default "default") - --disk-size string Disk size to resize in Gb (e.g. 1000Gb) - -h, --help help for resize - --node-type string Node type to resize (e.g. t3.2xlarge) -``` +**Flags:** -Network[​](#network "Direct link to heading") ---------------------------------------------- +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for upgrade | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`apply`](#upgrade-apply): Apply generated upgrade bytes to running Blockchain nodes to trigger a network upgrade. + +For public networks (Fuji Testnet or Mainnet), to complete this process, +you must have access to the machine running your validator. +If the CLI is running on the same machine as your validator, it can manipulate your node's +configuration automatically. Alternatively, the command can print the necessary instructions +to upgrade your node manually. -The `network` command suite provides a collection of tools for managing local Avalanche L1 deployments. +After you update your validator's configuration, you need to restart your validator manually. +If you provide the --avalanchego-chain-config-dir flag, this command attempts to write the upgrade file at that path. +Refer to https://docs.avax.network/nodes/maintain/chain-config-flags#subnet-chain-configs for related documentation. +- [`export`](#upgrade-export): Export the upgrade bytes file to a location of choice on disk +- [`generate`](#upgrade-generate): The blockchain upgrade generate command builds a new upgrade.json file to customize your Blockchain. It +guides the user through the process using an interactive wizard. +- [`import`](#upgrade-import): Import the upgrade bytes file into the local environment +- [`print`](#upgrade-print): Print the upgrade.json file content +- [`vm`](#upgrade-vm): The blockchain upgrade vm command enables the user to upgrade their Blockchain's VM binary. The command +can upgrade both local Blockchains and publicly deployed Blockchains on Fuji and Mainnet. + +The command walks the user through an interactive wizard. The user can skip the wizard by providing +command line flags. -When you deploy an Avalanche L1 locally, it runs on a local, multi-node Avalanche network. The `blockchain deploy` command starts this network in the background. This command suite allows you to shutdown, restart, and clear that network. +#### upgrade apply -This network currently supports multiple, concurrently deployed Avalanche L1s. +Apply generated upgrade bytes to running Blockchain nodes to trigger a network upgrade. -### Clean +For public networks (Fuji Testnet or Mainnet), to complete this process, +you must have access to the machine running your validator. +If the CLI is running on the same machine as your validator, it can manipulate your node's +configuration automatically. Alternatively, the command can print the necessary instructions +to upgrade your node manually. -The `network clean` command shuts down your local, multi-node network. All deployed Avalanche L1s shutdown and delete their state. You can restart the network by deploying a new Avalanche L1 configuration. +After you update your validator's configuration, you need to restart your validator manually. +If you provide the --avalanchego-chain-config-dir flag, this command attempts to write the upgrade file at that path. +Refer to https://docs.avax.network/nodes/maintain/chain-config-flags#subnet-chain-configs for related documentation. -**Usage**: +**Usage:** `avalanche subnet upgrade apply [subcommand] [flags]` -```bash -avalanche network clean [flags] -``` +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--avalanchego-chain-config-dir` | string avalanchego's chain config file directory (default "/Users/owen.wahlgren/.avalanchego/chains") | +| `--config` | create upgrade config for future subnet deployments (same as generate) | +| `--force` | If true, don't prompt for confirmation of timestamps in the past | +| `--fuji` | fuji apply upgrade existing fuji deployment (alias for `testnet`) | +| `-h, --help` | help for apply | +| `--local` | local apply upgrade existing local deployment | +| `--mainnet` | mainnet apply upgrade existing mainnet deployment | +| `--print` | if true, print the manual config without prompting (for public networks only) | +| `--testnet` | testnet apply upgrade existing testnet deployment (alias for `fuji`) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -**Flags**: +#### upgrade export -```bash - --hard Also clean downloaded avalanchego and plugin binaries --h, --help help for clean -``` +Export the upgrade bytes file to a location of choice on disk -### Start +**Usage:** `avalanche subnet upgrade export [subcommand] [flags]` -The `network start` command starts a local, multi-node Avalanche network on your machine. +**Flags:** -By default, the command loads the default snapshot. If you provide the `--snapshot-name` flag, the network loads that snapshot instead. The command fails if the local network is already running. +| Flag | Description | +| ---- | ----------- | +| `--force` | If true, overwrite a possibly existing file without prompting | +| `-h, --help` | help for export | +| `--upgrade-filepath` | string Export upgrade bytes file to location of choice on disk | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -**Usage**: +#### upgrade generate -```bash -avalanche network start [flags] -``` +The blockchain upgrade generate command builds a new upgrade.json file to customize your Blockchain. It +guides the user through the process using an interactive wizard. -**Flags**: +**Usage:** `avalanche subnet upgrade generate [subcommand] [flags]` -```bash - --avalanchego-path string use this avalanchego binary path - --avalanchego-version string use this version of avalanchego (ex: v1.17.12) (default "latest") --h, --help help for start - --snapshot-name string name of snapshot to use to start the network from (default "default-1654102509") -``` +**Flags:** -### Status +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for generate | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -The `network status` command prints whether or not a local Avalanche network is running and some basic stats about the network. +#### upgrade import -**Usage**: +Import the upgrade bytes file into the local environment -```bash -avalanche network status [flags] -``` +**Usage:** `avalanche subnet upgrade import [subcommand] [flags]` -**Flags**: +**Flags:** -```bash --h, --help help for status -``` +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for import | +| `--upgrade-filepath` | string Import upgrade bytes file into local environment | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -### Stop +#### upgrade print -The `network stop` command shuts down your local, multi-node network. +Print the upgrade.json file content -All deployed Avalanche L1s shutdown gracefully and save their state. If you provide the `--snapshot-name` flag, the network saves its state under this named snapshot. You can reload this snapshot with `network start --snapshot-name `. Otherwise, the network saves to the default snapshot, overwriting any existing state. You can reload the default snapshot with `network start`. +**Usage:** `avalanche subnet upgrade print [subcommand] [flags]` -**Usage**: +**Flags:** -```bash -avalanche network stop [flags] -``` +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for print | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -**Flags**: +#### upgrade vm -```bash --h, --help help for stop - --snapshot-name string name of snapshot to use to save network state into (default "default-1654102509") -``` +The blockchain upgrade vm command enables the user to upgrade their Blockchain's VM binary. The command +can upgrade both local Blockchains and publicly deployed Blockchains on Fuji and Mainnet. -Transaction[​](#transaction "Direct link to heading") ------------------------------------------------------ +The command walks the user through an interactive wizard. The user can skip the wizard by providing +command line flags. -The `transaction` command suite provides all of the utilities required to sign multisig transactions. +**Usage:** `avalanche subnet upgrade vm [subcommand] [flags]` -### Commit +**Flags:** -The `transaction commit` command commits a transaction by submitting it to the P-Chain. +| Flag | Description | +| ---- | ----------- | +| `--binary` | string Upgrade to custom binary | +| `--config` | upgrade config for future subnet deployments | +| `--fuji` | fuji upgrade existing fuji deployment (alias for `testnet`) | +| `-h, --help` | help for vm | +| `--latest` | upgrade to latest version | +| `--local` | local upgrade existing local deployment | +| `--mainnet` | mainnet upgrade existing mainnet deployment | +| `--plugin-dir` | string plugin directory to automatically upgrade VM | +| `--print` | print instructions for upgrading | +| `--testnet` | testnet upgrade existing testnet deployment (alias for `fuji`) | +| `--version` | string Upgrade to custom version | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -**Usage**: +### validators -```bash -avalanche transaction commit [blockchainName] [flags] -``` +The blockchain validators command lists the validators of a blockchain's subnet and provides +several statistics about them. -**Flags**: +**Usage:** `avalanche subnet validators [subcommand] [flags]` -```bash --h, --help help for commit - --input-tx-filepath string Path to the transaction signed by all signatories -``` +**Flags:** -### Sign +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for validators | +| `-l, --local` | operate on a local network | +| `-m, --mainnet` | operate on mainnet | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -The `transaction sign` command signs a multisig transaction. +### vmid -**Usage**: +The blockchain vmid command prints the virtual machine ID (VMID) for the given Blockchain. -```bash -avalanche transaction sign [blockchainName] [flags] -``` +**Usage:** `avalanche subnet vmid [subcommand] [flags]` -**Flags**: +**Flags:** -```bash --h, --help help for sign - --input-tx-filepath string Path to the transaction file for signing --k, --key string select the key to use [fuji only] --g, --ledger use ledger instead of key (always true on mainnet, defaults to false on fuji) - --ledger-addrs strings use the given ledger addresses -``` +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for vmid | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -Key[​](#key "Direct link to heading") -------------------------------------- +## avalanche teleporter -The `key` command suite provides a collection of tools for creating and managing signing keys. You can use these keys to deploy Avalanche L1s to the Fuji Testnet, but these keys are NOT suitable to use in production environments. DO NOT use these keys on Mainnet. +The teleporter command suite provides a collection of tools for interacting +with Teleporter-Enabled Subnets. -To get started, use the `key create` command. +**Usage:** `avalanche teleporter [subcommand] [flags]` -### Create +**Flags:** -The `key create` command generates a new private key to use for creating and controlling test Avalanche L1s. Keys generated by this command are NOT cryptographically secure enough to use in production environments. DO NOT use these keys on Mainnet. +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for teleporter | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`bridge`](#teleporter-bridge): The bridge command suite provides tools to deploy and manage Teleporter Bridges. + +Deprecation notice: use avalanche interchain tokenTransferrer' instead +- [`deploy`](#teleporter-deploy): Deploys Teleporter into a given Network and Subnet. +- [`msg`](#teleporter-msg): Sends and wait reception for a teleporter msg between two subnets (Currently only for local network). +- [`relayer`](#teleporter-relayer): The relayer command suite provides a collection of tools for deploying +and configuring an ICM relayers. + +### bridge + +The bridge command suite provides tools to deploy and manage Teleporter Bridges. + +Deprecation notice: use avalanche interchain tokenTransferrer' instead + +**Usage:** `avalanche teleporter bridge [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for bridge | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`deploy`](#bridge-deploy): Deploys Token Bridge into a given Network and Subnets + +Deprecation notice: use 'avalanche interchain tokenTransferrer deploy + +#### bridge deploy + +Deploys Token Bridge into a given Network and Subnets + +Deprecation notice: use 'avalanche interchain tokenTransferrer deploy + +**Usage:** `avalanche teleporter bridge deploy [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--c-chain-home` | set the Transferrer's Home Chain into C-Chain | +| `--c-chain-remote` | set the Transferrer's Remote Chain into C-Chain | +| `--cluster` | string operate on the given cluster | +| `--deploy-erc20-home` | string deploy a Transferrer Home for the given Chain's ERC20 Token | +| `--deploy-native-home` | deploy a Transferrer Home for the Chain's Native Token | +| `--deploy-native-remote` | deploy a Transferrer Remote for the Chain's Native Token | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for deploy | +| `--home-blockchain` | string set the Transferrer's Home Chain into the given CLI blockchain | +| `--home-genesis-key` | use genesis allocated key to deploy Transferrer Home | +| `--home-key` | string CLI stored key to use to deploy Transferrer Home | +| `--home-private-key` | string private key to use to deploy Transferrer Home | +| `--home-rpc` | string use the given RPC URL to connect to the home blockchain | +| `-l, --local` | operate on a local network | +| `--remote-blockchain` | string set the Transferrer's Remote Chain into the given CLI blockchain | +| `--remote-genesis-key` | use genesis allocated key to deploy Transferrer Remote | +| `--remote-key` | string CLI stored key to use to deploy Transferrer Remote | +| `--remote-private-key` | string private key to use to deploy Transferrer Remote | +| `--remote-rpc` | string use the given RPC URL to connect to the remote blockchain | +| `--remote-token-decimals` | uint8 use the given number of token decimals for the Transferrer Remote [defaults to token home's decimals (18 for a new wrapped native home token)] | +| `--remove-minter-admin` | remove the native minter precompile admin found on remote blockchain genesis | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--use-home` | string use the given Transferrer's Home Address | +| `--version` | string tag/branch/commit of Avalanche Interchain Token Transfer (ICTT) to be used (defaults to main branch) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### deploy + +Deploys Teleporter into a given Network and Subnet. + +**Usage:** `avalanche teleporter deploy [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--blockchain` | string deploy ICM into the given CLI blockchain | +| `--blockchain-id` | string deploy ICM into the given blockchain ID/Alias | +| `--c-chain` | deploy ICM into C-Chain | +| `--cluster` | string operate on the given cluster | +| `--deploy-messenger` | deploy Teleporter Messenger (default true) | +| `--deploy-registry` | deploy Teleporter Registry (default true) | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `--genesis-key` | use genesis allocated key to fund ICM deploy | +| `-h, --help` | help for deploy | +| `--key` | string CLI stored key to use to fund ICM deploy | +| `-l, --local` | operate on a local network | +| `--messenger-contract-address-path` | string path to a messenger contract address file | +| `--messenger-deployer-address-path` | string path to a messenger deployer address file | +| `--messenger-deployer-tx-path` | string path to a messenger deployer tx file | +| `--private-key` | string private key to use to fund ICM deploy | +| `--registry-bytecode-path` | string path to a registry bytecode file | +| `--rpc-url` | string use the given RPC URL to connect to the subnet | +| `--subnet` | string deploy ICM into the given CLI blockchain | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--version` | string version to deploy (default "latest") | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### msg + +Sends and wait reception for a teleporter msg between two subnets (Currently only for local network). + +**Usage:** `avalanche teleporter msg [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--dest-rpc` | string use the given destination blockchain rpc endpoint | +| `--destination-address` | string deliver the message to the given contract destination address | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `--genesis-key` | use genesis allocated key as message originator and to pay source blockchain fees | +| `-h, --help` | help for msg | +| `--hex-encoded` | given message is hex encoded | +| `--key` | string CLI stored key to use as message originator and to pay source blockchain fees | +| `-l, --local` | operate on a local network | +| `--private-key` | string private key to use as message originator and to pay source blockchain fees | +| `--source-rpc` | string use the given source blockchain rpc endpoint | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +### relayer + +The relayer command suite provides a collection of tools for deploying +and configuring an ICM relayers. + +**Usage:** `avalanche teleporter relayer [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for relayer | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +**Subcommands:** + +- [`deploy`](#relayer-deploy): Deploys an ICM Relayer for the given Network. +- [`logs`](#relayer-logs): Shows pretty formatted AWM relayer logs +- [`start`](#relayer-start): Starts AWM relayer on the specified network (Currently only for local network). +- [`stop`](#relayer-stop): Stops AWM relayer on the specified network (Currently only for local network, cluster). + +#### relayer deploy + +Deploys an ICM Relayer for the given Network. + +**Usage:** `avalanche teleporter relayer deploy [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--devnet` | operate on a devnet network | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for deploy | +| `-l, --local` | operate on a local network | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--version` | string version to deploy (default "latest") | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | + +#### relayer logs + +Shows pretty formatted AWM relayer logs + +**Usage:** `avalanche teleporter relayer logs [subcommand] [flags]` + +**Flags:** + +| Flag | Description | +| ---- | ----------- | +| `--endpoint` | string use the given endpoint for network operations | +| `--first` | uint output first N log lines | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for logs | +| `--last` | uint output last N log lines | +| `-l, --local` | operate on a local network | +| `--raw` | raw logs output | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -The command works by generating a secp256 key and storing it with the provided `keyName`. You can use this key in other commands by providing this `keyName`. +#### relayer start -If you'd like to import an existing key instead of generating one from scratch, provide the `--file` flag. +Starts AWM relayer on the specified network (Currently only for local network). -**Usage**: +**Usage:** `avalanche teleporter relayer start [subcommand] [flags]` -```bash -avalanche key create [keyName] [flags] -``` +**Flags:** -**Flags**: +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for start | +| `-l, --local` | operate on a local network | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -```bash - --file string import the key from an existing key file --f, --force overwrite an existing key with the same name --h, --help help for create -``` +#### relayer stop -### Delete +Stops AWM relayer on the specified network (Currently only for local network, cluster). -The `key delete` command deletes an existing signing key. +**Usage:** `avalanche teleporter relayer stop [subcommand] [flags]` -To delete a key, provide the `keyName`. The command prompts for confirmation before deleting the key. To skip the confirmation, provide the `--force` flag. +**Flags:** -**Usage**: +| Flag | Description | +| ---- | ----------- | +| `--cluster` | string operate on the given cluster | +| `--endpoint` | string use the given endpoint for network operations | +| `-f, --fuji` | testnet operate on fuji (alias to testnet | +| `-h, --help` | help for stop | +| `-l, --local` | operate on a local network | +| `-t, --testnet` | fuji operate on testnet (alias to fuji) | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -```bash -avalanche key delete [keyName] [flags] -``` +## avalanche transaction -**Flags**: +The transaction command suite provides all of the utilities required to sign multisig transactions. -```bash --f, --force delete the key without confirmation --h, --help help for delete -``` +**Usage:** `avalanche transaction [subcommand] [flags]` -### Export +**Flags:** -The `key export` command exports a created signing key. You can use an exported key in other applications or import it into another instance of Avalanche-CLI. +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for transaction | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -By default, the tool writes the hex encoded key to stdout. If you provide the `--output` flag, the command writes the key to a file of your choosing. +**Subcommands:** -**Usage**: +- [`commit`](#transaction-commit): The transaction commit command commits a transaction by submitting it to the P-Chain. +- [`sign`](#transaction-sign): The transaction sign command signs a multisig transaction. -`avalanche key export [keyName] [flags]` +### commit -**Flags**: +The transaction commit command commits a transaction by submitting it to the P-Chain. -```bash --h, --help help for export --o, --output string write the key to the provided file path -``` +**Usage:** `avalanche transaction commit [subcommand] [flags]` -### List +**Flags:** -The `key list` command prints information for all stored signing keys or for the ledger addresses associated to certain indices. +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for commit | +| `--input-tx-filepath` | string Path to the transaction signed by all signatories | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -**Usage**: +### sign -```bash -avalanche key list [flags] -``` +The transaction sign command signs a multisig transaction. -**Flags**: +**Usage:** `avalanche transaction sign [subcommand] [flags]` -```bash --a, --all-networks list all network addresses --c, --cchain list C-Chain addresses (default true) --f, --fuji list testnet (fuji) network addresses --h, --help help for list --g, --ledger uints list ledger addresses for the given indices (default []) --l, --local list local network addresses --m, --mainnet list mainnet network addresses - --pchain list P-Chain addresses (default true) - --subnet string provide balance information for the given subnet (Subnet-Evm based only) --t, --testnet list testnet (fuji) network addresses --n, --use-nano-avax use nano Avax for balances - --xchain list X-Chain addresses (default true) -``` +**Flags:** -### Transfer +| Flag | Description | +| ---- | ----------- | +| `-h, --help` | help for sign | +| `--input-tx-filepath` | string Path to the transaction file for signing | +| `-k, --key` | string select the key to use [fuji only] | +| `-g, --ledger` | use ledger instead of key (always true on mainnet, defaults to false on fuji) | +| `--ledger-addrs` | strings use the given ledger addresses | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions | -The `key transfer` command allows to transfer funds between stored keys or ledger addresses. +## avalanche update -**Usage**: +Check if an update is available, and prompt the user to install it -```bash -avalanche key transfer [options] [flags] -``` +**Usage:** `avalanche update [subcommand] [flags]` -**Flags**: +**Flags:** -```bash --o, --amount float amount to send or receive (AVAX units) --f, --force avoid transfer confirmation --u, --fuji transfer between testnet (fuji) addresses - --fund-p-chain fund P-Chain account on target - --fund-x-chain fund X-Chain account on target --h, --help help for transfer --k, --key string key associated to the sender or receiver address --i, --ledger uint32 ledger index associated to the sender or receiver address (default 32768) --l, --local transfer between local network addresses --m, --mainnet transfer between mainnet addresses --g, --receive receive the transfer --r, --receive-recovery-step uint receive step to use for multiple step transaction recovery --s, --send send the transfer --a, --target-addr string receiver address --t, --testnet transfer between testnet (fuji) addresses -``` +| Flag | Description | +| ---- | ----------- | +| `-c, --confirm` | Assume yes for installation | +| `-h, --help` | help for update | +| `-v, --version` | version for update | +| `--config` | string config file (default is $HOME/.avalanche-cli/config.json) | +| `--log-level` | string log level for the application (default "ERROR") | +| `--skip-update-check` | skip check for new versions |