RPC.Eth: workaround in EthGetCode to allow [] as return value
Some servers, like nodes.mewapi.io/rpc/eth and www.ethercluster.com/etc,
return empty array instead of "0x" for non-contract addresses.
Example: {"jsonrpc":"2.0","id":1,"result":[]}.
Handle that case and return "0x".
In case of non-empty array, throw UnexpectedReplyException.
Shouldn't those servers return the right result instead of the an empty array? This forces the extra check / workaround that you are putting in place, which should not be necessary.
I sent a message to (MEW) via twitter, lets see what they think.
Shouldn't those servers return the right result instead of the an empty array? This forces the extra check / workaround that you are putting in place, which should not be necessary.
I agree, talking with our node providers now
Hey, this is actually an issue in https://github.com/openrelayxyz/cardinal-evm - which backs both MEW and EtherCluster. We've tagged v1.1.3 with the fix, and will have that out to our production environments in tomorrow's deployment window.
Seems like the issue has been fixed in the 2 servers mentioned by @webwarrior-ws . This PR can be closed then, thanks!