Remove WeightToFee (#1713)

* Remove WeightToFee

* Remove leftover
This commit is contained in:
Serban Iorga
2022-12-12 17:26:13 +02:00
committed by Bastian Köcher
parent e85b3fd998
commit ba75e63fcd
9 changed files with 2 additions and 33 deletions
@@ -27,7 +27,7 @@ use frame_support::{
dispatch::DispatchClass,
parameter_types,
sp_runtime::{MultiAddress, MultiSigner},
weights::{constants, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial},
weights::constants,
};
use frame_system::limits;
@@ -80,25 +80,6 @@ parameter_types! {
.build_or_panic();
}
/// [`WeightToFee`] should reflect cumulus/bridge-hub-* [`WeightToFee`]
pub struct WeightToFee;
impl WeightToFeePolynomial for WeightToFee {
type Balance = Balance;
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
pub const CENTS: Balance = polkadot_runtime_constants::currency::CENTS;
// In BridgeHub, we map the extrinsic base weight to 1/100 CENT.
let p = CENTS;
let q = 100 * Balance::from(constants::ExtrinsicBaseWeight::get().ref_time());
smallvec::smallvec![WeightToFeeCoefficient {
degree: 1,
negative: false,
coeff_frac: Perbill::from_rational(p % q, q),
coeff_integer: p / q,
}]
}
}
/// Public key of the chain account that may be used to verify signatures.
pub type AccountSigner = MultiSigner;