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.