-
Notifications
You must be signed in to change notification settings - Fork 42
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
chore(rpc-types): Buildable Type #374
base: main
Are you sure you want to change the base?
Conversation
📚
|
Needs review from @emhane |
Some(TxType::Eip1559) => Some(OpTxType::Eip1559), | ||
Some(TxType::Eip2930) => Some(OpTxType::Eip2930), | ||
Some(TxType::Eip7702) => Some(OpTxType::Eip7702), | ||
Some(TxType::Eip4844) => Some(OpTxType::Eip1559), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how did you think here, eip4844 -> eip1559 ? I would have thought that variant is just skipped, possibly with a debug log message that eip4844 isn't supported for eip4844
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do that - was pretty unsure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think technically 1559 is accurate here because if 4844 is buildable then 1559 is buildable as well, but 4844 is only buildable if 4844 fields were explicitly set, so I think we should return None here which would result in an error in the request builder impl
Some(TxType::Eip1559) => Some(OpTxType::Eip1559), | ||
Some(TxType::Eip2930) => Some(OpTxType::Eip2930), | ||
Some(TxType::Eip7702) => Some(OpTxType::Eip7702), | ||
Some(TxType::Eip4844) => Some(OpTxType::Eip1559), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think technically 1559 is accurate here because if 4844 is buildable then 1559 is buildable as well, but 4844 is only buildable if 4844 fields were explicitly set, so I think we should return None here which would result in an error in the request builder impl
if self.0.chain_id.is_none() { | ||
return Some(OpTxType::Deposit); | ||
} | ||
match self.0.buildable_type() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can use ? here
Description
Fixes #29.
Implements the
buildable_type
method on theOpTransactionReceipt
type.