relayer

package
v0.0.0-...-1d04f91 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RetryDelay Time to wait before the next try, when receiving subscription errors.
	RetryDelay = 10 * time.Second
)

Variables

This section is empty.

Functions

func InitFromConfig

func InitFromConfig(ctx context.Context, r *Relayer, cfg *Config) (err error)

InitFromConfig initializes the driver instance based on the given configurations.

Types

type Config

type Config struct {
	L1Endpoint      string
	L1HttpEndpoint  string
	L2Endpoint      string
	MxcL1Address    common.Address
	LPWANAddress    common.Address
	MxcTokenAddress common.Address
	RelayerPrivKey  *ecdsa.PrivateKey
}

Config contains the configurations to initialize a Mxc driver.

func NewConfigFromCliContext

func NewConfigFromCliContext(c *cli.Context) (*Config, error)

NewConfigFromCliContext creates a new config instance from the command line inputs.

type Relayer

type Relayer struct {
	// contains filtered or unexported fields
}

Relayer sync L1 proposed/proven reward to L2 and sync L2 burn to L1 token contract

func (*Relayer) Close

func (r *Relayer) Close()

Close closes the driver instance.

func (*Relayer) InitFromCli

func (r *Relayer) InitFromCli(ctx context.Context, c *cli.Context) error

New initializes the given driver instance based on the command line flags.

func (*Relayer) Name

func (r *Relayer) Name() string

Name returns the application name.

func (*Relayer) ProcessL1BlocksProposedReward

func (r *Relayer) ProcessL1BlocksProposedReward(ctx context.Context, latestBlockNumber uint64) error

func (*Relayer) ProcessL1BlocksProvenReward

func (r *Relayer) ProcessL1BlocksProvenReward(ctx context.Context, latestBlockNumber uint64) error

func (*Relayer) Start

func (r *Relayer) Start() error

Start starts the driver instance.

Jump to

Keyboard shortcuts

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