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
14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License
15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
1616
17use alloc::string::{String, ToString};
17use frame_support::parameter_types;18use frame_support::parameter_types;
18use sp_runtime::traits::AccountIdConversion;19use sp_runtime::traits::AccountIdConversion;
19use crate::{20use crate::{
modifiedtests/src/eth/util/playgrounds/unique.dev.tsdiffbeforeafterboth
--- a/tests/src/eth/util/playgrounds/unique.dev.ts
+++ b/tests/src/eth/util/playgrounds/unique.dev.ts
@@ -22,6 +22,7 @@
 
 // Native contracts ABI
 import collectionHelpersAbi from '../../abi/collectionHelpers.json' assert {type: 'json'};
+import nativeFungibleAbi from '../../abi/nativeFungible.json' assert {type: 'json'};
 import fungibleAbi from '../../abi/fungible.json' assert {type: 'json'};
 import fungibleDeprecatedAbi from '../../abi/fungibleDeprecated.json' assert {type: 'json'};
 import nonFungibleAbi from '../../abi/nonFungible.json' assert {type: 'json'};