[pallet-revive] tx fee fixes (#7463)
Apply some fixes to properly estimate ethereum tx fees:
- Set the `extension_weight` on the dispatch_info to properly calculate
the fee with pallet_transaction_payment
- Expose the gas_price through Runtime API, just in case we decide to
tweak the value in future updates, it should be read from the chain
rather than be a shared constant exposed by the crate
- add a `evm_gas_to_fee` utility function to properly convert gas to
substrate fee
- Fix some minor gas encoding for edge cases
---------
Co-authored-by:
cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
parent
2f44779a
Showing
- cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs 18 additions, 11 deletions...s/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
- prdoc/pr_7463.prdoc 17 additions, 0 deletionsprdoc/pr_7463.prdoc
- substrate/bin/node/runtime/src/lib.rs 15 additions, 9 deletionssubstrate/bin/node/runtime/src/lib.rs
- substrate/frame/revive/rpc/revive_chain.metadata 0 additions, 0 deletionssubstrate/frame/revive/rpc/revive_chain.metadata
- substrate/frame/revive/rpc/src/client.rs 8 additions, 1 deletionsubstrate/frame/revive/rpc/src/client.rs
- substrate/frame/revive/rpc/src/lib.rs 3 additions, 3 deletionssubstrate/frame/revive/rpc/src/lib.rs
- substrate/frame/revive/src/evm/gas_encoder.rs 41 additions, 10 deletionssubstrate/frame/revive/src/evm/gas_encoder.rs
- substrate/frame/revive/src/evm/runtime.rs 27 additions, 29 deletionssubstrate/frame/revive/src/evm/runtime.rs
- substrate/frame/revive/src/lib.rs 24 additions, 21 deletionssubstrate/frame/revive/src/lib.rs
- substrate/frame/revive/src/tests.rs 6 additions, 6 deletionssubstrate/frame/revive/src/tests.rs
Please register or sign in to comment