Skip to content

Conversation

avilagaston9
Copy link
Contributor

Motivation

EstimateGasPriceError is actually an error triggered in estimate_gas.

Description

Renames EstimateGasPriceError to EstimateGasError

Closes None

@avilagaston9 avilagaston9 changed the title chore: rename estimateGas error chore: rename estimate_gas error Jun 19, 2025
@avilagaston9 avilagaston9 changed the title chore: rename estimate_gas error chore(l2): rename estimate_gas error Jun 19, 2025
@avilagaston9 avilagaston9 self-assigned this Jun 19, 2025
@avilagaston9 avilagaston9 marked this pull request as ready for review June 19, 2025 13:31
@Copilot Copilot AI review requested due to automatic review settings June 19, 2025 13:31
@avilagaston9 avilagaston9 requested a review from a team as a code owner June 19, 2025 13:31
Copy link

Lines of code report

Total lines added: 0
Total lines removed: 1
Total lines changed: 1

Detailed view
+-------------------------------------------------+-------+------+
| File                                            | Lines | Diff |
+-------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/clients/eth/mod.rs | 1216  | -1   |
+-------------------------------------------------+-------+------+

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR renames the EstimateGasPriceError type to EstimateGasError for consistency with the estimate_gas method.

  • Updated import statements and error mappings in EthClient::estimate_gas
  • Renamed the EstimateGasPriceError enum to EstimateGasError
  • Adjusted the EthClientError variant to wrap the new EstimateGasError

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/networking/rpc/clients/eth/mod.rs Switched from EstimateGasPriceError to EstimateGasError in imports and in the estimate_gas flow
crates/networking/rpc/clients/eth/errors.rs Renamed the EstimateGasPriceError enum to EstimateGasError and updated its registration in EthClientError
Comments suppressed due to low confidence (2)

crates/networking/rpc/clients/eth/errors.rs:70

  • [nitpick] Add a doc comment to EstimateGasError explaining the purpose of each variant (e.g., JSON deserialization failure, parse error, RPC error) to improve clarity for maintainers.
pub enum EstimateGasError {

crates/networking/rpc/clients/eth/errors.rs:70

  • There aren’t existing tests covering the renamed EstimateGasError variants; consider adding unit tests for the serde, parse, and RPC error branches to prevent regressions.
pub enum EstimateGasError {

@jrchatruc jrchatruc added this pull request to the merge queue Jun 19, 2025
Merged via the queue into main with commit 144a5ac Jun 19, 2025
22 of 24 checks passed
@jrchatruc jrchatruc deleted the l2/chore/estimate_gas_error branch June 19, 2025 19:16
pedrobergamini pushed a commit to pedrobergamini/ethrex that referenced this pull request Aug 24, 2025
**Motivation**

`EstimateGasPriceError` is actually an error triggered in
`estimate_gas`.

**Description**

Renames `EstimateGasPriceError` to `EstimateGasError`

Closes None
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.

3 participants