You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we provide a WeightProvider interface that allows modules to declare their runtime weights so that the appropriate transaction fees can be charged. This unfortunately only works for requests and responses. We should eventually switch to a simpler callback mechanism which should return the PostDispatchInfo for the handle extrinsic.
#[cfg(not(feature = "unsigned"))]#[pallet::weight(get_weight::<T>(&messages))]#[pallet::call_index(1)]#[frame_support::transactional]pubfnhandle(origin:OriginFor<T>,messages:Vec<Message>) -> DispatchResultWithPostInfo{let signer = ensure_signed(origin)?;Self::execute(messages.clone())?;// do anything, but return the `PostDispatchInfo`T::FeeHandler::on_executed(messages, signer)}
This allows for a wider variety of fee collection strategies as well as free transactions, or even negatively priced transactions for consensus update incentives.
The text was updated successfully, but these errors were encountered:
Currently we provide a
WeightProvider
interface that allows modules to declare their runtime weights so that the appropriate transaction fees can be charged. This unfortunately only works for requests and responses. We should eventually switch to a simpler callback mechanism which should return thePostDispatchInfo
for thehandle
extrinsic.This allows for a wider variety of fee collection strategies as well as free transactions, or even negatively priced transactions for consensus update incentives.
The text was updated successfully, but these errors were encountered: