provider

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2025 License: MIT Imports: 22 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZkSyncCTFChainProvider

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

ZkSyncCTFChainProvider manages an ZkSync EVM chain instance running inside a (CTF) Docker container.

This provider requires Docker to be installed and operational. Spinning up a new container can be slow, so it is recommended to initialize the provider only once per test suite or parent test to optimize performance.

func NewZkSyncCTFChainProvider

func NewZkSyncCTFChainProvider(
	t *testing.T, selector uint64, config ZkSyncCTFChainProviderConfig,
) *ZkSyncCTFChainProvider

NewZkCTFChainProvider creates a new ZkSyncCTFChainProvider with the given selector and configuration.

func (*ZkSyncCTFChainProvider) BlockChain

func (p *ZkSyncCTFChainProvider) BlockChain() chain.BlockChain

BlockChain returns the ZkSync EVM chain instance managed by this provider. You must call Initialize before using this method to ensure the chain is properly set up.

func (*ZkSyncCTFChainProvider) ChainSelector

func (p *ZkSyncCTFChainProvider) ChainSelector() uint64

ChainSelector returns the chain selector of the ZkSync EVM chain managed by this provider.

func (*ZkSyncCTFChainProvider) Initialize

Initialize sets up the ZkSync EVM chain instance managed by this provider. It starts a CTF container, initializes the Ethereum client, and sets up the chain instance with the necessary transactors and deployer key gathered from the CTF's default zkSync accounts. The first account is used as the deployer key, and the rest are used as users for the chain.

func (*ZkSyncCTFChainProvider) Name

Name returns the name of the ZkSyncCTFChainProvider.

type ZkSyncCTFChainProviderConfig

type ZkSyncCTFChainProviderConfig struct {
	// Required: A sync.Once instance to ensure that the CTF framework only sets up the new
	// DefaultNetwork once
	Once *sync.Once
}

ZkCTFChainProviderConfig holds the configuration to initialize the ZkSyncCTFChainProvider.

Jump to

Keyboard shortcuts

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