From 60662ccc0c31fc46e402c47989b6806507107df7 Mon Sep 17 00:00:00 2001 From: Trubnikov Sergey Date: Fri, 21 Apr 2023 08:55:28 +0000 Subject: [PATCH] fix: build --- --- 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::); + .map_err(dispatch_to_evm::)?; 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::); + .map_err(dispatch_to_evm::)?; Ok(true) } } @@ -165,7 +165,7 @@ amount, ExistenceRequirement::KeepAlive, ) - .map_err(dispatch_to_evm::); + .map_err(dispatch_to_evm::)?; Ok(true) } @@ -182,7 +182,7 @@ let to = to.into_sub_cross_account::()?; 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::); + .map_err(dispatch_to_evm::)?; Ok(true) } } --- 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; --- 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 . +use alloc::string::{String, ToString}; use frame_support::parameter_types; use sp_runtime::traits::AccountIdConversion; use crate::{ --- 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'}; -- gitstuff