config

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ChainFamilyName = "ton"

Name of the chain family (e.g., "ethereum", "solana", "ton")

Variables

View Source
var DefaultConfigSet = Chain{
	TransactionManager:  &txm.DefaultConfigSet,
	LogPoller:           &logpoller.DefaultConfigSet,
	ContractTransmitter: &ocr.DefaultConfigSet,
	ClientTTL:           10 * time.Minute,
}

Functions

func NodeStatus

func NodeStatus(n *Node, id string) (relaytypes.NodeStatus, error)

Types

type Chain

type Chain struct {
	TransactionManager  *txm.Config
	LogPoller           *logpoller.Config
	ContractTransmitter *ocr.Config
	ClientTTL           time.Duration
}

func (*Chain) ContractTransmitterConfig

func (c *Chain) ContractTransmitterConfig() *ocr.Config

ContractTransmitterConfig returns the contract transmitter configuration

func (*Chain) LogPollerConfig

func (c *Chain) LogPollerConfig() *logpoller.Config

LogPollerConfig returns the log poller configuration

func (*Chain) TxManager

func (c *Chain) TxManager() *txm.Config

TxManager returns the transaction manager configuration

type Node

type Node struct {
	Name *string
	URL  *config.URL
}

func (*Node) ValidateConfig

func (n *Node) ValidateConfig() (err error)

type Nodes

type Nodes []*Node

func (*Nodes) SetFrom

func (ns *Nodes) SetFrom(fs *Nodes)

type TOMLConfig

type TOMLConfig struct {
	// Do not access directly. Use [IsEnabled]
	Enabled *bool

	// Chain configuration
	ChainID         string
	NetworkName     string
	NetworkNameFull string

	// Chain-specific components configuration
	Chain

	Nodes Nodes
}

func NewDecodedTOMLConfig

func NewDecodedTOMLConfig(rawConfig string) (*TOMLConfig, error)

decodeConfig decodes the rawConfig as (TON) TOML and sets default values

func (*TOMLConfig) IsEnabled

func (c *TOMLConfig) IsEnabled() bool

func (*TOMLConfig) SetDefaults

func (c *TOMLConfig) SetDefaults()

func (*TOMLConfig) SetFrom

func (c *TOMLConfig) SetFrom(f *TOMLConfig)

func (*TOMLConfig) TOMLString

func (c *TOMLConfig) TOMLString() (string, error)

func (*TOMLConfig) ValidateConfig

func (c *TOMLConfig) ValidateConfig() (err error)

Jump to

Keyboard shortcuts

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