Get the simple things down first.
Understand how to calculate transaction weights using a custom weighting struct for single transaction values.
Calculate correct weight for a transaction involving a
This guide goes over the components of a simple weighting struct designed for a single argument dispatch of type
The ultimate weight of the transaction is the product of the transaction parameter and the field of this struct.
1. Write the
WeighData, write a weighting struct that takes a single
Since this implementation of
WeighData requires a
Dispatch, use [
default][dispatchclass-rustdocs] to classify all calls as normal—as opposed to operational.
PaysFee trait to indicate whether fees should actually be charged from the caller. If not, the weights are still applied toward the block maximums.
- Feeless transaction pallet