Add runtime api DuniterAccountApi_estimate_cost
to estimate net tx cost for the end user
Merged
requested to merge 308-add-a-runtime-api-to-simulate-max-net-tx-cost-for-the-end-user-fees-refund into master
This MR adds a runtime API DuniterAccountApi_estimate_cost(tx) that estimates transaction fees and quota refunds. It returns an object with three fields:
// The estimated effective cost for the user (fees - refund)
cost: Balance,
// The estimated amount of fees for the extrinsic
fees: Balance,
// The estimated amount of refund from quota
refund: Balance,
For reviewers
The implementation introduces a new trait, GetSigner
, to extract the signer from the transaction. Substrate doesn’t provide a way to retrieve the signer without verifying the signature via the Checkable
trait. To avoid unnecessary computation on the node side, this runtime API skips signature verification.
Closes #308 (closed)
Merge request reports
Activity
changed milestone to %runtime-1000
added C-runtime P5-sometimesoon RN-runtime bug labels
mentioned in issue clients/python/silkaj#429
removed bug label
enabled an automatic merge when all merge checks for 1222fec9 pass
mentioned in commit 00344339
Please register or sign in to reply