logoDeveloper Hub

Introduction

Avalanche-CLI is a command-line tool that gives developers access to everything Avalanche.

To get started, look at the documentation for the subcommands or jump right in with

avalanche blockchain create myblockchain

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:

-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: 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: The blockchain changeOwner changes the owner of the subnet of the deployed Blockchain.
  • changeWeight: The blockchain changeWeight command changes the weight of a Subnet Validator.

The Subnet has to be a Proof of Authority Subnet-Only Validator 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: 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: The blockchain delete command deletes an existing blockchain configuration.
  • 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: 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: 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: 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: 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: 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: The blockchain publish command publishes the Blockchain's VM to a repository.
  • 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: The blockchain stats command prints validator statistics for the given Blockchain.
  • upgrade: The blockchain upgrade command suite provides a collection of tools for updating your developmental and deployed Blockchains.
  • validators: The blockchain validators command lists the validators of a blockchain's subnet and provides several statistics about them.
  • 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:

--aggregator-extra-endpoints strings    endpoints for extra nodes that are needed in signature aggregation
--aggregator-log-level string           log level to use with signature aggregator (default "Off")
--balance uint                          set the AVAX balance of the validator that will be used for continuous fee to P-Chain
--blockchain-genesis-key use            genesis allocated key to pay fees for completing the validator's registration (blockchain gas token)
--blockchain-key string                 CLI stored key to use to pay fees for completing the validator's registration (blockchain gas token)
--blockchain-private-key string         private key to use to pay fees for completing the validator's registration (blockchain gas token)
--bls-proof-of-possession string        set the BLS proof of possession of the validator to add
--bls-public-key string                 set the BLS public key of the validator to add
--cluster string                        operate on the given cluster
--default-duration                      (for non sovereign blockchain) set duration so as to validate until primary validator ends its period
--default-start-time                    (for non sovereign blockchain) use default start time for subnet validator (5 minutes later for fuji & mainnet, 30 seconds later for devnet)
--default-validator-params              (for non sovereign blockchain) use default weight/start/duration params for subnet validator
--delegation-fee uint16                 (PoS only) delegation fee (in bips) (default 100)
--devnet operate                        on a devnet network
--disable-owner string                  P-Chain address that will able to disable the validator with a P-Chain transaction
--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
--node-endpoint string                  gather node id/bls from publicly available avalanchego apis on the given endpoint
--node-id string                        node-id of the validator to add
--output-tx-path string                 (for non sovereign blockchain) file path of the add validator tx
--remaining-balance-owner string        P-Chain address that will receive any leftover AVAX from the validator when it is removed from Subnet
--rpc string                            connect to validator manager at the given rpc endpoint
--stake-amount uint                     (PoS only) amount of tokens to stake
--staking-period duration               how long this validator will be staking
--start-time string                     (for non sovereign blockchain) UTC start time when this validator starts validating, in 'YYYY-MM-DD HH:MM:SS' format
--subnet-auth-keys strings              (for non sovereign blockchain) control keys that will be used to authenticate add validator tx
-t, --testnet fuji                      operate on testnet (alias to fuji)
--wait-for-tx-acceptance                (for non sovereign blockchain) just issue the add validator tx, without waiting for its acceptance (default true)
--weight uint                           set the staking weight of the validator to add (default 20)
--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:

--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

changeWeight

The blockchain changeWeight command changes the weight of a Subnet Validator.

The Subnet has to be a Proof of Authority Subnet-Only Validator Subnet.

Usage:

avalanche blockchain changeWeight [subcommand] [flags]

Flags:

--cluster string            operate on the given cluster
--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 changeWeight
-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
--node-id string            node-id of the validator
-t, --testnet fuji          operate on testnet (alias to fuji)
--weight uint               set the new staking weight of the validator (default 20)
--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:

--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:

