Documentation
¶
Index ¶
- type ChainConfig
- type NodeConfig
- type NodeConfigs
- type TOMLConfig
- func (c *TOMLConfig) BalancePollPeriod() time.Duration
- func (c *TOMLConfig) BroadcastChanSize() uint64
- func (c *TOMLConfig) ConfirmPollPeriod() time.Duration
- func (c *TOMLConfig) IsEnabled() bool
- func (c *TOMLConfig) ListNodes() NodeConfigs
- func (c *TOMLConfig) OCR2CachePollPeriod() time.Duration
- func (c *TOMLConfig) OCR2CacheTTL() time.Duration
- func (c *TOMLConfig) SetFrom(f *TOMLConfig)
- func (c *TOMLConfig) TOMLString() (string, error)
- func (c *TOMLConfig) ValidateConfig() error
- type TOMLConfigs
- type TronRelayer
- func (t *TronRelayer) Close() error
- func (t *TronRelayer) GetChainStatus(ctx context.Context) (types.ChainStatus, error)
- func (t *TronRelayer) HealthReport() map[string]error
- func (t *TronRelayer) LatestHead(ctx context.Context) (types.Head, error)
- func (t *TronRelayer) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) ([]types.NodeStatus, string, int, error)
- func (t *TronRelayer) Name() string
- func (t *TronRelayer) NewConfigProvider(ctx context.Context, args types.RelayArgs) (types.ConfigProvider, error)
- func (t *TronRelayer) NewContractReader(ctx context.Context, contractReaderConfig []byte) (types.ContractReader, error)
- func (t *TronRelayer) NewContractWriter(_ context.Context, _ []byte) (types.ContractWriter, error)
- func (t *TronRelayer) NewEVMChain(ctx context.Context) (types.EVMChain, error)
- func (t *TronRelayer) NewLLOProvider(context.Context, types.RelayArgs, types.PluginArgs) (types.LLOProvider, error)
- func (t *TronRelayer) NewMedianProvider(ctx context.Context, relayargs types.RelayArgs, pluginargs types.PluginArgs) (types.MedianProvider, error)
- func (t *TronRelayer) NewPluginProvider(ctx context.Context, relayargs types.RelayArgs, pluginargs types.PluginArgs) (types.PluginProvider, error)
- func (t *TronRelayer) Ready() error
- func (t *TronRelayer) Replay(ctx context.Context, fromBlock string, args map[string]any) error
- func (t *TronRelayer) Start(ctx context.Context) error
- func (t *TronRelayer) Transact(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainConfig ¶
type ChainConfig struct {
BroadcastChanSize *uint64
ConfirmPollPeriod *config.Duration
OCR2CachePollPeriod *time.Duration
OCR2CacheTTL *time.Duration
BalancePollPeriod *time.Duration
}
func (*ChainConfig) SetDefaults ¶
func (c *ChainConfig) SetDefaults()
type NodeConfig ¶
func (*NodeConfig) ValidateConfig ¶
func (n *NodeConfig) ValidateConfig() error
type NodeConfigs ¶
type NodeConfigs []*NodeConfig
func (NodeConfigs) SelectRandom ¶
func (ns NodeConfigs) SelectRandom() (*NodeConfig, error)
func (*NodeConfigs) SetFrom ¶
func (ns *NodeConfigs) SetFrom(fs *NodeConfigs)
type TOMLConfig ¶
type TOMLConfig struct {
ChainID *string
// Do not access directly, use [IsEnabled]
Enabled *bool
ChainConfig
Nodes NodeConfigs
}
func NewDefault ¶
func NewDefault() *TOMLConfig
func (*TOMLConfig) BalancePollPeriod ¶
func (c *TOMLConfig) BalancePollPeriod() time.Duration
func (*TOMLConfig) BroadcastChanSize ¶
func (c *TOMLConfig) BroadcastChanSize() uint64
func (*TOMLConfig) ConfirmPollPeriod ¶
func (c *TOMLConfig) ConfirmPollPeriod() time.Duration
func (*TOMLConfig) IsEnabled ¶
func (c *TOMLConfig) IsEnabled() bool
func (*TOMLConfig) ListNodes ¶
func (c *TOMLConfig) ListNodes() NodeConfigs
func (*TOMLConfig) OCR2CachePollPeriod ¶
func (c *TOMLConfig) OCR2CachePollPeriod() time.Duration
func (*TOMLConfig) OCR2CacheTTL ¶
func (c *TOMLConfig) OCR2CacheTTL() time.Duration
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() error
type TOMLConfigs ¶
type TOMLConfigs []*TOMLConfig
func (*TOMLConfigs) SetFrom ¶
func (cs *TOMLConfigs) SetFrom(fs *TOMLConfigs) error
func (TOMLConfigs) ValidateConfig ¶
func (cs TOMLConfigs) ValidateConfig() error
type TronRelayer ¶
type TronRelayer struct {
services.StateMachine
// contains filtered or unexported fields
}
func NewRelayer ¶
func NewRelayer(cfg *TOMLConfig, lggr logger.Logger, keystore core.Keystore) (*TronRelayer, error)
func (*TronRelayer) Close ¶
func (t *TronRelayer) Close() error
func (*TronRelayer) GetChainStatus ¶
func (t *TronRelayer) GetChainStatus(ctx context.Context) (types.ChainStatus, error)
ChainService interface
func (*TronRelayer) HealthReport ¶
func (t *TronRelayer) HealthReport() map[string]error
func (*TronRelayer) LatestHead ¶
func (*TronRelayer) ListNodeStatuses ¶
func (t *TronRelayer) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) ([]types.NodeStatus, string, int, error)
func (*TronRelayer) NewConfigProvider ¶
func (t *TronRelayer) NewConfigProvider(ctx context.Context, args types.RelayArgs) (types.ConfigProvider, error)
func (*TronRelayer) NewContractReader ¶
func (t *TronRelayer) NewContractReader(ctx context.Context, contractReaderConfig []byte) (types.ContractReader, error)
func (*TronRelayer) NewContractWriter ¶
func (t *TronRelayer) NewContractWriter(_ context.Context, _ []byte) (types.ContractWriter, error)
Relayer interface
func (*TronRelayer) NewEVMChain ¶ added in v0.0.9
func (*TronRelayer) NewLLOProvider ¶
func (t *TronRelayer) NewLLOProvider(context.Context, types.RelayArgs, types.PluginArgs) (types.LLOProvider, error)
func (*TronRelayer) NewMedianProvider ¶
func (t *TronRelayer) NewMedianProvider(ctx context.Context, relayargs types.RelayArgs, pluginargs types.PluginArgs) (types.MedianProvider, error)
implement MedianProvider type from github.com/smartcontractkit/chainlink-common/pkg/loop/internal/types
if the loop.Relayer returned by NewRelayer supports the internal loop type MedianProvider, it's called here: see https://github.com/smartcontractkit/chainlink-common/blob/7c11e2c2ce3677f57239c40585b04fd1c9ce1713/pkg/loop/internal/relayer/relayer.go#L493
func (*TronRelayer) NewPluginProvider ¶
func (t *TronRelayer) NewPluginProvider(ctx context.Context, relayargs types.RelayArgs, pluginargs types.PluginArgs) (types.PluginProvider, error)
func (*TronRelayer) Ready ¶
func (t *TronRelayer) Ready() error
Click to show internal directories.
Click to hide internal directories.