Documentation ¶
Index ¶
- func JSONRPCBatchCall(url string, calls ...BatchCall) ([]types.Response, error)
- func JSONRPCCall(url, method string, parameters ...interface{}) (types.Response, error)
- type BatchCall
- type Client
- func (c *Client) BatchByNumber(ctx context.Context, number *big.Int) (*types.Batch, error)
- func (c *Client) BatchNumber(ctx context.Context) (uint64, error)
- func (c *Client) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
- func (c *Client) BlockNumber(ctx context.Context) (uint64, error)
- func (c *Client) ExitRootsByGER(ctx context.Context, globalExitRoot common.Hash) (*types.ExitRoots, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONRPCBatchCall ¶ added in v0.0.990
JSONRPCBatchCall executes a 2.0 JSON RPC HTTP Post Batch Request to the provided URL with the provided method and parameters groups, which is compatible with the Ethereum JSON RPC Server.
Types ¶
type BatchCall ¶ added in v0.0.990
type BatchCall struct { Method string Parameters []interface{} }
BatchCall used in batch requests to send multiple methods and parameters at once
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines typed wrappers for the zkEVM RPC API.
func (*Client) BatchByNumber ¶
BatchByNumber returns a batch from the current canonical chain. If number is nil, the latest known batch is returned.
func (*Client) BatchNumber ¶
BatchNumber returns the latest batch number
func (*Client) BlockByNumber ¶ added in v0.5.0
BlockByNumber returns a block from the current canonical chain. If number is nil, the latest known block is returned.
func (*Client) BlockNumber ¶ added in v0.5.0
BlockNumber returns the latest block number
Click to show internal directories.
Click to hide internal directories.