--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 (default true)
--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
--icm-registry-at-genesis setup     ICM registry smart contract on genesis [experimental]
--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
--proof-of-authority use            proof of authority(PoA) for validator management
--proof-of-stake use                proof of stake(PoS) for validator management
--proxy-contract-owner string       EVM address that controls ProxyAdmin for TransparentProxy of ValidatorManager contract
--reward-basis-points uint          (PoS only) reward basis points for PoS Reward Calculator (default 100)
--sovereign set                     to false if creating non-sovereign blockchain (default true)
--teleporter interoperate           with other blockchains using teleporter
--test-defaults use                 default test settings for your blockchain
--validator-manager-owner string    EVM address that controls Validator Manager Owner
--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:

-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:

--aggregator-extra-endpoints strings                   endpoints for extra nodes that are needed in signature aggregation
--aggregator-log-level string                          log level to use with signature aggregator (default "Off")
--avalanchego-path string                              use this avalanchego binary path
--avalanchego-version string                           use this version of avalanchego (ex: v1.17.12) (default "latest")
--blockchain-genesis-key use                           genesis allocated key to fund validator manager initialization
--blockchain-key string                                CLI stored key to use to fund validator manager initialization
--blockchain-private-key string                        private key to use to fund validator manager initialization
--bootstrap-endpoints strings                          take validator node info from the given endpoints
--bootstrap-filepath string                            JSON file path that provides details about bootstrap validators, leave Node-ID and BLS values empty if using --generate-node-id=true
--change-owner-address string                          address that will receive change if node is no longer L1 validator
--cluster string                                       operate on the given cluster
--control-keys strings                                 addresses that may make subnet changes
--convert-only avoid                                   node track, restart and poa manager setup
--devnet operate                                       on a devnet network
--endpoint string                                      use the given endpoint for network operations
--etna-devnet operate                                  on an etna devnet network
-e, --ewoq use                                         ewoq key [fuji/devnet deploy only]
-f, --fuji testnet                                     operate on fuji (alias to testnet
--generate-node-id whether                             to create new node id for bootstrap validators (Node-ID and BLS values in bootstrap JSON file will be overridden if --bootstrap-filepath flag is used)
-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
--num-bootstrap-validators int                         (only if --generate-node-id is true) number of bootstrap validators to set up in sovereign L1 validator)
--num-local-nodes int                                  number of nodes to be created on local machine (default 5)
--output-tx-path string                                file path of the blockchain creation tx
--partial-sync set                                     primary network partial sync for new validators (default true)
--pos-maximum-stake-amount uint                        maximum stake amount (default 1000)
--pos-maximum-stake-multiplier uint8                   maximum stake multiplier (default 1)
--pos-minimum-delegation-fee uint16                    minimum delegation fee (default 1)
--pos-minimum-stake-amount uint                        minimum stake amount (default 1)
--pos-minimum-stake-duration uint                      minimum stake duration (default 100)
--pos-weight-to-value-factor uint                      weight to value factor (default 1)
--relayer-version string                               relayer version to deploy (default "latest")
-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
--use-local-machine use                                local machine as a blockchain validator
--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:

-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:

--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:

-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: 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: 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:

--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:

--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:

--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
--node-id 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:

--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:

--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:

--aggregator-extra-endpoints strings    endpoints for extra nodes that are needed in signature aggregation
--aggregator-log-level string           log level to use with signature aggregator (default "Off")
--blockchain-genesis-key use            genesis allocated key to pay fees for completing the validator's removal (blockchain gas token)
--blockchain-key string                 CLI stored key to use to pay fees for completing the validator's removal (blockchain gas token)
--blockchain-private-key string         private key to use to pay fees for completing the validator's removal (blockchain gas token)
--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
--node-endpoint string                  remove validator that responds to the given endpoint
--node-id string                        node-id of the validator
--output-tx-path string                 (for non-SOV blockchain only) file path of the removeValidator tx
--rpc string                            connect to validator manager at the given rpc endpoint
--subnet-auth-keys strings              (for non-SOV blockchain only) 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:

--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]

Flags:

