actions

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MIT Imports: 14 Imported by: 1

Documentation

Overview

Package actions enables common chainlink interactions

Index

Constants

View Source
const (
	// DefaultArtifactsDir default artifacts dir
	DefaultArtifactsDir = "logs"
)

Variables

This section is empty.

Functions

func ChainlinkNodeAddresses

func ChainlinkNodeAddresses(nodes []client.Chainlink) ([]common.Address, error)

ChainlinkNodeAddresses will return all the on-chain wallet addresses for a set of Chainlink nodes

func CreateOCRJobs added in v0.0.17

func CreateOCRJobs(
	ocrInstances []contracts.OffchainAggregator,
	chainlinkNodes []client.Chainlink,
	mockserver *client.MockserverClient,
) func()

CreateOCRJobs bootstraps the first node and to the other nodes sends ocr jobs that read from different adapters, to be used in combination with SetAdapterResponses

func DeployOCRContracts added in v0.0.17

func DeployOCRContracts(
	ocrInstances []contracts.OffchainAggregator,
	linkTokenContract contracts.LinkToken,
	contractDeployer contracts.ContractDeployer,
	chainlinkNodes []client.Chainlink,
	networks *client.Networks,
) func()

DeployOCRContracts deploys and funds a certain number of offchain aggregator contracts

func EncodeOnChainExternalJobID

func EncodeOnChainExternalJobID(jobID uuid.UUID) [32]byte

EncodeOnChainExternalJobID encodes external job uuid to on-chain representation

func EncodeOnChainVRFProvingKey

func EncodeOnChainVRFProvingKey(vrfKey client.VRFKey) ([2]*big.Int, error)

EncodeOnChainVRFProvingKey encodes uncompressed public VRF key to on-chain representation

func ExtractRequestIDFromJobRun added in v0.0.7

func ExtractRequestIDFromJobRun(jobDecodeData client.RunsResponseData) ([]byte, error)

ExtractRequestIDFromJobRun extracts RequestID from job runs response

func FundChainlinkNodes

func FundChainlinkNodes(
	nodes []client.Chainlink,
	blockchain client.BlockchainClient,
	amount *big.Float,
) error

FundChainlinkNodes will fund all of the provided Chainlink nodes with a set amount of ETH

func FundNodes added in v0.0.17

func FundNodes(networks *client.Networks, chainlinkNodes []client.Chainlink) func()

FundNodes funds all chainlink nodes

func GetMockserverInitializerDataForOTPE added in v0.0.17

func GetMockserverInitializerDataForOTPE(
	OCRInstances []contracts.OffchainAggregator,
	chainlinkNodes []client.Chainlink,
) (interface{}, error)

GetMockserverInitializerDataForOTPE creates mocked weiwatchers data needed for otpe

func SetAdapterResponses added in v0.0.25

func SetAdapterResponses(
	results []int,
	ocrInstances []contracts.OffchainAggregator,
	chainlinkNodes []client.Chainlink,
	mockserver *client.MockserverClient,
) func()

SetAdapterResponses sets the mock responses in mockserver that are read by chainlink nodes to simulate different adapters, to be used in combination with CreateOCRJobs

func SetChainlinkAPIPageSize

func SetChainlinkAPIPageSize(nodes []client.Chainlink, pageSize int)

SetChainlinkAPIPageSize specifies the page size from the Chainlink API, useful for high volume testing

func StartNewRound added in v0.0.17

func StartNewRound(
	roundNr int64,
	ocrInstances []contracts.OffchainAggregator,
	networks *client.Networks,
) func()

StartNewRound requests a new round from the ocr contract and waits for confirmation

func TeardownSuite added in v0.0.25

func TeardownSuite(env *environment.Environment, nets *client.Networks, logsFolderPath string) error

TeardownSuite tears down networks/clients and environment and creates a logs folder for failed tests in the specified path

Types

This section is empty.

Jump to

Keyboard shortcuts

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