A tool for weighting more complex transactions.
Calculate transaction weights for transactions with 3 or more parameters.
Calculate correct weight based on data within a function, required to calculate transaction fees.
This is a more complex way scale to weight transactions. It computes weight according to the following formula:
ax^2 + by + c
Where a, b, and c are fields in the struct, and x and y are transaction parameters. Have a look at the [examples][#examples] section to see it implemented and used in context.
1. Write the
Write a weighting struct that weighs transactions where the first parameter is a boolean value.
Since this implementation of
WeighData requires a
default to classify all calls as normal.
Last, specify how
PaysFee is used for the custom
- Feeless transaction pallet