pendingtx

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaClient

type KafkaClient struct {
	Topic string
	*kafka.Writer
}

func NewKafkaClient

func NewKafkaClient(addrs []string, topic string) *KafkaClient

func (*KafkaClient) SendPending added in v1.6.7

func (kc *KafkaClient) SendPending(hash []byte, tx *PendingTx) error

func (*KafkaClient) SendRmPending added in v1.6.7

func (kc *KafkaClient) SendRmPending(hash []byte, tx *RmPendingTx) error

type PendingMsg added in v1.6.7

type PendingMsg struct {
	Topic  string      `json:"topic"`
	Source interface{} `json:"source"`
	Data   *PendingTx  `json:"data"`
}

type PendingTx added in v1.7.0

type PendingTx struct {
	From     string          `json:"from"`
	Gas      hexutil.Uint64  `json:"gas"`
	GasPrice *hexutil.Big    `json:"gasPrice"`
	Hash     common.Hash     `json:"hash"`
	Input    string          `json:"input"`
	Nonce    hexutil.Uint64  `json:"nonce"`
	To       *common.Address `json:"to"`
	Value    *hexutil.Big    `json:"value"`
}

type RmPendingMsg added in v1.6.7

type RmPendingMsg struct {
	Topic  string       `json:"topic"`
	Source interface{}  `json:"source"`
	Data   *RmPendingTx `json:"data"`
}

type RmPendingTx added in v1.6.7

type RmPendingTx struct {
	From   string `json:"from"`
	Hash   string `json:"hash"`
	Nonce  string `json:"nonce"`
	Delete bool   `json:"delete"`
	Reason int    `json:"reason"`
}

type Sender

type Sender interface {
	SendPending(hash []byte, tx *PendingTx) error
	SendRmPending(hash []byte, tx *RmPendingTx) error
}

type Watcher

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

func NewWatcher

func NewWatcher(clientCtx context.CLIContext, log log.Logger, sender Sender) *Watcher

func (*Watcher) Start

func (w *Watcher) Start()

Jump to

Keyboard shortcuts

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