Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Fix RLP encoding of gas price #408

Merged
merged 1 commit into from
Aug 27, 2021
Merged

Fix RLP encoding of gas price #408

merged 1 commit into from
Aug 27, 2021

Conversation

onbjerg
Copy link
Collaborator

@onbjerg onbjerg commented Aug 26, 2021

Motivation

The gas price is an Option because of EIP-1559, and this encodes gas price as a list, leading to invalid RLP, see onbjerg/ethers-flashbots#11

Solution

Use rlp_opt to correctly encode the gas price if it is set. I'm not sure if this is the best way to go about it since not setting a gas price by this point would then result in an empty field, but I guess it is also a logic error to arrive to this point without having the gas price set?

@gakonst gakonst merged commit 72c77dd into gakonst:master Aug 27, 2021
@onbjerg onbjerg deleted the patch-1 branch August 27, 2021 10:45
meetmangukiya pushed a commit to meetmangukiya/ethers-rs that referenced this pull request Mar 21, 2022
* Fetch code using etherscan api

* Add chains

* Add structops

* Add cargo.lock

* Formatting

* Change logic

* Remove unwraps

* Fix lint

* chore: fix missing import

Co-authored-by: Georgios Konstantopoulos <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants