forwarders

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewORM

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

Types

type Config

type Config interface {
	gas.Config
	pg.QConfig
}

type Forwarder

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

Forwarder is the struct for Forwarder Addresses

type FwdMgr

type FwdMgr struct {
	utils.StartStopOnce
	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) *FwdMgr

func (*FwdMgr) Close

func (f *FwdMgr) Close() error

Stop cancels all outgoings calls and stops internal ticker loop.

func (*FwdMgr) GetForwardedPayload

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

func (*FwdMgr) GetForwarderForEOA

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

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 utils.Big) (fwd Forwarder, err error)
	FindForwarders(offset, limit int) ([]Forwarder, int, error)
	FindForwardersByChain(evmChainId utils.Big) ([]Forwarder, error)
	DeleteForwarder(id int32) error
	FindForwardersInListByChain(evmChainId utils.Big, addrs []common.Address) ([]Forwarder, error)
}

Jump to

Keyboard shortcuts

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