utils

package
v2.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2025 License: GPL-3.0, LGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Timeout to boot the Lux node
	BootLuxNodeTimeout = 5 * time.Minute

	// Timeout for the health API to check the Lux is ready
	HealthCheckTimeout = 5 * time.Second

	DefaultLocalNodeURI = "http://127.0.0.1:9630"
)

Variables

This section is empty.

Functions

func GetDefaultChainURI

func GetDefaultChainURI(blockchainID string) string

GetDefaultChainURI returns the default chain URI for the given blockchain ID

func GetFilesAndAliases

func GetFilesAndAliases(pattern string) (map[string]string, error)

GetFilesAndAliases gets files matching a glob pattern and returns them with aliases

func IssueTxsToActivateProposerVMFork

func IssueTxsToActivateProposerVMFork(
	ctx context.Context, chainID *big.Int, fundedKey *ecdsa.PrivateKey,
	client ethclient.Client,
) error

IssueTxsToActivateProposerVMFork issues transactions at the current timestamp, which should be after the ProposerVM activation time (aka ApricotPhase4). This should generate a PostForkBlock because its parent block (genesis) has a timestamp (0) that is greater than or equal to the fork activation time of 0. Therefore, subsequent blocks should be built with BuildBlockWithContext.

func RegisterNodeRun

func RegisterNodeRun()

RegisterNodeRun registers a before suite that starts a Lux process to use for the e2e tests and an after suite that stops the Lux process

func RegisterPingTest

func RegisterPingTest()

func RunCommand

func RunCommand(bin string, args ...string) (*cmd.Cmd, error)

RunCommand starts the command [bin] with the given [args] and returns the command to the caller TODO cmd package mentions we can do this more efficiently with cmd.NewCmdOptions rather than looping and calling Status().

func RunHardhatTests

func RunHardhatTests(ctx context.Context, blockchainID string, execPath string, testPath string)

RunHardhatTests runs the hardhat tests in the given [testPath] on the blockchain with [blockchainID] [execPath] is the path where the test command is executed

func RunHardhatTestsCustomURI

func RunHardhatTestsCustomURI(ctx context.Context, chainURI string, execPath string, testPath string)

Types

type SubnetsSuite

type SubnetsSuite struct {
	// contains filtered or unexported fields
}

SubnetsSuite manages subnet lifecycle for tests

func CreateSubnetsSuite

func CreateSubnetsSuite(genesisFiles map[string]string) *SubnetsSuite

CreateSubnetsSuite creates a new subnet suite from genesis files

func (*SubnetsSuite) GetBlockchainID

func (s *SubnetsSuite) GetBlockchainID(alias string) string

GetBlockchainID returns the blockchain ID for a given alias

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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