Add runtime api DuniterAccountApi_estimate_cost
to estimate net tx cost for the end user
Compare changes
+ 0
− 1
Gitlab was upgraded to latest version (v18.3.1), please report issues to https://forum.duniter.org/t/interventions-et-indisponibilite-des-forums-et-de-gitlab/7131/298
DuniterAccountApi_estimate_cost
to estimate net tx cost for the end user
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,
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)