-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Display real extrinsic costs when interacting with contracts #2608
Comments
Please move this to substrate - the UI calls |
I cannot find a function with this name. Is this distinct from the |
I did a little investigation. Everything is working as intended. I mistakenly thought that the weight contribution was not accounted for. In reality the numbers were just too small to notice it in the UI because of #2604. So nothing is to be done here. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query. |
With an upcoming PR (paritytech/substrate#5712) the weight and therefore the fees of any contract related extrinsic will reflect the real costs of that extrinsic. Previously the gas costs where on top as a completely separate matter. This distinction is gone.
That means the
TransactionPaymentApi::query_info
will take into account thegas_limit
of an extrinsic (or the code length forput_code
) and returns the complete costs for the sender as for any other extrinsic.However, during my tests with the linked PR I noticed that for the contracts module the costs that the UI displayed when sending an extrinsic stays fixed no matter what gas limit I supply:
This is different from other modules where this fee seems to change when the weight of an extrinsic changes given another input. I guess that this behavior is somehow disabled in the contracts UI.
I suppose to display the fees as calculated by
TransactionPaymentApi::query_info
when submitting a contract extrinsic as for any other extrinsic. However, we should change the wording slightly as those costs are a maximum and the rest is refunded. This is true for all extrinsics lately but contracts might be an extreme case. I propose something like this:The text was updated successfully, but these errors were encountered: