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

add custom conversion error to handle additional situations (such as optimism deposit tx) #875

Merged
merged 3 commits into from
Jun 13, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions crates/rpc-types-eth/src/transaction/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ pub enum ConversionError {
/// Missing block number
#[error("missing block number")]
MissingBlockNumber,
/// Missing source hash (for Optimism deposit tx)
#[error("missing source hash")]
MissingSourceHash,
/// Invalid source hash (for Optimism deposit tx)
#[error("invalid source hash")]
InvalidSourceHash,
/// Invalid mint value (for Optimism deposit tx)
#[error("invalid mint value")]
InvalidMintValue,
Copy link
Member

Choose a reason for hiding this comment

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

these are OP specific ones, I don't like this because this OP specific and should not be included here

we should either add a custom(String) or Box

Copy link
Member

Choose a reason for hiding this comment

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

would love you feedback about the discussion in the comments

/// Blob gas used integer conversion error
#[error("blob gas used integer conversion error: {0}")]
BlobGasUsedConversion(TryFromIntError),
Expand Down