git.delta.rocks / unique-network / refs/commits / 95338e20d6df

difftreelog

fix after rebase

Trubnikov Sergey2023-05-22parent: #5d77792.patch.diff
in: master

4 files changed

modifiedpallets/balances-adapter/src/common.rsdiffbeforeafterboth
--- a/pallets/balances-adapter/src/common.rs
+++ b/pallets/balances-adapter/src/common.rs
@@ -45,7 +45,7 @@
 	}
 
 	fn transfer() -> Weight {
-		<BalancesWeight<T> as WeightInfo>::transfer()
+		<BalancesWeight<T> as WeightInfo>::transfer_allow_death()
 	}
 
 	fn approve() -> Weight {
@@ -57,7 +57,7 @@
 	}
 
 	fn transfer_from() -> Weight {
-		<BalancesWeight<T> as WeightInfo>::transfer()
+		<BalancesWeight<T> as WeightInfo>::transfer_allow_death()
 	}
 
 	fn burn_from() -> Weight {
modifiedpallets/balances-adapter/src/erc.rsdiffbeforeafterboth
--- a/pallets/balances-adapter/src/erc.rs
+++ b/pallets/balances-adapter/src/erc.rs
@@ -54,7 +54,7 @@
 		Ok(total.into())
 	}
 
-	#[weight(<SelfWeightOf<T>>::transfer())]
+	#[weight(<SelfWeightOf<T>>::transfer_allow_death())]
 	fn transfer(&mut self, caller: Caller, to: Address, amount: U256) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let to = T::CrossAccountId::from_eth(to);
@@ -68,7 +68,7 @@
 		Ok(true)
 	}
 
-	#[weight(<SelfWeightOf<T>>::transfer())]
+	#[weight(<SelfWeightOf<T>>::transfer_allow_death())]
 	fn transfer_from(
 		&mut self,
 		caller: Caller,
@@ -102,7 +102,7 @@
 		Ok(balance.into())
 	}
 
-	#[weight(<SelfWeightOf<T>>::transfer())]
+	#[weight(<SelfWeightOf<T>>::transfer_allow_death())]
 	fn transfer_cross(&mut self, caller: Caller, to: CrossAddress, amount: U256) -> Result<bool> {
 		let caller = T::CrossAccountId::from_eth(caller);
 		let to = to.into_sub_cross_account::<T>()?;
@@ -117,7 +117,7 @@
 		Ok(true)
 	}
 
-	#[weight(<SelfWeightOf<T>>::transfer())]
+	#[weight(<SelfWeightOf<T>>::transfer_allow_death())]
 	fn transfer_from_cross(
 		&mut self,
 		caller: Caller,
modifiedpallets/balances-adapter/src/lib.rsdiffbeforeafterboth
--- a/pallets/balances-adapter/src/lib.rs
+++ b/pallets/balances-adapter/src/lib.rs
@@ -153,7 +153,7 @@
 			};
 
 			Ok(PostDispatchInfo {
-				actual_weight: Some(<SelfWeightOf<T>>::transfer()),
+				actual_weight: Some(<SelfWeightOf<T>>::transfer_allow_death()),
 				pays_fee: Pays::Yes,
 			})
 		}
modifiedruntime/common/config/pallets/app_promotion.rsdiffbeforeafterboth
before · runtime/common/config/pallets/app_promotion.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use crate::{18	runtime_common::config::pallets::{TreasuryAccountId, RelayChainBlockNumberProvider},19	Runtime, Balances, BlockNumber, Unique, RuntimeEvent, EvmContractHelpers,20};2122use frame_support::{parameter_types, PalletId};23use sp_arithmetic::Perbill;24use up_common::{25	constants::{UNIQUE, DAYS, RELAY_DAYS},26	types::Balance,27};2829parameter_types! {30	pub const AppPromotionId: PalletId = PalletId(*b"appstake");31	pub const RecalculationInterval: BlockNumber = RELAY_DAYS;32	pub const PendingInterval: BlockNumber = 7 * DAYS;33	pub const Nominal: Balance = UNIQUE;34	pub IntervalIncome: Perbill = Perbill::from_rational(5u32, 10_000);35}3637impl pallet_app_promotion::Config for Runtime {38	type PalletId = AppPromotionId;39	type CollectionHandler = Unique;40	type ContractHandler = EvmContractHelpers;41	type Currency = Balances;42	type WeightInfo = pallet_app_promotion::weights::SubstrateWeight<Self>;43	type TreasuryAccountId = TreasuryAccountId;44	type RelayBlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;45	type RecalculationInterval = RecalculationInterval;46	type PendingInterval = PendingInterval;47	type Nominal = Nominal;48	type IntervalIncome = IntervalIncome;49	type RuntimeEvent = RuntimeEvent;50}