Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockNumberFromContext
deprecated
added in
v0.5.0
Types ¶
type Client
deprecated
type Client interface {
// BlockNumber returns the current block number.
BlockNumber(ctx context.Context) (*big.Int, error)
// Block returns the block data. The block number can be changed by using
// the WithBlockNumber context.
Block(ctx context.Context) (*types.Block, error)
// Call executes a message call transaction, which is directly
// executed in the VM of the node, but never mined into the blockchain.
Call(ctx context.Context, call types.Call) ([]byte, error)
// CallBlocks executes the same call on multiple blocks (counting back from the latest)
// and returns multiple results in a slice
CallBlocks(ctx context.Context, call types.Call, blocks []int64) ([][]byte, error)
// MultiCall works like the Call function but allows to execute multiple
// calls at once.
MultiCall(ctx context.Context, calls []types.Call) ([][]byte, error)
// Storage returns the value of key in the contract storage of the
// given account.
Storage(ctx context.Context, address types.Address, key types.Hash) ([]byte, error)
// Balance returns the wei balance of the given account.
Balance(ctx context.Context, address types.Address) (*big.Int, error)
// SendTransaction injects a signed transaction into the pending pool
// for execution.
SendTransaction(ctx context.Context, transaction *types.Transaction) (*types.Hash, error)
// FilterLogs executes a filter query.
FilterLogs(ctx context.Context, query types.FilterLogsQuery) ([]types.Log, error)
}
Client is an interface for Ethereum blockchain.
Deprecated: use the github.com/defiweb/go-eth package instead.
Click to show internal directories.
Click to hide internal directories.