api

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

File: api/blockchain_client.go

File: api/types.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockchainClient

type BlockchainClient interface {
	BlockNumber(ctx context.Context) (uint64, error)
	FilterLogs(ctx context.Context, query FilterQuery) ([]Log, error)
}

BlockchainClient defines the required methods for interacting with a blockchain.

type FilterQuery

type FilterQuery struct {
	FromBlock uint64
	ToBlock   uint64
	Topics    [][]common.Hash
	Addresses []common.Address
}

FilterQuery represents the parameters to filter logs/events.

type Log

type Log struct {
	Address     common.Address
	Topics      []common.Hash
	Data        []byte
	BlockNumber uint64
	TxHash      common.Hash
	Index       uint
}

Log represents a single log event fetched from the blockchain.

Jump to

Keyboard shortcuts

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