-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: 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.

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: Export the upgrade bytes file to a location of choice on disk
  • 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: Import the upgrade bytes file into the local environment
  • print: Print the upgrade.json file content
  • 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.

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.

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:

avalanche blockchain upgrade apply [subcommand] [flags]

Flags:

--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

upgrade export

Export the upgrade bytes file to a location of choice on disk

Usage:

avalanche blockchain upgrade export [subcommand] [flags]

Flags:

--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

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.

Usage:

avalanche blockchain upgrade generate [subcommand] [flags]

Flags:

-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

upgrade import

Import the upgrade bytes file into the local environment

Usage:

avalanche blockchain upgrade import [subcommand] [flags]

Flags:

-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

upgrade print

Print the upgrade.json file content

Usage:

avalanche blockchain upgrade print [subcommand] [flags]

Flags:

-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

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.

Usage:

avalanche blockchain upgrade vm [subcommand] [flags]

Flags:

--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

validators

The blockchain validators command lists the validators of a blockchain's subnet and provides several statistics about them.

Usage:

avalanche blockchain validators [subcommand] [flags]

Flags:

--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

vmid

The blockchain vmid command prints the virtual machine ID (VMID) for the given Blockchain.

Usage:

avalanche blockchain vmid [subcommand] [flags]

Flags:

-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

avalanche config

Customize configuration for Avalanche-CLI

Usage:

avalanche config [subcommand] [flags]

Flags:

-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

Subcommands:

  • authorize-cloud-access: set preferences to authorize access to cloud resources
  • metrics: set user metrics collection preferences
  • migrate: migrate command migrates old ~/.avalanche-cli.json and ~/.avalanche-cli/config to /.avalanche-cli/config.json..
  • singleNode: set user preference between single node and five nodes local network
  • snapshotsAutoSave: set user preference between auto saving local network snapshots or not

authorize-cloud-access

set preferences to authorize access to cloud resources

Usage:

avalanche config authorize-cloud-access [subcommand] [flags]

Flags:

-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

metrics

set user metrics collection preferences

Usage:

avalanche config metrics [subcommand] [flags]

Flags:

-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

migrate

migrate command migrates old ~/.avalanche-cli.json and ~/.avalanche-cli/config to /.avalanche-cli/config.json..

Usage:

avalanche config migrate [subcommand] [flags]

Flags:

-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

singleNode

set user preference between single node and five nodes local network

Usage:

avalanche config singleNode [subcommand] [flags]

Flags:

-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

snapshotsAutoSave

set user preference between auto saving local network snapshots or not

Usage:

avalanche config snapshotsAutoSave [subcommand] [flags]

Flags:

-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

avalanche contract

The contract command suite provides a collection of tools for deploying and interacting with smart contracts.

Usage:

avalanche contract [subcommand] [flags]

Flags:

-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

Subcommands:

deploy

The contract command suite provides a collection of tools for deploying smart contracts.

Usage:

avalanche contract deploy [subcommand] [flags]

Flags:

-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

Subcommands:

  • erc20: Deploy an ERC20 token into a given Network and Blockchain

deploy erc20

Deploy an ERC20 token into a given Network and Blockchain

Usage:

avalanche contract deploy erc20 [subcommand] [flags]

Flags:

--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
--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

initValidatorManager

Initializes Proof of Authority(PoA) or Proof of Stake(PoS)Validator Manager contract on a Blockchain and sets up initial validator set on the Blockchain. For more info on Validator Manager, please head to https://github.com/ava-labs/teleporter/tree/staking-contract/contracts/validator-manager

Usage:

avalanche contract initValidatorManager [subcommand] [flags]

Flags:

