solana

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 24 Imported by: 1 module, 0 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

View Source
var SupportedChains = []chain.ChainConfig{
	{Selector: chainselectors.SOLANA_DEVNET.Selector, Forwarder: devnetMockForwarderProgramID},
	{Selector: chainselectors.SOLANA_MAINNET.Selector, Forwarder: mainnetMockForwarderProgramID},
}

SupportedChains lists Solana networks cre-cli simulate can target. Forwarder field stores the mock_forwarder program ID. The per-selector forwarder *state account* is kept in forwarderStateAccounts because chain.ChainConfig only carries one address.

Functions

func ExtractLimits

func ExtractLimits(w *cresettings.Workflows) chain.Limits

func RunRPCHealthCheck

func RunRPCHealthCheck(clients map[uint64]chain.ChainClient, experimentalSelectors map[uint64]bool) error

RunRPCHealthCheck probes GetHealth() on every configured Solana client. experimentalSelectors identifies chains sourced from experimental-chains config.

Types

type LimitedSolanaChain

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

LimitedSolanaChain enforces chain-write report size + Solana compute-unit limit.

func NewLimitedSolanaChain

func NewLimitedSolanaChain(inner solanaserver.ClientCapability, limits chain.Limits) *LimitedSolanaChain

func (*LimitedSolanaChain) AckEvent

func (l *LimitedSolanaChain) AckEvent(ctx context.Context, triggerID, eventID, method string) caperrors.Error

func (*LimitedSolanaChain) ChainSelector

func (l *LimitedSolanaChain) ChainSelector() uint64

func (*LimitedSolanaChain) Close

func (l *LimitedSolanaChain) Close() error

func (*LimitedSolanaChain) Description

func (l *LimitedSolanaChain) Description() string

func (*LimitedSolanaChain) HealthReport

func (l *LimitedSolanaChain) HealthReport() map[string]error

func (*LimitedSolanaChain) Initialise

func (*LimitedSolanaChain) Name

func (l *LimitedSolanaChain) Name() string

func (*LimitedSolanaChain) Ready

func (l *LimitedSolanaChain) Ready() error

func (*LimitedSolanaChain) RegisterLogTrigger

func (*LimitedSolanaChain) Start

func (l *LimitedSolanaChain) Start(ctx context.Context) error

func (*LimitedSolanaChain) UnregisterLogTrigger

type SolanaChainCapabilities

type SolanaChainCapabilities struct {
	SolanaChains map[uint64]*solanafakes.FakeSolanaChain
}

SolanaChainCapabilities holds the per-selector FakeSolanaChain instances created for simulation.

func NewSolanaChainCapabilities

func NewSolanaChainCapabilities(
	ctx context.Context,
	lggr logger.Logger,
	registry *capabilities.Registry,
	clients map[uint64]*rpc.Client,
	forwarderProgramIDs map[uint64]solana.PublicKey,
	forwarderStateAccounts map[uint64]solana.PublicKey,
	transmitter solana.PrivateKey,
	dryRunChainWrite bool,
	limits chain.Limits,
) (*SolanaChainCapabilities, error)

NewSolanaChainCapabilities builds FakeSolanaChain instances for every (selector -> client) pair, wraps them with LimitedSolanaChain, and registers each with the capability registry.

func (*SolanaChainCapabilities) Close

func (c *SolanaChainCapabilities) Close() error

func (*SolanaChainCapabilities) Start

type SolanaChainType

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

SolanaChainType implements chain.ChainType for Solana.

func (*SolanaChainType) CollectCLIInputs

func (ct *SolanaChainType) CollectCLIInputs(_ *viper.Viper) map[string]string

func (*SolanaChainType) ExecuteTrigger

func (ct *SolanaChainType) ExecuteTrigger(_ context.Context, _ uint64, _ string, _ interface{}) error

func (*SolanaChainType) Name

func (ct *SolanaChainType) Name() string

func (*SolanaChainType) ParseTriggerChainSelector

func (ct *SolanaChainType) ParseTriggerChainSelector(triggerID string) (uint64, bool)

func (*SolanaChainType) RegisterCapabilities

func (ct *SolanaChainType) RegisterCapabilities(ctx context.Context, cfg chain.CapabilityConfig) ([]services.Service, error)

func (*SolanaChainType) ResolveClients

func (ct *SolanaChainType) ResolveClients(v *viper.Viper) (chain.ResolvedChains, error)

func (*SolanaChainType) ResolveKey

func (ct *SolanaChainType) ResolveKey(s *settings.Settings, broadcast bool) (interface{}, error)

func (*SolanaChainType) ResolveTriggerData

func (ct *SolanaChainType) ResolveTriggerData(_ context.Context, _ uint64, _ chain.TriggerParams) (interface{}, error)

func (*SolanaChainType) RunHealthCheck

func (ct *SolanaChainType) RunHealthCheck(resolved chain.ResolvedChains) error

func (*SolanaChainType) SupportedChains

func (ct *SolanaChainType) SupportedChains() []chain.ChainConfig

func (*SolanaChainType) Supports

func (ct *SolanaChainType) Supports(selector uint64) bool

Jump to

Keyboard shortcuts

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