trigger

package
v0.9.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCertificateSendTrigger

func NewCertificateSendTrigger(
	ctx context.Context,
	cfg config.Config,
	log aggkitcommon.Logger,
	l1Client aggkittypes.BaseEthereumClienter,
	l2BridgeSync types.L2BridgeSyncer,
	agglayerClient agglayer.AgglayerClientInterface) (types.CertificateSendTrigger, error)

NewCertificateSendTrigger creates and returns a new CertificateSendTrigger instance based on the provided configuration mode. It supports three trigger modes: - NewBridgeTriggerMode: triggers on new bridge events (preconfTrigger) - EpochBasedTriggerMode: triggers based on epoch progression (epochBasedTrigger) - ASAPTriggerMode: triggers as soon as possible (asapTrigger) AutoTriggerMode is resolved to one of the above based on the AggsenderMode.

Types

type ConfigEpochNotifierPerBlock

type ConfigEpochNotifierPerBlock struct {
	StartingEpochBlock uint64
	NumBlockPerEpoch   uint

	// EpochNotificationPercentage
	// 0 -> begin new Epoch
	// 50 -> middle of epoch
	// 100 -> end of epoch (same as 0)
	EpochNotificationPercentage uint
}

func NewConfigEpochNotifierPerBlock

func NewConfigEpochNotifierPerBlock(ctx context.Context,
	agglayerClient agglayer.AggLayerClientGetEpochConfiguration,
	epochNotificationPercentage uint) (*ConfigEpochNotifierPerBlock, error)

func (*ConfigEpochNotifierPerBlock) String

func (c *ConfigEpochNotifierPerBlock) String() string

func (*ConfigEpochNotifierPerBlock) Validate

func (c *ConfigEpochNotifierPerBlock) Validate() error

type EpochNotifierPerBlock

type EpochNotifierPerBlock struct {
	Config ConfigEpochNotifierPerBlock
	aggkitcommon.PubSub[triggertypes.EpochEvent]
	// contains filtered or unexported fields
}

func (*EpochNotifierPerBlock) ForcePublishEpochEvent

func (e *EpochNotifierPerBlock) ForcePublishEpochEvent()

func (*EpochNotifierPerBlock) GetEpochStatus

func (e *EpochNotifierPerBlock) GetEpochStatus() triggertypes.EpochStatus

GetCurrentStatus returns the current status of the epoch

func (*EpochNotifierPerBlock) Start

func (e *EpochNotifierPerBlock) Start(ctx context.Context)

Start starts the notifier synchronously

func (*EpochNotifierPerBlock) StartAsync

func (e *EpochNotifierPerBlock) StartAsync(ctx context.Context)

StartAsync starts the notifier in a goroutine

func (*EpochNotifierPerBlock) String

func (e *EpochNotifierPerBlock) String() string

type ExtraInfoEventEpoch

type ExtraInfoEventEpoch struct {
	PendingBlocks int
}

func (*ExtraInfoEventEpoch) String

func (e *ExtraInfoEventEpoch) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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