--aggregator-extra-endpoints strings      endpoints for extra nodes that are needed in signature aggregation
--aggregator-log-level string             log level to use with signature aggregator (default "Off")
--cluster string                          operate on the given cluster
--devnet operate                          on a devnet network
--endpoint string                         use the given endpoint for network operations
--etna-devnet operate                     on an etna devnet network
-f, --fuji testnet                        operate on fuji (alias to testnet
--genesis-key use                         genesis allocated key as contract deployer
-h, --help help                           for initValidatorManager
--key string                              CLI stored key to use as contract deployer
-l, --local operate                       on a local network
--pos-maximum-stake-amount uint           (PoS only) maximum stake amount (default 1000)
--pos-maximum-stake-multiplier uint8      (PoS only )maximum stake multiplier (default 1)
--pos-minimum-delegation-fee uint16       (PoS only) minimum delegation fee (default 1)
--pos-minimum-stake-amount uint           (PoS only) minimum stake amount (default 1)
--pos-minimum-stake-duration uint         (PoS only) minimum stake duration (default 100)
--pos-reward-calculator-address string    (PoS only) initialize the ValidatorManager with reward calculator address
--pos-weight-to-value-factor uint         (PoS only) weight to value factor (default 1)
--private-key string                      private key to use as contract deployer
--rpc string                              deploy the contract into the given 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

avalanche help

Help provides help for any command in the application. Simply type avalanche help [path to command] for full details.

Usage:

avalanche help [subcommand] [flags]

Flags:

-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

avalanche ictt

The ictt command suite provides tools to deploy and manage Interchain Token Transferrers.

Usage:

avalanche ictt [subcommand] [flags]

Flags:

-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

Subcommands:

  • deploy: Deploys a Token Transferrer into a given Network and Subnets

deploy

Deploys a Token Transferrer into a given Network and Subnets

Usage:

avalanche ictt deploy [subcommand] [flags]

Flags:

--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:

-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: 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:

-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: Deploys a Token Transferrer into a given Network and Subnets

tokenTransferrer deploy

Deploys a Token Transferrer into a given Network and Subnets

Usage:

avalanche interchain tokenTransferrer deploy [subcommand] [flags]

Flags:

--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

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.

Usage:

avalanche key [subcommand] [flags]

Flags:

-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

Subcommands:

  • 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.

  • 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.

  • 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: The key list command prints information for all stored signing keys or for the ledger addresses associated to certain indices.
  • 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:

--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:

-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:

-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:

-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:

-o, --amount float                          amount to send or receive (AVAX or TOKEN units)
--c-chain-receiver receive                  at C-Chain
--c-chain-sender send                       from C-Chain
--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
-f, --fuji testnet                          operate on fuji (alias to testnet
-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)
--p-chain-receiver receive                  at P-Chain
--p-chain-sender send                       from P-Chain
--receiver-blockchain string                receive at the given CLI blockchain
--receiver-blockchain-id string             receive at the given blockchain ID/Alias
--sender-blockchain string                  send from the given CLI blockchain
--sender-blockchain-id string               send from the given blockchain ID/Alias
-t, --testnet fuji                          operate on testnet (alias to fuji)
--x-chain-receiver receive                  at X-Chain
--x-chain-sender send                       from X-Chain
--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:

-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: 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: 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: The network status command prints whether or not a local Avalanche network is running and some basic stats about the 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:

--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:

--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

status

The network status command prints whether or not a local Avalanche network is running and some basic stats about the network.

Usage:

avalanche network status [subcommand] [flags]

Flags:

-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

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.

Usage:

avalanche network stop [subcommand] [flags]

Flags:

--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

avalanche 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.

Usage:

avalanche node [subcommand] [flags]

Flags:

-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

Subcommands:

  • 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.

  • 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

  • destroy: (ALPHA Warning) This command is currently in experimental mode.

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.

  • 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: (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: (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: (ALPHA Warning) This command is currently in experimental mode.

The node list command lists all clusters together with their nodes.

  • 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.

  • local: (ALPHA Warning) This command is currently in experimental mode.

The node local command suite provides a collection of commands related to local nodes

  • 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: (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: (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: avalanchenodescp[cluster1node1]:/tmp/file.txt/tmp/file.txtavalanche 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: (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: (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: (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: (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: (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: (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: (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:

--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:

--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")
--bootstrap-ids stringArray                         nodeIDs of bootstrap nodes
--bootstrap-ips stringArray                         IP:port pairs of bootstrap nodes
--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
--etna-devnet operate                               on an etna devnet network
-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
--genesis string                                    path to genesis file
--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
--partial-sync primary                              network partial sync (default true)
--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)
--upgrade string                                    path to upgrade file
--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 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:

--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 devnet command suite provides a collection of commands related to devnets. You can check the updated status by calling avalanche node status clusterName

Usage:

avalanche node devnet [subcommand] [flags]

Flags:

-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: (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: (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 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:

avalanche node devnet deploy [subcommand] [flags]

Flags:

-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

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.

Usage:

avalanche node devnet wiz [subcommand] [flags]

Flags:

--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 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.

Usage:

avalanche node export [subcommand] [flags]

Flags:

--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

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.

Usage:

avalanche node import [subcommand] [flags]

Flags:

--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

list

(ALPHA Warning) This command is currently in experimental mode.

The node list command lists all clusters together with their nodes.

Usage:

avalanche node list [subcommand] [flags]

Flags:

-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:

-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: (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: (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.

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.

Usage:

avalanche node loadtest start [subcommand] [flags]

Flags:

--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:

-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

local

(ALPHA Warning) This command is currently in experimental mode.

The node local command suite provides a collection of commands related to local nodes

Usage:

avalanche node local [subcommand] [flags]

Flags:

-h, --help help             for local
--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:

  • destroy: Cleanup local node.
  • start: (ALPHA Warning) This command is currently in experimental mode.

The node local start command sets up a validator on a local server. 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 local

  • status: Get status of local node.
  • stop: Stop local node.
  • track: (ALPHA Warning) make the local node at the cluster to track given blockchain

local destroy

Cleanup local node.

Usage:

avalanche node local destroy [subcommand] [flags]

Flags:

-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

local start

(ALPHA Warning) This command is currently in experimental mode.

The node local start command sets up a validator on a local server. 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 local

Usage:

avalanche node local start [subcommand] [flags]

Flags:

--avalanchego-path string                           use this avalanchego binary path
--bootstrap-id stringArray                          nodeIDs of bootstrap nodes
--bootstrap-ip stringArray                          IP:port pairs of bootstrap nodes
--cluster string                                    operate on the given cluster
--custom-avalanchego-version string                 install given avalanchego version on node/s
--devnet operate                                    on a devnet network
--endpoint string                                   use the given endpoint for network operations
--etna-devnet operate                               on an etna devnet network
-f, --fuji testnet                                  operate on fuji (alias to testnet
--genesis string                                    path to genesis file
-h, --help help                                     for start
--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-config string                                path to common avalanchego config settings for all nodes
--num-nodes uint32                                  number of nodes to start (default 1)
--partial-sync primary                              network partial sync (default true)
--staking-cert-key-path string                      path to provided staking cert key for node
--staking-signer-key-path string                    path to provided staking signer key for node
--staking-tls-key-path string                       path to provided staking tls key for node
-t, --testnet fuji                                  operate on testnet (alias to fuji)
--upgrade string                                    path to upgrade file
--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

local status

Get status of local node.

Usage:

avalanche node local status [subcommand] [flags]

Flags:

--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

local stop

Stop local node.

Usage:

avalanche node local stop [subcommand] [flags]

Flags:

-h, --help help             for stop
--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

local track

(ALPHA Warning) make the local node at the cluster to track given blockchain

Usage:

avalanche node local track [subcommand] [flags]

Flags:

--avalanchego-path string    use this avalanchego binary path
-h, --help help              for track
--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 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:

--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 resize command can change the amount of CPU, memory and disk space available for the cluster nodes.

Usage:

avalanche node resize [subcommand] [flags]

Flags:

--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.

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: avalanchenodescp[cluster1node1]:/tmp/file.txt/tmp/file.txtavalanche 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

Usage:

avalanche node scp [subcommand] [flags]

Flags:

--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

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.

Usage:

avalanche node ssh [subcommand] [flags]

Flags:

-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 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

Usage:

avalanche node status [subcommand] [flags]

Flags:

--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

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

Usage:

avalanche node sync [subcommand] [flags]

Flags:

-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 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

Usage:

avalanche node update [subcommand] [flags]

Flags:

-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

Subcommands:

  • subnet: (ALPHA Warning) This command is currently in experimental mode.

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 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]

Flags:

-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

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

Usage:

avalanche node upgrade [subcommand] [flags]

Flags:

-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

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

Usage:

avalanche node validate [subcommand] [flags]

Flags:

-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

Subcommands:

  • primary: (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.

  • 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 validate primary command enables all nodes in a cluster to be validators of Primary Network.

Usage:

avalanche node validate primary [subcommand] [flags]

Flags:

-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

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

Usage:

avalanche node validate subnet [subcommand] [flags]

Flags:

--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:

-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:

-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: The primary addValidator command adds a node as a validator in the Primary Network
  • 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:

--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:

--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:

-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: 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: The blockchain changeOwner changes the owner of the subnet of the deployed Blockchain.
  • changeWeight: The blockchain changeWeight command changes the weight of a Subnet Validator.

The Subnet has to be a Proof of Authority Subnet-Only Validator 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: 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: The blockchain delete command deletes an existing blockchain configuration.
  • 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: 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: 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: 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: 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: 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: The blockchain publish command publishes the Blockchain's VM to a repository.
  • 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: The blockchain stats command prints validator statistics for the given Blockchain.
  • upgrade: The blockchain upgrade command suite provides a collection of tools for updating your developmental and deployed Blockchains.
  • validators: The blockchain validators command lists the validators of a blockchain's subnet and provides several statistics about them.
  • 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:

--aggregator-extra-endpoints strings    endpoints for extra nodes that are needed in signature aggregation
--aggregator-log-level string           log level to use with signature aggregator (default "Off")
--balance uint                          set the AVAX balance of the validator that will be used for continuous fee to P-Chain
--blockchain-genesis-key use            genesis allocated key to pay fees for completing the validator's registration (blockchain gas token)
--blockchain-key string                 CLI stored key to use to pay fees for completing the validator's registration (blockchain gas token)
--blockchain-private-key string         private key to use to pay fees for completing the validator's registration (blockchain gas token)
--bls-proof-of-possession string        set the BLS proof of possession of the validator to add
--bls-public-key string                 set the BLS public key of the validator to add
--cluster string                        operate on the given cluster
--default-duration                      (for non sovereign blockchain) set duration so as to validate until primary validator ends its period
--default-start-time                    (for non sovereign blockchain) use default start time for subnet validator (5 minutes later for fuji & mainnet, 30 seconds later for devnet)
--default-validator-params              (for non sovereign blockchain) use default weight/start/duration params for subnet validator
--delegation-fee uint16                 (PoS only) delegation fee (in bips) (default 100)
--devnet operate                        on a devnet network
--disable-owner string                  P-Chain address that will able to disable the validator with a P-Chain transaction
--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
--node-endpoint string                  gather node id/bls from publicly available avalanchego apis on the given endpoint
--node-id string                        node-id of the validator to add
--output-tx-path string                 (for non sovereign blockchain) file path of the add validator tx
--remaining-balance-owner string        P-Chain address that will receive any leftover AVAX from the validator when it is removed from Subnet
--rpc string                            connect to validator manager at the given rpc endpoint
--stake-amount uint                     (PoS only) amount of tokens to stake
--staking-period duration               how long this validator will be staking
--start-time string                     (for non sovereign blockchain) UTC start time when this validator starts validating, in 'YYYY-MM-DD HH:MM:SS' format
--subnet-auth-keys strings              (for non sovereign blockchain) control keys that will be used to authenticate add validator tx
-t, --testnet fuji                      operate on testnet (alias to fuji)
--wait-for-tx-acceptance                (for non sovereign blockchain) just issue the add validator tx, without waiting for its acceptance (default true)
--weight uint                           set the staking weight of the validator to add (default 20)
--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:

--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

changeWeight

The blockchain changeWeight command changes the weight of a Subnet Validator.

The Subnet has to be a Proof of Authority Subnet-Only Validator Subnet.

Usage:

avalanche subnet changeWeight [subcommand] [flags]

Flags:

--cluster string            operate on the given cluster
--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 changeWeight
-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
--node-id string            node-id of the validator
-t, --testnet fuji          operate on testnet (alias to fuji)
--weight uint               set the new staking weight of the validator (default 20)
--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:

--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:

--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 (default true)
--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
--icm-registry-at-genesis setup     ICM registry smart contract on genesis [experimental]
--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
--proof-of-authority use            proof of authority(PoA) for validator management
--proof-of-stake use                proof of stake(PoS) for validator management
--proxy-contract-owner string       EVM address that controls ProxyAdmin for TransparentProxy of ValidatorManager contract
--reward-basis-points uint          (PoS only) reward basis points for PoS Reward Calculator (default 100)
--sovereign set                     to false if creating non-sovereign blockchain (default true)
--teleporter interoperate           with other blockchains using teleporter
--test-defaults use                 default test settings for your blockchain
--validator-manager-owner string    EVM address that controls Validator Manager Owner
--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:

-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:

--aggregator-extra-endpoints strings                   endpoints for extra nodes that are needed in signature aggregation
--aggregator-log-level string                          log level to use with signature aggregator (default "Off")
--avalanchego-path string                              use this avalanchego binary path
--avalanchego-version string                           use this version of avalanchego (ex: v1.17.12) (default "latest")
--blockchain-genesis-key use                           genesis allocated key to fund validator manager initialization
--blockchain-key string                                CLI stored key to use to fund validator manager initialization
--blockchain-private-key string                        private key to use to fund validator manager initialization
--bootstrap-endpoints strings                          take validator node info from the given endpoints
--bootstrap-filepath string                            JSON file path that provides details about bootstrap validators, leave Node-ID and BLS values empty if using --generate-node-id=true
--change-owner-address string                          address that will receive change if node is no longer L1 validator
--cluster string                                       operate on the given cluster
--control-keys strings                                 addresses that may make subnet changes
--convert-only avoid                                   node track, restart and poa manager setup
--devnet operate                                       on a devnet network
--endpoint string                                      use the given endpoint for network operations
--etna-devnet operate                                  on an etna devnet network
-e, --ewoq use                                         ewoq key [fuji/devnet deploy only]
-f, --fuji testnet                                     operate on fuji (alias to testnet
--generate-node-id whether                             to create new node id for bootstrap validators (Node-ID and BLS values in bootstrap JSON file will be overridden if --bootstrap-filepath flag is used)
-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
--num-bootstrap-validators int                         (only if --generate-node-id is true) number of bootstrap validators to set up in sovereign L1 validator)
--num-local-nodes int                                  number of nodes to be created on local machine (default 5)
--output-tx-path string                                file path of the blockchain creation tx
--partial-sync set                                     primary network partial sync for new validators (default true)
--pos-maximum-stake-amount uint                        maximum stake amount (default 1000)
--pos-maximum-stake-multiplier uint8                   maximum stake multiplier (default 1)
--pos-minimum-delegation-fee uint16                    minimum delegation fee (default 1)
--pos-minimum-stake-amount uint                        minimum stake amount (default 1)
--pos-minimum-stake-duration uint                      minimum stake duration (default 100)
--pos-weight-to-value-factor uint                      weight to value factor (default 1)
--relayer-version string                               relayer version to deploy (default "latest")
-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
--use-local-machine use                                local machine as a blockchain validator
--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:

-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:

--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:

-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: 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: 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:

--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:

--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:

--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
--node-id 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:

--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:

--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:

--aggregator-extra-endpoints strings    endpoints for extra nodes that are needed in signature aggregation
--aggregator-log-level string           log level to use with signature aggregator (default "Off")
--blockchain-genesis-key use            genesis allocated key to pay fees for completing the validator's removal (blockchain gas token)
--blockchain-key string                 CLI stored key to use to pay fees for completing the validator's removal (blockchain gas token)
--blockchain-private-key string         private key to use to pay fees for completing the validator's removal (blockchain gas token)
--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
--node-endpoint string                  remove validator that responds to the given endpoint
--node-id string                        node-id of the validator
--output-tx-path string                 (for non-SOV blockchain only) file path of the removeValidator tx
--rpc string                            connect to validator manager at the given rpc endpoint
--subnet-auth-keys strings              (for non-SOV blockchain only) 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:

--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]

Flags:

-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: 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.

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: Export the upgrade bytes file to a location of choice on disk
  • 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: Import the upgrade bytes file into the local environment
  • print: Print the upgrade.json file content
  • 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.

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.

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:

avalanche subnet upgrade apply [subcommand] [flags]

Flags:

--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

upgrade export

Export the upgrade bytes file to a location of choice on disk

Usage:

avalanche subnet upgrade export [subcommand] [flags]

Flags:

--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

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.

Usage:

avalanche subnet upgrade generate [subcommand] [flags]

Flags:

-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

upgrade import

Import the upgrade bytes file into the local environment

Usage:

avalanche subnet upgrade import [subcommand] [flags]

Flags:

-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

upgrade print

Print the upgrade.json file content

Usage:

avalanche subnet upgrade print [subcommand] [flags]

Flags:

-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

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.

Usage:

avalanche subnet upgrade vm [subcommand] [flags]

Flags:

--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

validators

The blockchain validators command lists the validators of a blockchain's subnet and provides several statistics about them.

Usage:

avalanche subnet validators [subcommand] [flags]

Flags:

--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

vmid

The blockchain vmid command prints the virtual machine ID (VMID) for the given Blockchain.

Usage:

avalanche subnet vmid [subcommand] [flags]

Flags:

-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

avalanche teleporter

The teleporter command suite provides a collection of tools for interacting with Teleporter-Enabled Subnets.

Usage:

avalanche teleporter [subcommand] [flags]

Flags:

-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: The bridge command suite provides tools to deploy and manage Teleporter Bridges.

Deprecation notice: use avalanche interchain tokenTransferrer' instead

  • deploy: Deploys Teleporter into a given Network and Subnet.
  • msg: Sends and wait reception for a teleporter msg between two subnets (Currently only for local network).
  • 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:

-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: 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:

--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:

--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
--force-registry-deploy deploy              Teleporter Registry even if Messenger has already been deployed
-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
-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:

--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:

-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: Deploys an ICM Relayer for the given Network.
  • logs: Shows pretty formatted AWM relayer logs
  • start: Starts AWM relayer on the specified network (Currently only for local network).
  • 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:

--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:

--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

relayer start

Starts AWM relayer on the specified network (Currently only for local network).

Usage:

avalanche teleporter relayer start [subcommand] [flags]

Flags:

--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

relayer stop

Stops AWM relayer on the specified network (Currently only for local network, cluster).

Usage:

avalanche teleporter relayer stop [subcommand] [flags]

Flags:

--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

avalanche transaction

The transaction command suite provides all of the utilities required to sign multisig transactions.

Usage:

avalanche transaction [subcommand] [flags]

Flags:

-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

Subcommands:

  • commit: The transaction commit command commits a transaction by submitting it to the P-Chain.
  • sign: The transaction sign command signs a multisig transaction.

commit

The transaction commit command commits a transaction by submitting it to the P-Chain.

Usage:

avalanche transaction commit [subcommand] [flags]

Flags:

-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

sign

The transaction sign command signs a multisig transaction.

Usage:

avalanche transaction sign [subcommand] [flags]

Flags:

-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

avalanche update

Check if an update is available, and prompt the user to install it

Usage:

avalanche update [subcommand] [flags]

Flags:

-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

Last updated on

On this page

Edit on Github