provider

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MIT Imports: 22 Imported by: 4 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CTFChainProvider

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

CTFChainProvider manages a Ton chain instance running inside a Chainlink Testing Framework (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 NewCTFChainProvider

func NewCTFChainProvider(
	t *testing.T, selector uint64, config CTFChainProviderConfig,
) *CTFChainProvider

NewCTFChainProvider creates a new CTFChainProvider with the given selector and configuration.

func (*CTFChainProvider) BlockChain

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

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

func (*CTFChainProvider) ChainSelector

func (p *CTFChainProvider) ChainSelector() uint64

ChainSelector returns the chain selector of the Aptos chain managed by this provider.

func (*CTFChainProvider) Initialize

func (p *CTFChainProvider) Initialize(_ context.Context) (chain.BlockChain, error)

Initialize sets up the Ton chain by validating the configuration, starting a CTF container, generating a deployer signer account, and constructing the chain instance.

func (*CTFChainProvider) Name

func (*CTFChainProvider) Name() string

Name returns the name of the CTFChainProvider.

type CTFChainProviderConfig

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

CTFChainProviderConfig holds the configuration to initialize the CTFChainProvider.

Jump to

Keyboard shortcuts

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