vechain / vechain-sdk-js

The official JavaScript SDK for VeChain.
19 stars 6 forks source link

🐛 [BUG] - RPC eth_getLogs does not support `null` for `address` #1016

Open ifavo opened 6 days ago

ifavo commented 6 days ago

Description

The Ethereum JSON-RPC specification does list null as possibility for address when using eth_getLogs.

( https://ethereum.github.io/execution-apis/api-documentation/ )

The SDK requires the request to have address not been defined to work the same.

Reproduction URL

https://www.val.town/v/ifavo/crimsonPenguin

Reproduction steps

import { ThorClient, VeChainProvider } from "@vechain/sdk-network";

const thorClient = ThorClient.fromUrl("https://mainnet.vechain.org");
const provider = new VeChainProvider(thorClient);

await provider.request({
  method: "eth_getLogs",
  params: [
    {
      "address": null,
      "fromBlock": "0x10c8e00",
      "toBlock": "0x10c8e00",
      "topics": [
        "0xb3d987963d01b2f68493b4bdb130988f157ea43070d4ad840fee0466ed9370d9",
      ],
    },
  ],
});

Screenshots

![DESCRIPTION](LINK.png)

Logs

No response

OS

No response