-
Notifications
You must be signed in to change notification settings - Fork 94
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
[framework] Fix transaction fee deduct bug #2286
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
let max_gas_amount = tx_context::max_gas_amount(); | ||
let paid_gas = transaction_fee::calculate_gas(max_gas_amount); | ||
|
||
if (gas_used_after_scale < paid_gas) { |
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.
实际支付的 gas,如果比预先扣除的 gas 要多怎么办?出现的情况是,网络变的拥挤之后 Gas 费上涨
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.
Gas factor 调整会在交易执行之后,这个后面设计 gas factor 调整方案的时候需要考虑。 #1733
ca568bd
to
9b96c7c
Compare
Summary
Deduct the gas fee in the pre_execute function and refund in the post_execute function.
resolve #1137
TODO: #2287