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

update ethers-rs to 0.6.1 #63

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Rjected
Copy link

@Rjected Rjected commented Dec 3, 2021

Motivation

Older versions of ethers-rs depend on curl, which has issues compiling for M1 macs. Newer versions of ethers-rs do not require curl, so it should be updated.

Solution

Updates to ethers-rs change the type of the gas_price field of Transaction from U256 to Option<U256>, due to the gasPrice field being deprecated for EIP-1559 transactions.
As a result, gas_price_txs_from_block has been added to help implement proper gas price calculation for both EIP-1559 transactions and non EIP-1559 transactions. This function follows the advice included in the gasPrice deprecation PR, using effectiveGasPrice from receipts for EIP-1559 transactions, and gasPrice for non EIP-1559 transactions. This solution is meant to work post gasPrice removal for EIP-1559 transactions.

This also updates BlockNumber to BlockId.

 - support change to the gasFee field of Transactions due to update
this prevents a transaction with both an effectiveGasPrice and gasPrice
populated from causing a panic
@Rjected Rjected marked this pull request as ready for review January 5, 2022 02:52
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.

1 participant