Documentation
¶
Index ¶
- Variables
- func CreateNewSubnet(ctx context.Context, genesisFilePath string) string
- func GetDefaultChainURI(blockchainID string) string
- func RegisterNodeRun()
- func RegisterPingTest()
- func RunCommand(bin string, args ...string) (*cmd.Cmd, error)
- func RunDefaultHardhatTests(ctx context.Context, test string)
- func RunTestCMD(testCMD *exec.Cmd, rpcURI 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
Constants ¶
This section is empty.
Variables ¶
var ( DefaultLocalNodeURI = "http://127.0.0.1:9650" 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 ¶ added in v0.5.2
GetDefaultChainURI returns the default chain URI for a given blockchainID
func RegisterNodeRun ¶ added in v0.5.2
func RegisterNodeRun()
RegisterNodeRun registers a before suite that starts an AvalancheGo process to use for the e2e tests and an after suite that stops the AvalancheGo process
func RegisterPingTest ¶ added in v0.5.2
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 RunDefaultHardhatTests ¶ added in v0.5.2
RunDefaultHardhatTests runs the hardhat tests on a new blockchain with default parameters. Default parameters are: 1. Genesis file is located at ./tests/precompile/genesis/<test>.json 2. Hardhat contract environment is located at ./contracts 3. Hardhat test file is located at ./contracts/test/<test>.ts 4. npx is available in the ./contracts directory
func RunTestCMD ¶ added in v0.5.2
RunTestCMD runs a given test command with the given rpcURI It also waits for the test ping to succeed before running the test command
Types ¶
type EvmClient ¶
type EvmClient struct {
// contains filtered or unexported fields
}