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: 1559/2930 txs (part 2) #355
Conversation
Legacy(TransactionRequest), | ||
// 0x01 | ||
#[serde(rename = "0x01")] | ||
Eip2930(Eip2930TransactionRequest), |
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 I request a rename of these transaction names?
I prefer python's version of "AccessListTransactionRequest" and "DynamicFeeTransactionRequest" over these number named one.
Eip2930 and Eip1559 are not straightforward, it's hard to figure out the underlying meaning.
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.
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.
Hey - we discussed it in the dev chat, I preferred the EIPxxx numbering, confirmed by @prestwich @roynalnaruto @mattsse, so we'll keep the EIPXXX numbering for tx types!
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.
only checked syntax, not the actual encoding.
use serde::{Deserialize, Serialize}; | ||
/// Parameters for sending a transaction | ||
#[derive(Clone, Default, Serialize, Deserialize, PartialEq, Eq, Debug)] | ||
pub struct Eip1559TransactionRequest { |
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.
pub struct Eip1559TransactionRequest { | |
#[serde(rename_all = "camelCase")] | |
pub struct Eip1559TransactionRequest { |
instead of individual renames?
@guanqun replied above, let's stick with the EIP numbers, they're numbers that everyone in Ethereum knows about (EIP-1559 is very specific about what it gives, vs "Dynamic Fee" can mean literally anything) |
Thanks for the info. I agree that EIP-1559 is popular, but from my own view, other two EIP-2930 and EIP-2718 are less popular. I doubt that people would immediately know the meaning behind them. That said, you have the final call. |
FYI. A few small changes are needed to make it work on goerli network. The biggest one missing here is the leading header byte. I hack around and come up with a patch here, if it's useful to others. guanqun@68de2a2 |
Their APIs had a breaking change
1. The AccessList struct should have used RlpEncodableWrapper, otherwise we get extra bytes 2. The 1559/2930 types do not use eip-155-style replay protection
b4f1790
to
14419d3
Compare
* refactor: move format_token to utils * refactor(cli): use foundry_utils::format_tokens * fix(forge): pretty print counterexample * fix(forge): print string with quotation marks and add brackets * fix(forge): do not set the revert reason if it's empty * chore: cargo fmt / lint
TypedTransaction
enum w/From
implementations for each type, which will replaceTransactionRequest
in the rest of the codebaseAccessList
RLP encoding derivation method