-
Notifications
You must be signed in to change notification settings - Fork 28
Default to snake case in the Ethers.get_logs/2 overrides and options #151
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
From the Ethers.get_logs/2 documentation:
"""
## Overrides and Options
- `:address`: Indicates event emitter contract address. (nil means all contracts)
- `:rpc_client`: The RPC Client to use. It should implement ethereum jsonRPC API. default: Ethereumex.HttpClient
- `:rpc_opts`: Extra options to pass to rpc_client. (Like timeout, Server URL, etc.)
- `:fromBlock`: Minimum block number of logs to filter.
- `:toBlock`: Maximum block number of logs to filter.
"""This naming needs to be more consistent.
In addition, there's a naming convention that Elixir projects should follow.
In this case, it's clear that fromBlock and toBlock should instead be from_block and to_block.
This is in the project's documentation, but following the convention here would make it more intuitive for Elixir developers.
For context, I was using this function and getting no logs because I was using snake case instead of camel case. I only found out about this when logging the raw request.
This leads me to think that validating the overrides and options might not be a bad idea 🤔
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request