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: eip2930/1559 response type adjustments (part 1) #353

Merged
merged 9 commits into from
Aug 8, 2021

Conversation

gakonst
Copy link
Owner

@gakonst gakonst commented Jul 30, 2021

  • Refactors the tx types to its own subdirectory, to prepare for adding more tx request types / serialization helpers
  • Adds base_fee_per_gas to Block
  • Adds access_list, transaction_type, max_priority_fee_per_gas, max_fee_per_gas to Transaction
  • Adds transaction_type, effective_gas_price to TransactionReceipt
  • SignerMiddleware::sign_transaction now returns an rlp encoded signed transaction instead of a Transaction
  • Middleware::send_raw_transaction now receives a signed rlp transaction instead of a Transaction

@gakonst gakonst changed the title feat: eip2930/1559 type adjustments feat: eip2930/1559 response type adjustments Jul 31, 2021
@gakonst gakonst changed the title feat: eip2930/1559 response type adjustments feat: eip2930/1559 response type adjustments (part 1) Aug 1, 2021
use serde::{Deserialize, Serialize};

/// Access list
#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize, RlpEncodable)]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I hit one bug here, RlpEncodable should be RlpEncodableWrapper. unless you're using .0 to do the rlp encoding, otherwise you got an extra "[]".

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

splitting the transaction mod definitely makes it more maintainable and provides more structure.

pub gateway_fee: Option<U256>,

// EIP2718
/// Transaction type, Some(1) for AccessList transaction, None for Legacy
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should probably also mention that Some(2) is EIP1559

@gakonst gakonst merged commit 09ff480 into master Aug 8, 2021
@gakonst gakonst deleted the feat/typed-txs-types branch August 8, 2021 22:49
meetmangukiya pushed a commit to meetmangukiya/ethers-rs that referenced this pull request Mar 21, 2022
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.

None yet

4 participants