수수료 계산하기
목표
사용 사례
절차
1. LinearWeightToFee 구조체 작성
LinearWeightToFee 구조체 작성pub struct LinearWeightToFee<C>(sp_std::marker::PhantomData<C>);
impl<C> WeightToFeePolynomial for LinearWeightToFee<C>
where
C: Get<Balance>,
{
type Balance = Balance;
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
let coefficient = WeightToFeeCoefficient {
coeff_integer: C::get(),
coeff_frac: Perbill::zero(),
negative: false,
degree: 1,
};
smallvec!(coefficient)
}
}2. 런타임에서 pallet_transaction_payment 구성
pallet_transaction_payment 구성관련 자료
Last updated