Documentation ¶
Index ¶
- type Assets
- type Client
- type Config
- type Engine
- type Filterer
- type Forwarder
- type LogFilterer
- func (f *LogFilterer) CurrentHeight(ctx context.Context) uint64
- func (f *LogFilterer) FilterCollateralEvents(ctx context.Context, startAt, stopAt uint64, cb OnEventFound)
- func (f *LogFilterer) FilterMultisigControlEvents(ctx context.Context, startAt, stopAt uint64, cb OnEventFound)
- func (f *LogFilterer) FilterStakingEvents(ctx context.Context, startAt, stopAt uint64, cb OnEventFound)
- func (f *LogFilterer) FilterVestingEvents(ctx context.Context, startAt, stopAt uint64, cb OnEventFound)
- type OnEventFound
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Level specifies the logging level of the Ethereum implementation of the // Event Forwarder. Level encoding.LogLevel `long:"log-level"` PollEventRetryDuration encoding.Duration }
func NewDefaultConfig ¶ added in v0.55.0
func NewDefaultConfig() Config
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func NewEngine ¶
func NewEngine( cfg Config, log *logging.Logger, filterer Filterer, forwarder Forwarder, stakingDeployment types.EthereumContract, vestingDeployment types.EthereumContract, multiSigDeployment types.EthereumContract, ) *Engine
func (*Engine) ReloadConf ¶
func (*Engine) Start ¶
func (e *Engine) Start()
Start starts the polling of the Ethereum bridges, listens to the events they emit and forward it to the network.
func (*Engine) Stop ¶
func (e *Engine) Stop()
Stop stops the engine, its polling and event forwarding.
func (*Engine) UpdateCollateralStartingBlock ¶ added in v0.69.0
func (*Engine) UpdateMultiSigControlStartingBlock ¶
func (*Engine) UpdateStakingStartingBlock ¶
type Filterer ¶
type Filterer interface { FilterCollateralEvents(ctx context.Context, startAt, stopAt uint64, cb OnEventFound) FilterStakingEvents(ctx context.Context, startAt, stopAt uint64, cb OnEventFound) FilterVestingEvents(ctx context.Context, startAt, stopAt uint64, cb OnEventFound) FilterMultisigControlEvents(ctx context.Context, startAt, stopAt uint64, cb OnEventFound) CurrentHeight(context.Context) uint64 }
type Forwarder ¶
type Forwarder interface {
ForwardFromSelf(*commandspb.ChainEvent)
}
type LogFilterer ¶
type LogFilterer struct {
// contains filtered or unexported fields
}
LogFilterer wraps the Ethereum event filterers to return Vega events.
func NewLogFilterer ¶
func NewLogFilterer( cfg Config, log *logging.Logger, ethClient Client, collateralBridge types.EthereumContract, stakingBridge types.EthereumContract, vestingBridge types.EthereumContract, multiSigControl types.EthereumContract, assets Assets, ) (*LogFilterer, error)
func (*LogFilterer) CurrentHeight ¶
func (f *LogFilterer) CurrentHeight(ctx context.Context) uint64
func (*LogFilterer) FilterCollateralEvents ¶
func (f *LogFilterer) FilterCollateralEvents(ctx context.Context, startAt, stopAt uint64, cb OnEventFound)
FilterCollateralEvents retrieves the events from the collateral bridge on Ethereum starting at startAt, transform them into ChainEvent, and pass it to the OnEventFound callback. The properties startAt and stopAt are inclusive.
func (*LogFilterer) FilterMultisigControlEvents ¶
func (f *LogFilterer) FilterMultisigControlEvents(ctx context.Context, startAt, stopAt uint64, cb OnEventFound)
func (*LogFilterer) FilterStakingEvents ¶
func (f *LogFilterer) FilterStakingEvents(ctx context.Context, startAt, stopAt uint64, cb OnEventFound)
FilterStakingEvents retrieves the events from the staking bridge on Ethereum starting at startAt, transform them into ChainEvent, and pass it to the OnEventFound callback. The properties startAt and stopAt are inclusive.
func (*LogFilterer) FilterVestingEvents ¶
func (f *LogFilterer) FilterVestingEvents(ctx context.Context, startAt, stopAt uint64, cb OnEventFound)
FilterVestingEvents retrieves the events from the vesting bridge on Ethereum starting at startAt, transform them into ChainEvent, and pass it to the OnEventFound callback. The properties startAt and stopAt are inclusive.
type OnEventFound ¶
type OnEventFound func(*commandspb.ChainEvent)