Developers Forum for XinFin XDC Network

Discussion on: xdc dosent suport eth_call with specific blockhash

wjrjerome profile image
Blockchain Minions • Edited on

have you tried using block number hex instead of passing the block hash directly?
Looking into the web3 implementation, it is expecting the second parameters to be block number rather than hash.(except those enum such as "latest").

I have tested with the block number 0x22b2277 which is block num for this hash 0xe8ec...64b you provided. Below is what it returned:

curl -X POST -H "Content-Type: application/json" -d '
    "id": 348,
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [
            "data": "0x06fdde03",
            "gas": "0x2faf080",
            "to": "0x53350795c11cee781a7e174479778f848d76ab2a"

Enter fullscreen mode Exit fullscreen mode

Looking at some of the eth API documentation, it also suggest eth_call shall be using block num in hex format OR use the enum it provided, see