-
Notifications
You must be signed in to change notification settings - Fork 766
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
fix(etherscan)!: change the GasOracle
fields to be f64
#2325
fix(etherscan)!: change the GasOracle
fields to be f64
#2325
Conversation
This updates the `GasOracle`'s {safe_gase_price,propose_gas_price,fast_gas_price} from `u64` to `f64` to fix [BUG] Failed to deserialize etherscan response: data did not match any variant of untagged enum ResponseData #2324 BREAKING CHANGE: This considered a public api breaking change, since `f64` and `u64` is not compatible with each other.
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.
judging from the json in the reference issue this lgtm,
would like to see a test with that json and ideally a client test for mainnet as well, see lib.rs test cases
This a required change after chaning the gas prices to be `f64`
Tested Locally with the repo in #2324 with my new updates and works correctly 🎉 ! INFO ethers_etherscan_issue: Gas Oracle Info, gas_oracle: Ok(GasOracle { safe_gas_price: 110.4, propose_gas_price: 127.4, fast_gas_price: 134.0, last_block: 41173362, suggested_base_fee: 80.380853619, gas_used_ratio: [0.447337990736135, 0.250362882144311, 0.414055028555671, 0.799576101506245, 0.419134294964152] })
at src/main.rs:39 |
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.
lgtm
Motivation
Closes #2324
Solution
This updates the
GasOracle
's{safe_gase_price,propose_gas_price,fast_gas_price}
fromu64
tof64
BREAKING CHANGE: This considered a public api breaking change, since
f64
andu64
is not compatible with each other.PR Checklist