Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix eth_estimate_gas typespec #55

Merged
merged 4 commits into from
Dec 29, 2018

Conversation

kminevskiy
Copy link
Contributor

No description provided.

params = [transaction, block]
@spec eth_estimate_gas(map(), keyword()) :: {:ok, binary()} | error
def eth_estimate_gas(transaction, opts \\ []) do
params = [transaction]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it accepts two parameters

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While that's what I got after reading Ethereum JSON RPC wiki, I can't find any examples of people using it like that - every single example I found doesn't specify the block type. Also, after removing the block parameter, the related test passed.

With current implementation, I keep getting {:error, %{"code" => -32602, "message" => "too many arguments, want at most 1"}}

If I misunderstood the spec, would really appreciate if you could comment on that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. I'll look into it on the weekend

@ayrat555 ayrat555 merged commit 26ee0e2 into mana-ethereum:master Dec 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants