Documentation ¶
Index ¶
- Variables
- func ConnectP2P(t *testing.T, node1 *ethclient.Client, node2 *ethclient.Client)
- func FindBlock(client *ethclient.Client, from, to int, timeout time.Duration, ...) (*types.Block, error)
- func InitL1(chainID uint64, blockTime uint64, genesis *core.Genesis, c clock.Clock, ...) (*node.Node, *eth.Ethereum, error)
- func InitL2(name string, l2ChainID *big.Int, genesis *core.Genesis, jwtPath string, ...) (*node.Node, *eth.Ethereum, error)
- func WaitForBlock(number *big.Int, client *ethclient.Client, timeout time.Duration) (*types.Block, error)
- func WaitForBlockToBeFinalized(number *big.Int, client *ethclient.Client, timeout time.Duration) (*types.Block, error)
- func WaitForBlockToBeSafe(number *big.Int, client *ethclient.Client, timeout time.Duration) (*types.Block, error)
- func WaitForL1OriginOnL2(rollupCfg *rollup.Config, l1BlockNum uint64, client *ethclient.Client, ...) (*types.Block, error)
- func WaitForL2Transaction(hash common.Hash, client *ethclient.Client, timeout time.Duration) (*types.Receipt, error)
- func WaitForTransaction(hash common.Hash, client *ethclient.Client, timeout time.Duration) (*types.Receipt, error)
- func WithP2P() func(ethCfg *ethconfig.Config, nodeCfg *node.Config) error
- type Beacon
- type GethOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func ConnectP2P ¶
ConnectP2P creates a p2p peer connection between node1 and node2.
func FindBlock ¶ added in v1.4.0
func FindBlock(client *ethclient.Client, from, to int, timeout time.Duration, pred func(*types.Block) (bool, error), ) (*types.Block, error)
FindBlock finds the first block for which the predicate [pred] matches and returns it. It starts at [from] and iterates until [to], inclusively, using the provided [client]. It supports both search directions, forwards and backwards.
func InitL2 ¶
func InitL2(name string, l2ChainID *big.Int, genesis *core.Genesis, jwtPath string, opts ...GethOption) (*node.Node, *eth.Ethereum, error)
InitL2 inits a L2 geth node.
func WaitForBlock ¶
func WaitForBlockToBeFinalized ¶ added in v1.3.0
func WaitForBlockToBeSafe ¶ added in v1.3.0
func WaitForL1OriginOnL2 ¶
func WaitForL2Transaction ¶
func WaitForTransaction ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.