-
Notifications
You must be signed in to change notification settings - Fork 254
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
Return fee details for an Extrinsic #527
Comments
I'm not sure off the top of my head! Having a bit of a look around, I'm not sure it's obvious from the events that come back for a transaction exactly which fees were paid. There is more detail on which fees are paid here: https://wiki.polkadot.network/docs/learn-transaction-fees It may be that the most robust way to know exactly what you paid for a transaction is to check your balance before and after submitting it (of course ignoring any non-fee amounts you may be transferring). Perhaps it's worth asking a question at https://substrate.stackexchange.com; if you find a specific set of steps to take, we can help you run through those steps using subxt. |
Just FYI, I dug into this myself and answered your stackexchange post (https://substrate.stackexchange.com/a/4224/474). I hope that helps! Now that I understand it better, and assuming that all turns out to be reliable (so far it seems that way), I'll consider adding a feature to subxt to return the |
Thank you very much for your answer! We'll have a think about whether it's worth calculating this fee ourselves since the |
Just to add, I think that the goal here should be to add something like: pub fn partial_fee_estimate(&self) -> u64 to Later (probably a future PR depending on where the TransactionFeePaid event is up to), we could also add: pub fn partial_fee(&self) -> u64 to We could assume that fees are calculated as they are on polkadot and use the ExtrinsicSuccess event etc (see above stackexchange link) but it's probably wrong to bake in that assumption. |
Is there a way to check the exact
final_fee
that the signer of an extrinsic was charged? The best I could think of was approximating using weights. Thank you!The text was updated successfully, but these errors were encountered: