common

package
v0.0.0-...-ea9a798 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountDetails

type AccountDetails struct {
	Account    string
	PrivateKey string
}

AccountDetails for deployment and funding

type ChainlinkClient

type ChainlinkClient struct {
	NKeys          []nodeclient.NodeKeysBundle
	ChainlinkNodes []*nodeclient.ChainlinkClient

	AccountAddresses []string
	// contains filtered or unexported fields
}

ChainlinkClient core node configs

type Clients

type Clients struct {
	StarknetClient   *starknet.Client
	DevnetClient     *starknetdevnet.DevNet
	ParrotClient     *test_env_ctf.Parrot
	OCR2Client       *ocr2.Client
	ChainlinkClient  *ChainlinkClient
	GauntletClient   *gauntlet.StarknetGauntlet
	DockerEnv        *StarknetClusterTestEnv
	GauntletPPClient *gauntlet.StarknetGauntletPlusPlus
}

Clients to access internal methods

type Common

type Common struct {
	ChainDetails    *chainconfig.Config
	TestEnvDetails  *TestEnvDetails
	Env             *environment.Environment
	RPCDetails      *RPCDetails
	ChainlinkConfig string
	TestConfig      *testconfig.TestConfig
}

func New

func New(testConfig *testconfig.TestConfig) *Common

func (*Common) CreateJobsForContract

func (c *Common) CreateJobsForContract(cc *ChainlinkClient, observationSource string, juelsPerFeeCoinSource string, ocrControllerAddress string, accountAddresses []string) error

CreateJobsForContract Creates and sets up the boostrap jobs as well as OCR jobs

func (*Common) CreateNodeKeysBundle

func (c *Common) CreateNodeKeysBundle(nodes []*nodeclient.ChainlinkClient) ([]nodeclient.NodeKeysBundle, error)

func (*Common) Default

func (c *Common) Default(t *testing.T, namespacePrefix string) (*Common, error)

func (*Common) SetLocalEnvironment

func (c *Common) SetLocalEnvironment(t *testing.T)

func (*Common) TearDownLocalEnvironment

func (c *Common) TearDownLocalEnvironment(t *testing.T)

type Contracts

type Contracts struct {
	LinkTokenAddr         string
	OCRAddr               string
	AccessControllerAddr  string
	ProxyAddr             string
	ObservationSource     string
	JuelsPerFeeCoinSource string
}

Contracts to store current deployed contract state

type OCRv2TestState

type OCRv2TestState struct {
	Account           *AccountDetails
	Clients           *Clients
	ChainlinkNodesK8s []*nodeclient.ChainlinkK8sClient
	Common            *Common
	TestConfig        *TestConfig
	Contracts         *Contracts
}

OCRv2TestState Main testing state struct

func NewOCRv2State

func NewOCRv2State(t *testing.T, namespacePrefix string, testConfig *testconfig.TestConfig) (*OCRv2TestState, error)

func (*OCRv2TestState) DeployCluster

func (m *OCRv2TestState) DeployCluster()

DeployCluster Deploys and sets up config of the environment and nodes

func (*OCRv2TestState) DeployEnv

func (m *OCRv2TestState) DeployEnv()

DeployEnv Deploys the environment

func (*OCRv2TestState) DeployGauntletPP

func (m *OCRv2TestState) DeployGauntletPP(minSubmissionValue int64, maxSubmissionValue int64, decimals int, name string, observationPaymentGjuels int64, transmissionPaymentGjuels int64) error

func (*OCRv2TestState) GetChainlinkClient

func (m *OCRv2TestState) GetChainlinkClient() *ChainlinkClient

func (*OCRv2TestState) GetChainlinkNodes

func (m *OCRv2TestState) GetChainlinkNodes() []*nodeclient.ChainlinkClient

func (*OCRv2TestState) GetDefaultJuelsPerFeeCoinSource

func (m *OCRv2TestState) GetDefaultJuelsPerFeeCoinSource() string

func (*OCRv2TestState) GetDefaultObservationSource

func (m *OCRv2TestState) GetDefaultObservationSource() string

func (*OCRv2TestState) GetNodeKeys

func (m *OCRv2TestState) GetNodeKeys() []nodeclient.NodeKeysBundle

GetNodeKeys Returns the node key bundles

func (*OCRv2TestState) LoadOCR2Config

func (m *OCRv2TestState) LoadOCR2Config() (*ops.OCR2Config, error)

LoadOCR2Config Loads and returns the default starknet gauntlet config

func (*OCRv2TestState) SetBridgeTypeAttrs

func (m *OCRv2TestState) SetBridgeTypeAttrs(attr *nodeclient.BridgeTypeAttributes)

func (*OCRv2TestState) SetUpNodes

func (m *OCRv2TestState) SetUpNodes()

func (*OCRv2TestState) StartGppDefaultNetwork

func (m *OCRv2TestState) StartGppDefaultNetwork()

Starts GauntletPP Without a network

func (*OCRv2TestState) StartGppWithNetwork

func (m *OCRv2TestState) StartGppWithNetwork(networkName string)

Starts GauntletPP with a network

func (*OCRv2TestState) ValidateRounds

func (m *OCRv2TestState) ValidateRounds(rounds int, isSoak bool) error

type RPCDetails

type RPCDetails struct {
	RPCL1Internal       string
	RPCL2Internal       string
	RPCL2InternalAPIKey string
	RPCL1External       string
	RPCL2External       string
	MockServerURL       string
	MockServerEndpoint  string
	P2PPort             string
}

type StarknetClusterTestEnv

type StarknetClusterTestEnv struct {
	*test_env_integrations.CLClusterTestEnv
	Starknet *test_env_starknet.Starknet
	Parrot   *test_env_ctf.Parrot
}

type TestConfig

type TestConfig struct {
	T          *testing.T
	L          zerolog.Logger
	TestConfig *testconfig.TestConfig
	Resty      *resty.Client
	// contains filtered or unexported fields
}

type TestEnvDetails

type TestEnvDetails struct {
	TestDuration time.Duration
	K8Config     *environment.Config
	NodeOpts     []test_env.ClNodeOption
}

Jump to

Keyboard shortcuts

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