git.delta.rocks / unique-network / refs/commits / 150e9b0efa3f

difftreelog

chore update target weight2fee

Igor Kozyrev2022-06-21parent: #503034b.patch.diff
in: master

4 files changed

modifiedruntime/common/src/constants.rsdiffbeforeafterboth
--- a/runtime/common/src/constants.rs
+++ b/runtime/common/src/constants.rs
@@ -35,9 +35,10 @@
 pub const CENTIUNIQUE: Balance = 10 * MILLIUNIQUE;
 pub const UNIQUE: Balance = 100 * CENTIUNIQUE;
 
-pub const WEIGHT_TO_FEE_COEFF: u32 = 142_688_000;
+// Targeting 0.1 UNQ per transfer
+pub const WEIGHT_TO_FEE_COEFF: u32 = 207_890_902;
 
-// Targeting 0.15 UNQ per transfer
+// Targeting 0.15 UNQ per transfer via ETH
 pub const MIN_GAS_PRICE: u64 = 1_019_493_469_850;
 
 /// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.
@@ -52,5 +53,5 @@
 parameter_types! {
 	pub const DefaultSponsoringRateLimit: BlockNumber = 1 * DAYS;
 
-	pub const TransactionByteFee: Balance = 501 * MICROUNIQUE; // Targeting 0.1 Unique per NFT transfer
+	pub const TransactionByteFee: Balance = 501 * MICROUNIQUE;
 }
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -508,7 +508,6 @@
 
 	fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
 		smallvec!(WeightToFeeCoefficient {
-			// Targeting 0.1 Unique per NFT transfer
 			coeff_integer: WEIGHT_TO_FEE_COEFF.into(),
 			coeff_frac: Perbill::zero(),
 			negative: false,
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
507507
508 fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {508 fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
509 smallvec!(WeightToFeeCoefficient {509 smallvec!(WeightToFeeCoefficient {
510 // Targeting 0.1 Unique per NFT transfer
511 coeff_integer: WEIGHT_TO_FEE_COEFF.into(),510 coeff_integer: WEIGHT_TO_FEE_COEFF.into(),
512 coeff_frac: Perbill::zero(),511 coeff_frac: Perbill::zero(),
513 negative: false,512 negative: false,
810 RelayLocation,
811 AccountId,
812 Balances,
813 (),
814 >;
815 type ResponseHandler = (); // Don't handle responses for now.809 type ResponseHandler = (); // Don't handle responses for now.
816 type SubscriptionService = PolkadotXcm;810 type SubscriptionService = PolkadotXcm;
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -506,7 +506,6 @@
 
 	fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
 		smallvec!(WeightToFeeCoefficient {
-			// Targeting 0.1 Unique per NFT transfer
 			coeff_integer: WEIGHT_TO_FEE_COEFF.into(),
 			coeff_frac: Perbill::zero(),
 			negative: false,
@@ -804,13 +803,8 @@
 	type LocationInverter = LocationInverter<Ancestry>;
 	type Barrier = Barrier;
 	type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
-	type Trader = UsingOnlySelfCurrencyComponents<
-		LinearFee<Balance>,
-		RelayLocation,
-		AccountId,
-		Balances,
-		(),
-	>;
+	type Trader =
+		UsingOnlySelfCurrencyComponents<LinearFee<Balance>, RelayLocation, AccountId, Balances, ()>;
 	type ResponseHandler = (); // Don't handle responses for now.
 	type SubscriptionService = PolkadotXcm;