client

package
v0.0.3-RC25 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: GPL-3.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONRPCCall

func JSONRPCCall(url, method string, parameters ...interface{}) (types.Response, error)

JSONRPCCall executes a 2.0 JSON RPC HTTP Post Request to the provided URL with the provided method and parameters, which is compatible with the Ethereum JSON RPC Server.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client defines typed wrappers for the zkEVM RPC API.

func NewClient

func NewClient(url string) *Client

NewClient creates an instance of client

func (*Client) BatchByNumber

func (c *Client) BatchByNumber(ctx context.Context, number *big.Int) (*types.Batch, error)

BatchByNumber returns a batch from the current canonical chain. If number is nil, the latest known batch is returned.

func (*Client) BatchNumber

func (c *Client) BatchNumber(ctx context.Context) (uint64, error)

BatchNumber returns the latest batch number

Jump to

Keyboard shortcuts

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