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

feat(rpc-types): OP Error Types #41

Closed
wants to merge 6 commits into from
Closed

Conversation

refcell
Copy link
Collaborator

@refcell refcell commented Aug 25, 2024

Description

Upstream error types from reth/optimism to rpc-types.

Not a huge fan of the generic EthApiError on the OpEthApiError type.

Also unfortunate we need to copy over internal_rpc_err and rpc_err functions since they're custom reth utils.

Close #40.

@refcell refcell self-assigned this Aug 25, 2024
@refcell refcell requested a review from mattsse as a code owner August 25, 2024 14:15
@refcell refcell added A-rpc-types Area: op alloy rpc types C-port Category: ports code and removed enhancement labels Aug 28, 2024
@refcell refcell requested a review from emhane as a code owner August 30, 2024 21:54
crates/rpc-types/src/error.rs Outdated Show resolved Hide resolved
Comment on lines +13 to +21
/// Thrown when calculating L1 gas fee.
#[error("failed to calculate l1 gas fee")]
L1BlockFeeError,
/// Thrown when calculating L1 gas used
#[error("failed to calculate l1 gas used")]
L1BlockGasError,
/// Wrapper for [`revm_primitives::InvalidTransaction`].
#[error(transparent)]
InvalidTransaction(OptimismInvalidTransactionError),
Copy link
Collaborator

Choose a reason for hiding this comment

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

would it be ok to just incorporate these variants in a new error type and leave the rest in reth?

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
@refcell
Copy link
Collaborator Author

refcell commented Sep 5, 2024

Closing this for now since it can live in reth

@refcell refcell closed this Sep 5, 2024
@refcell refcell deleted the rf/feat/rpc-error-types branch November 1, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc-types Area: op alloy rpc types C-port Category: ports code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Upstream OP Error Types
2 participants