Environment
- Node.js version: 22.11.0
- Alchemy SDK version: 3.4.8
The problem
getBlockWithTransactions does not include size in its response as mentioned in the docs. It is listed in the response object parameters, but does not appear in the example response.
How to reproduce:
import { Alchemy, Network } from 'alchemy-sdk';
const alchemy = new Alchemy({
apiKey: ALCHEMY_API_KEY,
network: Network.ETH_MAINNET,
});
console.log((await alchemy.core.getBlockWithTransactions(21179399)).size);
// undefined
The size is present in the JSON-RPC response of eth_getBlockByNumber. Here is the sandbox link for the same block.
Environment
The problem
getBlockWithTransactionsdoes not includesizein its response as mentioned in the docs. It is listed in the response object parameters, but does not appear in the example response.How to reproduce:
The
sizeis present in the JSON-RPC response ofeth_getBlockByNumber. Here is the sandbox link for the same block.