git.delta.rocks / unique-network / refs/commits / 60662ccc0c31

difftreelog

fix build

Trubnikov Sergey2023-04-21parent: #d3a59ed.patch.diff
in: master

4 files changed

modifiedpallets/balances-adapter/src/erc.rsdiffbeforeafterboth
--- a/pallets/balances-adapter/src/erc.rs
+++ b/pallets/balances-adapter/src/erc.rs
@@ -100,7 +100,7 @@
 			amount,
 			ExistenceRequirement::KeepAlive,
 		)
-		.map_err(dispatch_to_evm::<T>);
+		.map_err(dispatch_to_evm::<T>)?;
 		Ok(true)
 	}
 
@@ -117,7 +117,7 @@
 		let to = T::CrossAccountId::from_eth(to);
 		let amount = amount.try_into().map_err(|_| "amount overflow")?;
 
-		if (from != to) {
+		if from != to {
 			return Err("no permission".into());
 		}
 		// let budget = self
@@ -132,7 +132,7 @@
 			amount,
 			ExistenceRequirement::KeepAlive,
 		)
-		.map_err(dispatch_to_evm::<T>);
+		.map_err(dispatch_to_evm::<T>)?;
 		Ok(true)
 	}
 }
@@ -165,7 +165,7 @@
 			amount,
 			ExistenceRequirement::KeepAlive,
 		)
-		.map_err(dispatch_to_evm::<T>);
+		.map_err(dispatch_to_evm::<T>)?;
 		Ok(true)
 	}
 
@@ -182,7 +182,7 @@
 		let to = to.into_sub_cross_account::<T>()?;
 		let amount = amount.try_into().map_err(|_| "amount overflow")?;
 
-		if (from != to) {
+		if from != to {
 			return Err("no permission".into());
 		}
 
@@ -198,7 +198,7 @@
 			amount,
 			ExistenceRequirement::KeepAlive,
 		)
-		.map_err(dispatch_to_evm::<T>);
+		.map_err(dispatch_to_evm::<T>)?;
 		Ok(true)
 	}
 }
modifiedpallets/balances-adapter/src/lib.rsdiffbeforeafterboth
--- a/pallets/balances-adapter/src/lib.rs
+++ b/pallets/balances-adapter/src/lib.rs
@@ -2,12 +2,14 @@
 #![cfg_attr(not(feature = "std"), no_std)]
 #![warn(missing_docs)]
 
+extern crate alloc;
 pub use pallet::*;
 
 pub mod erc;
 
 #[frame_support::pallet]
 pub mod pallet {
+	use alloc::string::String;
 	use frame_support::traits::Get;
 	use sp_core::U256;
 
modifiedruntime/common/config/pallets/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -14,6 +14,7 @@
 // You should have received a copy of the GNU General Public License
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
+use alloc::string::{String, ToString};
 use frame_support::parameter_types;
 use sp_runtime::traits::AccountIdConversion;
 use crate::{
modifiedtests/src/eth/util/playgrounds/unique.dev.tsdiffbeforeafterboth
2222
23// Native contracts ABI23// Native contracts ABI
24import collectionHelpersAbi from '../../abi/collectionHelpers.json' assert {type: 'json'};24import collectionHelpersAbi from '../../abi/collectionHelpers.json' assert {type: 'json'};
25import nativeFungibleAbi from '../../abi/nativeFungible.json' assert {type: 'json'};
25import fungibleAbi from '../../abi/fungible.json' assert {type: 'json'};26import fungibleAbi from '../../abi/fungible.json' assert {type: 'json'};
26import fungibleDeprecatedAbi from '../../abi/fungibleDeprecated.json' assert {type: 'json'};27import fungibleDeprecatedAbi from '../../abi/fungibleDeprecated.json' assert {type: 'json'};
27import nonFungibleAbi from '../../abi/nonFungible.json' assert {type: 'json'};28import nonFungibleAbi from '../../abi/nonFungible.json' assert {type: 'json'};