Documentation
¶
Overview ¶
Copyright (C) 2023, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.
Index ¶
- Constants
- func AddSubnetIDToSidecar(subnetName string, network models.Network, subnetID string) error
- func AllPermissionlessValidatorExistsInSidecar(subnetName string, network string) (bool, error)
- func ChainConfigExists(subnetName string) (bool, error)
- func CheckAllNodesAreCurrentValidators(subnetName string) (bool, error)
- func CheckKeyEquality(keyPath1, keyPath2 string) (bool, error)
- func CheckOdysseyGoExists(version string) bool
- func CheckSubnetEVMExists(version string) bool
- func CheckUpgradeIsDeployed(rpcEndpoint string, deployedUpgrades params.UpgradeConfig) error
- func DeleteBins() error
- func DeleteConfigs(subnetName string) error
- func DeleteCustomBinary(vmName string)
- func DeleteKey(keyName string) error
- func DeleteOPMBin(vmid string)
- func DownloadCustomVMBin(subnetEVMversion string) (string, error)
- func ElasticSubnetConfigExists(subnetName string) (bool, error)
- func ExecCommand(cmdName string, args []string, showStdout bool, errorIsExpected bool) string
- func FundLedgerAddress(amount uint64) error
- func GetBaseDir() string
- func GetCurrentSupply(subnetName string) error
- func GetFileHash(filename string) (string, error)
- func GetLedgerAddress(network models.Network, index uint32) (string, error)
- func GetNodeVMVersion(nodeURI string, vmid string) (string, error)
- func GetNodesInfo() (map[string]NodeInfo, error)
- func GetOPMDir() string
- func GetPluginBinaries() ([]string, error)
- func GetSubnetDir() string
- func GetSubnetEVMMainneChainID(subnetName string) (uint, error)
- func GetTmpFilePath(fnamePrefix string) (string, error)
- func GetValidators(subnetName string) ([]string, error)
- func GetVersionMapping(mapper VersionMapper) (map[string]string, error)
- func GetWhitelistedSubnetsFromConfigFile(configFile string) (string, error)
- func IsCustomVM(subnetName string) (bool, error)
- func IsNodeInPendingValidator(subnetName string, nodeID string) (bool, error)
- func KeyExists(keyName string) (bool, error)
- func OPMConfigExists(subnetName string) (bool, error)
- func ParseAddrBalanceFromKeyListOutput(output string, keyName string) (string, uint64, error)
- func ParseGreeterAddress(output string) error
- func ParsePublicDeployOutput(output string) (string, error)
- func ParseRPCsFromOutput(output string) ([]string, error)
- func PerNodeChainConfigExists(subnetName string) (bool, error)
- func PermissionlessValidatorExistsInSidecar(subnetName string, nodeID string, network string) (bool, error)
- func PrintStdErr(err error)
- func RemoveOPMRepo()
- func RestartNodesWithWhitelistedSubnets(whitelistedSubnets string) error
- func RunHardhatScript(script string) (string, string, error)
- func RunHardhatTests(test string) error
- func RunLedgerSim(iters int, seed string, ledgerSimReadyCh chan struct{}, ...) error
- func SetHardhatRPC(rpc string) error
- func StartLedgerSim(iters int, seed string, showStdout bool) (chan struct{}, chan struct{})
- func SubnetConfigExists(subnetName string) (bool, error)
- func SubnetCustomVMExists(subnetName string) (bool, error)
- func SubnetOPMVMExists(subnetName string) (bool, error)
- func WaitSubnetValidators(subnetIDStr string, nodeInfos map[string]NodeInfo) error
- type NodeInfo
- type VersionMapper
Constants ¶
const ( BaseTest = "./test/index.ts" GreeterScript = "./scripts/deploy.ts" GreeterCheck = "./scripts/checkGreeting.ts" SoloSubnetEVMKey1 = "soloSubnetEVMVersion1" SoloSubnetEVMKey2 = "soloSubnetEVMVersion2" SoloOdygoKey = "soloOdygoVersion" OnlyOdygoKey = "onlyOdygoVersion" MultiOdygoSubnetEVMKey = "multiOdygoSubnetEVMVersion" MultiOdygo1Key = "multiOdygoVersion1" MultiOdygo2Key = "multiOdygoVersion2" LatestEVM2OdygoKey = "latestEVM2Odygo" LatestOdygo2EVMKey = "latestOdygo2EVM" OnlyOdygoValue = "latest" SubnetEvmGenesisPath = "tests/e2e/assets/test_subnet_evm_genesis.json" SubnetEvmGenesis2Path = "tests/e2e/assets/test_subnet_evm_genesis_2.json" EwoqKeyPath = "tests/e2e/assets/ewoq_key.pk" SubnetEvmAllowFeeRecpPath = "tests/e2e/assets/test_subnet_evm_allowFeeRecps_genesis.json" SubnetEvmGenesisBadPath = "tests/e2e/assets/test_subnet_evm_genesis_bad.json" PluginDirExt = "plugins" )
Variables ¶
This section is empty.
Functions ¶
func AddSubnetIDToSidecar ¶
func ChainConfigExists ¶
func CheckKeyEquality ¶
func CheckOdysseyGoExists ¶
func CheckSubnetEVMExists ¶
func CheckUpgradeIsDeployed ¶
func CheckUpgradeIsDeployed(rpcEndpoint string, deployedUpgrades params.UpgradeConfig) error
func DeleteBins ¶
func DeleteBins() error
func DeleteConfigs ¶
func DeleteCustomBinary ¶
func DeleteCustomBinary(vmName string)
func DeleteOPMBin ¶
func DeleteOPMBin(vmid string)
func DownloadCustomVMBin ¶
Currently downloads subnet-evm, but that suffices to test the custom vm functionality
func ExecCommand ¶
func FundLedgerAddress ¶
func GetBaseDir ¶
func GetBaseDir() string
func GetCurrentSupply ¶
func GetFileHash ¶
func GetNodesInfo ¶
func GetPluginBinaries ¶
func GetSubnetDir ¶
func GetSubnetDir() string
func GetTmpFilePath ¶
func GetValidators ¶
func GetVersionMapping ¶
func GetVersionMapping(mapper VersionMapper) (map[string]string, error)
GetVersionMapping returns a map of specific VMs resp. Odysseygo e2e context keys to the actual version which corresponds to that key. This allows the e2e test to know what version to download and run. Returns an error if there was a problem reading the URL compatibility json or some other issue.
func IsCustomVM ¶
func OPMConfigExists ¶
func ParseGreeterAddress ¶
func ParsePublicDeployOutput ¶
func ParseRPCsFromOutput ¶
func PrintStdErr ¶
func PrintStdErr(err error)
func RemoveOPMRepo ¶
func RemoveOPMRepo()
func RunHardhatTests ¶
func RunLedgerSim ¶
func SetHardhatRPC ¶
func StartLedgerSim ¶
func SubnetConfigExists ¶
func SubnetCustomVMExists ¶
func SubnetOPMVMExists ¶
Types ¶
type VersionMapper ¶
type VersionMapper interface { GetCompatURL(vmType models.VMType) string GetOdygoURL() string GetApp() *application.Odyssey GetLatestOdygoByProtoVersion(app *application.Odyssey, rpcVersion int, url string) (string, error) GetEligibleVersions(sortedVersions []string, repoName string, app *application.Odyssey) ([]string, error) FilterAvailableVersions(versions []string) []string }
VersionMapper is an abstraction for retrieving version compatibility URLs allowing unit tests without requiring external http calls. The idea is to finally calculate which VM is compatible with which Odysseygo, so that the e2e tests can always download and run the latest compatible versions, without having to manually update the e2e tests periodically.
func NewVersionMapper ¶
func NewVersionMapper() VersionMapper
NewVersionMapper returns the default VersionMapper for e2e tests