commands

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2023 License: BSD-3-Clause Imports: 13 Imported by: 8

Documentation

Overview

Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Index

Constants

View Source
const (
	CLIBinary                     = "./bin/avalanche"
	SubnetCmd                     = "subnet"
	NetworkCmd                    = "network"
	KeyCmd                        = "key"
	UpgradeCmd                    = "upgrade"
	ElasticTransformCmd           = "elastic"
	JoinCmd                       = "join"
	RemoveValidatorCmd            = "removeValidator"
	AddPermissionlessDelegatorCmd = "addPermissionlessDelegator"
)
View Source
const (
	WriteReadReadPerms = 0o644
)

Variables

This section is empty.

Functions

func AddPermissionlessDelegator added in v1.2.4

func AddPermissionlessDelegator(subnetName string, nodeID string, stakeAmount string, stakingPeriod string) (string, error)

func AddPermissionlessValidator added in v1.2.1

func AddPermissionlessValidator(subnetName string, nodeID string, stakeAmount string, stakingPeriod string) (string, error)

func ApplyUpgradeLocal added in v1.1.0

func ApplyUpgradeLocal(subnetName string) (string, error)

#nosec G204

func ApplyUpgradeToPublicNode added in v1.1.1

func ApplyUpgradeToPublicNode(subnetName, avagoChainConfDir string) (string, error)

#nosec G204

func CleanNetwork

func CleanNetwork()

#nosec G204

func CleanNetworkHard added in v0.2.2

func CleanNetworkHard()

#nosec G204

func ConfigureChainConfig added in v1.0.2

func ConfigureChainConfig(subnetName string, genesisPath string)

#nosec G204

func ConfigurePerNodeChainConfig added in v1.0.4

func ConfigurePerNodeChainConfig(subnetName string, perNodeChainConfigPath string)

#nosec G204

func CreateCustomVMConfig added in v0.2.3

func CreateCustomVMConfig(subnetName string, genesisPath string, vmPath string)

#nosec G204

func CreateKey added in v0.2.0

func CreateKey(keyName string) (string, error)

#nosec G204

func CreateKeyForce added in v0.2.0

func CreateKeyForce(keyName string) (string, error)

#nosec G204

func CreateKeyFromPath added in v0.2.0

func CreateKeyFromPath(keyName string, keyPath string) (string, error)

#nosec G204

func CreateSubnetEvmConfig added in v0.2.3

func CreateSubnetEvmConfig(subnetName string, genesisPath string) (string, string)

#nosec G204

func CreateSubnetEvmConfigWithVersion added in v0.2.3

func CreateSubnetEvmConfigWithVersion(subnetName string, genesisPath string, version string)

#nosec G204

func DeleteElasticSubnetConfig added in v1.2.0

func DeleteElasticSubnetConfig(subnetName string)

func DeleteKey added in v0.2.0

func DeleteKey(keyName string) (string, error)

#nosec G204

func DeleteSubnetConfig

func DeleteSubnetConfig(subnetName string)

#nosec G204

func DeploySubnetLocally

func DeploySubnetLocally(subnetName string) string

Returns the deploy output

#nosec G204

func DeploySubnetLocallyExpectError added in v1.0.1

func DeploySubnetLocallyExpectError(subnetName string)

#nosec G204

func DeploySubnetLocallyWithArgs added in v1.0.0

func DeploySubnetLocallyWithArgs(subnetName string, version string, confPath string) string

Returns the deploy output

#nosec G204

func DeploySubnetLocallyWithArgsAndOutput added in v1.1.3

func DeploySubnetLocallyWithArgsAndOutput(subnetName string, version string, confPath string) ([]byte, error)

func DeploySubnetLocallyWithArgsExpectError added in v1.0.1

func DeploySubnetLocallyWithArgsExpectError(subnetName string, version string, confPath string)

#nosec G204

func DeploySubnetLocallyWithVersion added in v0.2.2

func DeploySubnetLocallyWithVersion(subnetName string, version string) string

Returns the deploy output

#nosec G204

func DeploySubnetLocallyWithViperConf added in v0.2.3

func DeploySubnetLocallyWithViperConf(subnetName string, confPath string) string

Returns the deploy output

#nosec G204

func DescribeSubnet added in v1.1.0

func DescribeSubnet(subnetName string) (string, error)

#nosec G204

func ExportKey added in v0.2.0

func ExportKey(keyName string) (string, error)

#nosec G204

func ExportKeyToFile added in v0.2.0

func ExportKeyToFile(keyName string, outputPath string) (string, error)

#nosec G204

func GetMainnetGenesis added in v1.2.5

func GetMainnetGenesis(subnetName string) (core.Genesis, error)

func GetVersion

func GetVersion() string

func ImportSubnetConfig added in v0.2.3

func ImportSubnetConfig(repoAlias string, subnetName string)

#nosec G204

func ImportSubnetConfigFromURL added in v0.2.3

func ImportSubnetConfigFromURL(repoURL string, branch string, subnetName string)

#nosec G204

func ImportUpgradeBytes added in v1.1.0

