Documentation ¶
Index ¶
- Constants
- Variables
- func CreateNewSubnet(ctx context.Context, genesisFilePath string) string
- func GetDefaultChainURI(blockchainID string) string
- func GetFilesAndAliases(dir string) (map[string]string, error)
- func IssueTxsToActivateProposerVMFork(ctx context.Context, chainID *big.Int, fundedKey *ecdsa.PrivateKey, ...) error
- func RegisterNodeRun()
- func RegisterPingTest()
- func RunCommand(bin string, args ...string) (*cmd.Cmd, error)
- func RunHardhatTests(ctx context.Context, blockchainID string, execPath string, testPath string)
- func RunHardhatTestsCustomURI(ctx context.Context, chainURI string, execPath string, testPath string)
- type EvmClient
- func (ec *EvmClient) ConfirmTx(ctx context.Context, txHash common.Hash) (*big.Int, error)
- func (ec *EvmClient) FetchBalance(ctx context.Context, addr common.Address) (*big.Int, error)
- func (ec *EvmClient) FetchNonce(ctx context.Context, addr common.Address) (uint64, error)
- func (ec *EvmClient) TransferTx(ctx context.Context, sender common.Address, senderPriv *ecdsa.PrivateKey, ...) (*big.Int, error)
- func (ec *EvmClient) WaitForBalance(ctx context.Context, addr common.Address, minBalance *big.Int) error
- type SubnetSuite
Constants ¶
const ( // Timeout to boot the Luxd node BootLuxNodeTimeout = 5 * time.Minute // Timeout for the health API to check the Luxd is ready HealthCheckTimeout = 5 * time.Second DefaultLocalNodeURI = "http://127.0.0.1:9650" )
Variables ¶
var (
NodeURIs = []string{DefaultLocalNodeURI, "http://127.0.0.1:9652", "http://127.0.0.1:9654", "http://127.0.0.1:9656", "http://127.0.0.1:9658"}
)
Functions ¶
func CreateNewSubnet ¶
CreateNewSubnet creates a new subnet and Subnet-EVM blockchain with the given genesis file. returns the ID of the new created blockchain.
func GetDefaultChainURI ¶
GetDefaultChainURI returns the default chain URI for a given blockchainID
func GetFilesAndAliases ¶
GetFilesAndAliases returns a map of aliases to file paths in given [dir].
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 an Luxd process to use for the e2e tests and an after suite that stops the Luxd process
func RegisterPingTest ¶
func RegisterPingTest()
func RunCommand ¶
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 ¶
RunDefaultHardhatTests runs the hardhat tests in the given [testPath] on the blockchain with [blockchainID] [execPath] is the path where the test command is executed
Types ¶
type EvmClient ¶
type EvmClient struct {
// contains filtered or unexported fields
}
func NewEvmClient ¶
func (*EvmClient) FetchBalance ¶
func (*EvmClient) FetchNonce ¶
type SubnetSuite ¶
type SubnetSuite struct {
// contains filtered or unexported fields
}
func CreateSubnetsSuite ¶
func CreateSubnetsSuite(genesisFiles map[string]string) *SubnetSuite
CreateSubnetsSuite creates subnets for given [genesisFiles], and registers a before suite that starts an Luxd process to use for the e2e tests. genesisFiles is a map of test aliases to genesis file paths.
func (*SubnetSuite) GetBlockchainID ¶
func (s *SubnetSuite) GetBlockchainID(alias string) string
func (*SubnetSuite) SetBlockchainIDs ¶
func (s *SubnetSuite) SetBlockchainIDs(blockchainIDs map[string]string)