Open ifavo opened 6 days ago
The RPC docs on https://ethereum.github.io/execution-apis/api-documentation/ state that the second parameter for eth_getBlockByNumber and eth_getBlockByHash is a boolean flag that indicates if transaction results will be hydrated.
eth_getBlockByNumber
eth_getBlockByHash
Currently the SDK returns hydrated transaction details at all times.
https://www.val.town/v/ifavo/amberOtter
import { ThorClient, VeChainProvider } from "@vechain/sdk-network"; const thorClient = ThorClient.fromUrl("https://mainnet.vechain.org"); const provider = new VeChainProvider(thorClient); const txIdsOnly = await provider.request({ method: "eth_getBlockByHash", params: ["0x012031cb1199629027c010e8c259664edb3f9d0d78b78a4ebc089dc78f604e78", false], }); console.log("This should be Ids only:", txIdsOnly.transactions) const hydrated = await provider.request({ method: "eth_getBlockByHash", params: ["0x012031cb1199629027c010e8c259664edb3f9d0d78b78a4ebc089dc78f604e78", true], }); console.log("This should be transaction objects:", hydrated.transactions)
![DESCRIPTION](LINK.png)
No response
Description
The RPC docs on https://ethereum.github.io/execution-apis/api-documentation/ state that the second parameter for
eth_getBlockByNumber
andeth_getBlockByHash
is a boolean flag that indicates if transaction results will be hydrated.Currently the SDK returns hydrated transaction details at all times.
Reproduction URL
https://www.val.town/v/ifavo/amberOtter
Reproduction steps
Screenshots
Logs
No response
OS
No response