pendingtx

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 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

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

func (*KafkaClient) SendRmPending

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

type PendingMsg

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

type PendingTx

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

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

type RmPendingTx

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