forwarders

package
v2.9.1-automation-2024... Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterName added in v2.1.0

func FilterName(addr common.Address) string

func NewORM

func NewORM(db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig) *orm

Types

type Config

type Config interface {
	FinalityDepth() uint32
}

type Forwarder

type Forwarder struct {
	ID         int64
	Address    common.Address
	EVMChainID big.Big
	CreatedAt  time.Time
	UpdatedAt  time.Time
}

Forwarder is the struct for Forwarder Addresses

type FwdMgr

type FwdMgr struct {
	services.StateMachine
	ORM ORM
	// contains filtered or unexported fields
}

func NewFwdMgr

func NewFwdMgr(db *sqlx.DB, client evmclient.Client, logpoller evmlogpoller.LogPoller, l logger.Logger, cfg Config, dbConfig pg.QConfig) *FwdMgr

func (*FwdMgr) Close

func (f *FwdMgr) Close() error

Stop cancels all outgoings calls and stops internal ticker loop.

func (*FwdMgr) ConvertPayload

func (f *FwdMgr) ConvertPayload(dest common.Address, origPayload []byte) ([]byte, error)

func (*FwdMgr) ForwarderFor

func (f *FwdMgr) ForwarderFor(addr common.Address) (forwarder common.Address, err error)

func (*FwdMgr) HealthReport

func (f *FwdMgr) HealthReport() map[string]error

func (*FwdMgr) Name

func (f *FwdMgr) Name() string

func (*FwdMgr) Start

func (f *FwdMgr) Start(ctx context.Context) error

Start starts Forwarder Manager.

type ORM

type ORM interface {
	CreateForwarder(addr common.Address, evmChainId big.Big) (fwd Forwarder, err error)
	FindForwarders(offset, limit int) ([]Forwarder, int, error)
	FindForwardersByChain(evmChainId big.Big) ([]Forwarder, error)
	DeleteForwarder(id int64, cleanup func(tx pg.Queryer, evmChainId int64, addr common.Address) error) error
	FindForwardersInListByChain(evmChainId big.Big, addrs []common.Address) ([]Forwarder, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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