common

package
v0.0.0-...-50c7a33 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 48 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          []client.NodeKeysBundle
	ChainlinkNodes []*client.ChainlinkClient

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

ChainlinkClient core node configs

type Clients

type Clients struct {
	StarknetClient  *starknet.Client
	DevnetClient    *starknetdevnet.DevNet
	KillgraveClient *test_env_ctf.Killgrave
	OCR2Client      *ocr2.Client
	ChainlinkClient *ChainlinkClient
	GauntletClient  *gauntlet.StarknetGauntlet
	DockerEnv       *StarknetClusterTestEnv
}

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 []*client.ChainlinkClient) ([]client.NodeKeysBundle, error)

func (*Common) Default

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

func (*Common) DefaultNodeConfig

func (c *Common) DefaultNodeConfig() *cl.Config

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 []*client.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) DeployGauntlet

func (m *OCRv2TestState) DeployGauntlet(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() []*client.ChainlinkClient

func (*OCRv2TestState) GetDefaultJuelsPerFeeCoinSource

func (m *OCRv2TestState) GetDefaultJuelsPerFeeCoinSource() string

func (*OCRv2TestState) GetDefaultObservationSource

func (m *OCRv2TestState) GetDefaultObservationSource() string

func (*OCRv2TestState) GetNodeKeys

func (m *OCRv2TestState) GetNodeKeys() []client.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 *client.BridgeTypeAttributes)

func (*OCRv2TestState) SetUpNodes

func (m *OCRv2TestState) SetUpNodes()

func (*OCRv2TestState) SetupClients

func (m *OCRv2TestState) SetupClients()

SetupClients Sets up the starknet client

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.CLClusterTestEnv
	Starknet  *test_env_starknet.Starknet
	Killgrave *test_env_ctf.Killgrave
}

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