func ImportUpgradeBytes(subnetName, filepath string) (string, error)

#nosec G204

func KeyTransferReceive added in v1.2.4

func KeyTransferReceive(keyName string, amount string, recoveryStep string) (string, error)

#nosec G204

func KeyTransferSend added in v1.2.4

func KeyTransferSend(keyName string, targetAddr string, amount string) (string, error)

#nosec G204

func ListKeys added in v0.2.0

func ListKeys(network string, omitCChain bool, useNanoAvax bool) (string, error)

#nosec G204

func ListValidators added in v1.2.1

func ListValidators(subnetName string, network string) (string, error)

#nosec G204

func RemoveValidator added in v1.2.1

func RemoveValidator(subnetName string, nodeID string) (string, error)

func SimulateFujiAddPermissionlessValidator added in v1.2.4

func SimulateFujiAddPermissionlessValidator(
	subnetName string,
	key string,
	nodeID string,
	stakeAmount string,
	stakingPeriod string,
) (string, error)

func SimulateFujiAddValidator added in v1.0.0

func SimulateFujiAddValidator(
	subnetName string,
	key string,
	nodeID string,
	start string,
	period string,
	weight string,
) string

simulates fuji add validator execution path on a local network

#nosec G204

func SimulateFujiDeploy added in v1.0.0

func SimulateFujiDeploy(
	subnetName string,
	key string,
	controlKeys string,
	newChainID string,
) string

simulates fuji deploy execution path on a local network

#nosec G204

func SimulateFujiJoin added in v1.0.0

func SimulateFujiJoin(
	subnetName string,
	avalanchegoConfig string,
	pluginDir string,
	nodeID string,
) string

simulates fuji join execution path on a local network

#nosec G204

func SimulateFujiRemoveValidator added in v1.2.0

func SimulateFujiRemoveValidator(
	subnetName string,
	key string,
	nodeID string,
) string

simulates fuji add validator execution path on a local network

func SimulateFujiTransformSubnet added in v1.2.2

func SimulateFujiTransformSubnet(
	subnetName string,
	key string,
) (string, error)

func SimulateGetSubnetStatsFuji added in v1.0.0

func SimulateGetSubnetStatsFuji(subnetName, subnetID string) string

#nosec G204

func SimulateMainnetAddValidator added in v1.0.0

func SimulateMainnetAddValidator(
	subnetName string,
	nodeID string,
	start string,
	period string,
	weight string,
) string

simulates mainnet add validator execution path on a local network

#nosec G204

func SimulateMainnetDeploy added in v1.0.0

func SimulateMainnetDeploy(
	subnetName string,
) string

simulates mainnet deploy execution path on a local network

#nosec G204

func SimulateMainnetJoin added in v1.0.0

func SimulateMainnetJoin(
	subnetName string,
	avalanchegoConfig string,
	pluginDir string,
	nodeID string,
) string

simulates mainnet join execution path on a local network

#nosec G204

func SimulateMultisigMainnetDeploy added in v1.2.5

func SimulateMultisigMainnetDeploy(
	subnetName string,
	subnetControlAddrs []string,
	chainCreationAuthAddrs []string,
	txPath string,
	errorIsExpected bool,
) string

simulates multisig mainnet deploy execution path on a local network

#nosec G204

func StartNetwork

func StartNetwork() string

#nosec G204

func StartNetworkWithVersion added in v1.0.0

func StartNetworkWithVersion(version string) string

#nosec G204

func StopNetwork

func StopNetwork()

#nosec G204

func TransactionCommit added in v1.2.5

func TransactionCommit(
	subnetName string,
	txPath string,
	errorIsExpected bool,
) string

transaction commit

#nosec G204

func TransactionSignWithLedger added in v1.2.5

func TransactionSignWithLedger(
	subnetName string,
	txPath string,
	errorIsExpected bool,
) string

transaction signing with ledger

#nosec G204

func TransformElasticSubnetLocally added in v1.2.0

func TransformElasticSubnetLocally(subnetName string) (string, error)

func TransformElasticSubnetLocallyandTransformValidators added in v1.2.1

func TransformElasticSubnetLocallyandTransformValidators(subnetName string, stakeAmount string) (string, error)

func UpgradeCustomVM added in v1.1.0

func UpgradeCustomVM(subnetName string, binaryPath string) (string, error)

#nosec G204

func UpgradeCustomVMLocal added in v1.1.0

func UpgradeCustomVMLocal(subnetName string, binaryPath string) string

#nosec G204

func UpgradeVMConfig added in v1.1.0

func UpgradeVMConfig(subnetName string, targetVersion string) (string, error)

#nosec G204

func UpgradeVMLocal added in v1.1.0

func UpgradeVMLocal(subnetName string, targetVersion string) string

#nosec G204

func UpgradeVMPublic added in v1.1.0

func UpgradeVMPublic(subnetName string, targetVersion string, pluginDir string) (string, error)

#nosec G204

func WriteGenesis added in v1.2.5

func WriteGenesis(subnetName string, bytes []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL