You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
What is the best way to estimate transaction fee? It seems like it can be calculated by using transaction size and fees from configurations, however this won't work if the modules is charging additional transaction fee (e.g. gas fee from contract module).
Is there a way to dry run a transaction? Because it is not possible to create a formula to calculate transaction fee (due to dynamic nature of the modules), the best way I think is dry run a transaction, and check how much fee is been deducted. The tricky part is to determine how much of the balance deduction is from transaction fee. It will be best if user can dry run a transaction and get the delta state as response. Then it is possible to estimate the effects for any kind of transactions.
There seems no way to specify gas limits for a transaction (other than contract module)? That means user doesn't have the ability to limit the cost of a transaction. Hypothetically, it is possible user broadcast a transaction and before it get finalized, the cost of gas price doubled. Or whatever changes cause the transaction fee differ to estimation that simulated on a different block.
The text was updated successfully, but these errors were encountered:
There's no particularly good way to automatically estimate transaction fees on Turing-complete smart contract platforms like Substrate-Contracts and Ethereum. In Parity Ethereum, we used a binary chop in order to figure it out, which though it works well for a lot of contracts, still isn't general.
Much better would be to annotate gas requirements as part of the contract's ABI and perhaps auto-generate this from the EDSL in which the contract is written. But that'll take Quite Some Time. In the meantime, I suggest you just use heuristics for the basic transaction fee and overestimate the gas requirements and price.
I have few questions regards to transaction fee.
The text was updated successfully, but these errors were encountered: