Closed kminevskiy closed 5 years ago
It looks like in the link you posted (https://github.com/mana-ethereum/ethereumex/blob/master/lib/ethereumex/client/base_client.ex#L168) the typespec is incorrect. Please submit a PR.
You can get around this by using the generic request function:
Ethereumex.HttpClient.request("eth_estimateGas", params, opts)
Hi,
I was trying to use the
eth_estimate_gas
function, but it looks like it has not been tested and all calls to it were failing.Here's the error:
{:error, %{"code" => -32602, "message" => "too many arguments, want at most 1"}}
So after looking at the Ethereum JSON RPC specs, I figured that default block parameters can be specified only for certain calls. However, when scrolling through the actual examples, some of them still specify the
quantity/tag
param.But back to the issue at hand.
I removed the default block parameter from the spec, from the function signature and body params and it works as expected. Am I doing something wrong (with your initial implementation) or is it an actual bug and I should submit a PR?
Thanks!