relayer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Ctx                     context.Context
	EthClient               *ethclient.Client
	Forwarder               common.Forwarder
	Key                     *common.Key
	ValidateTransactionFunc ValidateTransactionFunc
}

Config ...

type NewForwardRequestFunc

type NewForwardRequestFunc func() common.ForwardRequest

NewForwardRequestFunc returns a new, empty ForwardRequest that must be compatible with the Forwarder the relayer is configured to use.

type Relayer

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

Relayer represents a transaction relayer. It contains an Ethereum client and a private key, allowing it to forward transactions.

func NewRelayer

func NewRelayer(cfg *Config) (*Relayer, error)

NewRelayer returns a new Relayer.

func (*Relayer) SubmitTransaction

SubmitTransaction attempts to have the relayer submit the given transaction.

type ValidateTransactionFunc added in v0.0.5

type ValidateTransactionFunc func(*common.SubmitTransactionRequest) error

ValidateTransactionFunc is a user-set transaction validation function. For example, the user may wish to validate the contract being called, or the calldata, to only allow forward requests to specific contracts or with specific data.

Jump to

Keyboard shortcuts

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