Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = os.ErrNotExist
Functions ¶
This section is empty.
Types ¶
type EthereumAPIClient ¶
type EthereumAPIClient interface {
GetTxByBlockNumberAndIndex(ctx context.Context, block *big.Int, index uint) (EthereumTx, error)
GetBlockByNumber(context.Context, *big.Int) (EthereumBlock, error)
GetLastBlockNumber(context.Context) (*big.Int, error)
io.Closer
}
func NewEthereumInfuraClient ¶
func NewEthereumInfuraClient(url string) (EthereumAPIClient, error)
type EthereumBlock ¶
type EthereumBlock interface {
Txs() []EthereumTx
Number() *big.Int
}
type EthereumFinEvent ¶
func NewEthereumFinEvent ¶
func NewEthereumFinEvent(tx EthereumTx) (EthereumFinEvent, error)
type EthereumTx ¶
type EthereumTx interface {
Tx
Index() uint
EthereumTx() *types.Transaction
Gas() *big.Int
GasPrice() *big.Int
GasFeeCap() *big.Int
GasTipCap() *big.Int
}
func NewEthereumTx ¶
func NewEthereumTx(tx *types.Transaction, sender *common.Address, block *big.Int, index uint) (EthereumTx, error)
type EthereumTxEvent ¶
func NewEthereumTxEvent ¶
func NewEthereumTxEvent(tx EthereumTx) (EthereumTxEvent, error)
type EthereumWatcher ¶
type EthereumWatcher interface {
Watcher
}
func NewEthereumWatcher ¶
func NewEthereumWatcher(client EthereumAPIClient, nextBlockNum *big.Int, repo Repo) (EthereumWatcher, error)
type Repo ¶
type Repo interface {
StoreTxsByBlockID(Tx) error
FindTxsByBlockID(blockID *big.Int) ([]Tx, error)
PurgeTxsByBlockID(blockID *big.Int) error
}
func NewMemRepo ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.