Open ifavo opened 6 days ago
eth_getLogs does accept either a single topic hash or a list of topic hashes according to https://ethereum.github.io/execution-apis/api-documentation/
eth_getLogs
The SDK does not support the list of hashes.
https://www.val.town/v/ifavo/coffeeHookworm
import { ThorClient, VeChainProvider } from "@vechain/sdk-network"; const thorClient = ThorClient.fromUrl("https://mainnet.vechain.org"); const provider = new VeChainProvider(thorClient); // this works const singleTopic = await provider.request({ method: "eth_getLogs", params: [ { "address": "0x6e04f400810be5c570c08ea2def43c4d44481063", "fromBlock": "0x10c8e00", "toBlock": "0x10c8e00", "topics": [ "0xb3d987963d01b2f68493b4bdb130988f157ea43070d4ad840fee0466ed9370d9", ], }, ], }); console.log("Single Matches", singleTopic); // this fails, because the HTTP Post to the node is being incorrectly formatted const multiTopics = await provider.request({ method: "eth_getLogs", params: [ { "address": "0x6e04f400810be5c570c08ea2def43c4d44481063", "fromBlock": "0x10c8e00", "toBlock": "0x10c8e00", "topics": [ [ "0xb3d987963d01b2f68493b4bdb130988f157ea43070d4ad840fee0466ed9370d9", "0x9b87a00e30f1ac65d898f070f8a3488fe60517182d0a2098e1b4b93a54aa9bd6", "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", ], ], }, ], }); console.log("Multi Matches", multiTopics);
![DESCRIPTION](LINK.png)
No response
Description
eth_getLogs
does accept either a single topic hash or a list of topic hashes according to https://ethereum.github.io/execution-apis/api-documentation/The SDK does not support the list of hashes.
Reproduction URL
https://www.val.town/v/ifavo/coffeeHookworm
Reproduction steps
Screenshots
Logs
No response
OS
No response