Home

Return opcode gas usage for every transaction in a block

POST
https://eth-archive.nownodes.io/

Returns EVM opcode gas usage aggregated per opcode for each transaction in the selected block.

Body

application/json

Returns EVM opcode gas usage aggregated per opcode for each transaction in the selected block.

Request payload for trace_blockOpcodeGas.

jsonrpcstring2.0required

JSON-RPC protocol version.

methodstringtrace_blockOpcodeGasrequired

JSON-RPC method name.

idinteger | stringrequired

Client-provided JSON-RPC request identifier. The same value is returned in the response.

paramsArray<BlockIdentifier>required

Parameters: block identifier.

Show child attributes

Ethereum block identifier accepted by the trace API.

One of

Block number encoded as a hexadecimal quantity, or a 32-byte block hash depending on method context.

string

Named Ethereum block tag.

stringlatestearliestpendingsafefinalized

Response

200OK

Successful JSON-RPC response or JSON-RPC method error.

400Bad Request

Invalid HTTP request body or malformed JSON-RPC payload.

401Unauthorized

Missing or invalid API key.

500Internal Server Error

Internal server error.