batch

package
v0.0.0-...-8c998e4 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const MethodGetBlockByNumber = "eth_getBlockByNumber"

Variables

This section is empty.

Functions

func CallBatch

func CallBatch(ctx context.Context, client superwatcher.EthClientRPC, batchCalls []Interface) error

CallBatch gets []rpc.BatchElem from each batchCall.Marshal() in |batchCalls|. It then used |ctx| and the slice []rpc.BatchElem to call client.BatchCallContext. After the client call, it interates through |calls| calling Unmarshal. This means that batchCalls will have their values updated from Unmarshal after CallBatch returns.

Types

type Interface

type Interface interface {
	Marshal() (rpc.BatchElem, error)
	Unmarshal(rpc.BatchElem) error
}

Interface is an intermediate type for passing to CallBatch.

Jump to

Keyboard shortcuts

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