You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When making a request using the eth_getCode method for a non-contract address, the result value returned is 0x0. Other relays (such as Ethereum or BSC relays) return 0x. This can cause issues if applications or libraries are expecting 0x but not 0x0.
It might be worth modifying the result value to return 0x to cover applications or libraries that do not expect 0x0, especially if this is standard for relays on other chains.
Steps to reproduce
Make a request to the JSON RPC relay with the eth_getCode method for a non-contract address
curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"2","method":"eth_getCode","params":["0x0000000000000000000000000000000000000000", "latest"]}' https://testnet.hashio.io/api
Description
When making a request using the eth_getCode method for a non-contract address, the result value returned is 0x0. Other relays (such as Ethereum or BSC relays) return 0x. This can cause issues if applications or libraries are expecting 0x but not 0x0.
It might be worth modifying the result value to return 0x to cover applications or libraries that do not expect 0x0, especially if this is standard for relays on other chains.
Steps to reproduce
curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":"2","method":"eth_getCode","params":["0x0000000000000000000000000000000000000000", "latest"]}' https://testnet.hashio.io/api
Response received:
{"result":"0x0","jsonrpc":"2.0","id":"2"}
Response expected:
{"result":"0x","jsonrpc":"2.0","id":"2"}
Additional context
No response
Hedera network
mainnet, testnet, previewnet, other
Version
v0.3.0
Operating system
macOS
The text was updated successfully, but these errors were encountered: