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

fix: incorrect v3 max gas amount calculation #586

Merged
merged 1 commit into from
May 1, 2024

Conversation

xJonathanLEI
Copy link
Owner

When using JSON-RPC v0.7.0, the fee estimate returned contains data gas info. Naively using gas_consumed as max gas amount results in insufficient fees. The correct way to do it is to calculate a pseudo gas amount by dividing the overall fee by the gas price.

@xJonathanLEI xJonathanLEI force-pushed the fix/v3_gas_estimate branch 2 times, most recently from efa1b45 to 6cdb62b Compare May 1, 2024 06:08
When using JSON-RPC v0.7.0, the fee estimate returned contains data
gas info. Naively using `gas_consumed` as max gas amount results in
insufficient fees. The correct way to do it is to calculate a pseudo gas
amount by dividing the overall fee by the gas price.
@xJonathanLEI xJonathanLEI force-pushed the fix/v3_gas_estimate branch from 6cdb62b to 85d7a21 Compare May 1, 2024 06:12
@xJonathanLEI xJonathanLEI merged commit 43b2e8e into master May 1, 2024
26 checks passed
@xJonathanLEI xJonathanLEI deleted the fix/v3_gas_estimate branch May 1, 2024 06:19
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