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 (*Relayer) SubmitTransaction ¶
func (s *Relayer) SubmitTransaction(req *common.SubmitTransactionRequest) (*common.SubmitTransactionResponse, error)
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.
Click to show internal directories.
Click to hide internal directories.