Documentation
¶
Index ¶
- Variables
- func ExtractLimits(w *cresettings.Workflows) chain.Limits
- func RunRPCHealthCheck(clients map[uint64]chain.ChainClient, experimentalSelectors map[uint64]bool) error
- type LimitedSolanaChain
- func (l *LimitedSolanaChain) AckEvent(ctx context.Context, triggerID, eventID, method string) caperrors.Error
- func (l *LimitedSolanaChain) ChainSelector() uint64
- func (l *LimitedSolanaChain) Close() error
- func (l *LimitedSolanaChain) Description() string
- func (l *LimitedSolanaChain) GetAccountInfoWithOpts(ctx context.Context, m commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*solcap.GetAccountInfoWithOptsReply], ...)
- func (l *LimitedSolanaChain) GetBalance(ctx context.Context, m commonCap.RequestMetadata, i *solcap.GetBalanceRequest) (*commonCap.ResponseAndMetadata[*solcap.GetBalanceReply], caperrors.Error)
- func (l *LimitedSolanaChain) GetBlock(ctx context.Context, m commonCap.RequestMetadata, i *solcap.GetBlockRequest) (*commonCap.ResponseAndMetadata[*solcap.GetBlockReply], caperrors.Error)
- func (l *LimitedSolanaChain) GetFeeForMessage(ctx context.Context, m commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*solcap.GetFeeForMessageReply], caperrors.Error)
- func (l *LimitedSolanaChain) GetMultipleAccountsWithOpts(ctx context.Context, m commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*solcap.GetMultipleAccountsWithOptsReply], ...)
- func (l *LimitedSolanaChain) GetProgramAccounts(ctx context.Context, m commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*solcap.GetProgramAccountsReply], ...)
- func (l *LimitedSolanaChain) GetSignatureStatuses(ctx context.Context, m commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*solcap.GetSignatureStatusesReply], ...)
- func (l *LimitedSolanaChain) GetSlotHeight(ctx context.Context, m commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*solcap.GetSlotHeightReply], caperrors.Error)
- func (l *LimitedSolanaChain) GetTransaction(ctx context.Context, m commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*solcap.GetTransactionReply], caperrors.Error)
- func (l *LimitedSolanaChain) HealthReport() map[string]error
- func (l *LimitedSolanaChain) Initialise(ctx context.Context, deps core.StandardCapabilitiesDependencies) error
- func (l *LimitedSolanaChain) Name() string
- func (l *LimitedSolanaChain) Ready() error
- func (l *LimitedSolanaChain) RegisterLogTrigger(ctx context.Context, triggerID string, m commonCap.RequestMetadata, ...) (<-chan commonCap.TriggerAndId[*solcap.Log], caperrors.Error)
- func (l *LimitedSolanaChain) Start(ctx context.Context) error
- func (l *LimitedSolanaChain) UnregisterLogTrigger(ctx context.Context, triggerID string, m commonCap.RequestMetadata, ...) caperrors.Error
- func (l *LimitedSolanaChain) WriteReport(ctx context.Context, metadata commonCap.RequestMetadata, ...) (*commonCap.ResponseAndMetadata[*solcap.WriteReportReply], caperrors.Error)
- type SolanaChainCapabilities
- type SolanaChainType
- func (ct *SolanaChainType) CollectCLIInputs(_ *viper.Viper) map[string]string
- func (ct *SolanaChainType) ExecuteTrigger(_ context.Context, _ uint64, _ string, _ interface{}) error
- func (ct *SolanaChainType) Name() string
- func (ct *SolanaChainType) ParseTriggerChainSelector(triggerID string) (uint64, bool)
- func (ct *SolanaChainType) RegisterCapabilities(ctx context.Context, cfg chain.CapabilityConfig) ([]services.Service, error)
- func (ct *SolanaChainType) ResolveClients(v *viper.Viper) (chain.ResolvedChains, error)
- func (ct *SolanaChainType) ResolveKey(s *settings.Settings, broadcast bool) (interface{}, error)
- func (ct *SolanaChainType) ResolveTriggerData(_ context.Context, _ uint64, _ chain.TriggerParams) (interface{}, error)
- func (ct *SolanaChainType) RunHealthCheck(resolved chain.ResolvedChains) error
- func (ct *SolanaChainType) SupportedChains() []chain.ChainConfig
- func (ct *SolanaChainType) Supports(selector uint64) bool
Constants ¶
This section is empty.
Variables ¶
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) ChainSelector ¶
func (l *LimitedSolanaChain) ChainSelector() uint64
func (*LimitedSolanaChain) Close ¶
func (l *LimitedSolanaChain) Close() error
func (*LimitedSolanaChain) Description ¶
func (l *LimitedSolanaChain) Description() string
func (*LimitedSolanaChain) GetAccountInfoWithOpts ¶
func (l *LimitedSolanaChain) GetAccountInfoWithOpts(ctx context.Context, m commonCap.RequestMetadata, i *solcap.GetAccountInfoWithOptsRequest) (*commonCap.ResponseAndMetadata[*solcap.GetAccountInfoWithOptsReply], caperrors.Error)
func (*LimitedSolanaChain) GetBalance ¶
func (l *LimitedSolanaChain) GetBalance(ctx context.Context, m commonCap.RequestMetadata, i *solcap.GetBalanceRequest) (*commonCap.ResponseAndMetadata[*solcap.GetBalanceReply], caperrors.Error)
func (*LimitedSolanaChain) GetBlock ¶
func (l *LimitedSolanaChain) GetBlock(ctx context.Context, m commonCap.RequestMetadata, i *solcap.GetBlockRequest) (*commonCap.ResponseAndMetadata[*solcap.GetBlockReply], caperrors.Error)
func (*LimitedSolanaChain) GetFeeForMessage ¶
func (l *LimitedSolanaChain) GetFeeForMessage(ctx context.Context, m commonCap.RequestMetadata, i *solcap.GetFeeForMessageRequest) (*commonCap.ResponseAndMetadata[*solcap.GetFeeForMessageReply], caperrors.Error)
func (*LimitedSolanaChain) GetMultipleAccountsWithOpts ¶
func (l *LimitedSolanaChain) GetMultipleAccountsWithOpts(ctx context.Context, m commonCap.RequestMetadata, i *solcap.GetMultipleAccountsWithOptsRequest) (*commonCap.ResponseAndMetadata[*solcap.GetMultipleAccountsWithOptsReply], caperrors.Error)
func (*LimitedSolanaChain) GetProgramAccounts ¶
func (l *LimitedSolanaChain) GetProgramAccounts(ctx context.Context, m commonCap.RequestMetadata, i *solcap.GetProgramAccountsRequest) (*commonCap.ResponseAndMetadata[*solcap.GetProgramAccountsReply], caperrors.Error)
func (*LimitedSolanaChain) GetSignatureStatuses ¶
func (l *LimitedSolanaChain) GetSignatureStatuses(ctx context.Context, m commonCap.RequestMetadata, i *solcap.GetSignatureStatusesRequest) (*commonCap.ResponseAndMetadata[*solcap.GetSignatureStatusesReply], caperrors.Error)
func (*LimitedSolanaChain) GetSlotHeight ¶
func (l *LimitedSolanaChain) GetSlotHeight(ctx context.Context, m commonCap.RequestMetadata, i *solcap.GetSlotHeightRequest) (*commonCap.ResponseAndMetadata[*solcap.GetSlotHeightReply], caperrors.Error)
func (*LimitedSolanaChain) GetTransaction ¶
func (l *LimitedSolanaChain) GetTransaction(ctx context.Context, m commonCap.RequestMetadata, i *solcap.GetTransactionRequest) (*commonCap.ResponseAndMetadata[*solcap.GetTransactionReply], caperrors.Error)
func (*LimitedSolanaChain) HealthReport ¶
func (l *LimitedSolanaChain) HealthReport() map[string]error
func (*LimitedSolanaChain) Initialise ¶
func (l *LimitedSolanaChain) Initialise(ctx context.Context, deps core.StandardCapabilitiesDependencies) error
func (*LimitedSolanaChain) Name ¶
func (l *LimitedSolanaChain) Name() string
func (*LimitedSolanaChain) Ready ¶
func (l *LimitedSolanaChain) Ready() error
func (*LimitedSolanaChain) RegisterLogTrigger ¶
func (l *LimitedSolanaChain) RegisterLogTrigger(ctx context.Context, triggerID string, m commonCap.RequestMetadata, i *solcap.FilterLogTriggerRequest) (<-chan commonCap.TriggerAndId[*solcap.Log], caperrors.Error)
func (*LimitedSolanaChain) UnregisterLogTrigger ¶
func (l *LimitedSolanaChain) UnregisterLogTrigger(ctx context.Context, triggerID string, m commonCap.RequestMetadata, i *solcap.FilterLogTriggerRequest) caperrors.Error
func (*LimitedSolanaChain) WriteReport ¶
func (l *LimitedSolanaChain) WriteReport(ctx context.Context, metadata commonCap.RequestMetadata, input *solcap.WriteReportRequest) (*commonCap.ResponseAndMetadata[*solcap.WriteReportReply], caperrors.Error)
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
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 (*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