9

Some extrinsics allow fees to not be paid if they execute properly (Ex: council.vote if it is the first vote of that account on the given proposal).

What happens when those extrinsics are included inside a utility.batch or utility.batchAll?

2 Answers 2

7

Saying that "fees are not paid" is not a fully accurate statement of what is happening for things like council.vote.

What is actually happening is that at the beginning of the transaction, you are charged a fee assuming the worst case scenario. If we detect you are a first time voter, we refund all of the fee back to the user at the end of the call.

Unfortunately, the batch and batch_all calls are not clever enough to support knowing to refund just part of the fees of the call. Either all the fees are paid, or none of them are.

Additional abstractions and code in the runtime could support this, but, the increased complexity probably won't be worth it at the moment.

5

Yes you will also need to pay for these transactions inside utility.batch or utility.batchAll. However, you also don't pay for each transaction separately, you pay for all of them directly together. The only thing that happens is that if a transaction returns a post weight, that will be taken into account to reduce the overall fee that will be deducted from the sender.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.