ethOnBlock

ethOnBlock is a stream of changes in the EVM state when a new block is mined. The stream includes the results of eth_call and other RPC requests provided by users and is restricted based on the number of calls.

Service available via Gateway-API only.

Stream Endpoint

  • Method: ethOnBlock

  • Gateway-API Endpoint: ws://127.0.0.1:28333/ws

Parameters

Key

Description

Values

include

Fields to include in the on block event stream

name, response, blockHeight, tag [Default: all]

call-params

Fields used to build an RPC call request

method- see chart below for available methods and additional fields required for each method

tag- latest, 0, or negative number. [Default: 0]

name- unique string identifier for call. [Default: integer counter]

Example

Subscribing to the ethOnBlock stream via the Gateway-API in Python (Line 6 creates the subscription):

Response

TaskCompletedEventis received after all calls have been executed upon receipt of a block.TaskDisabledEvent is received if there is an error response to a call, indicating that the call has been disabled.

Python Gateway:

Go Gateway:

Last updated