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
100 amount,100 amount,
101 ExistenceRequirement::KeepAlive,101 ExistenceRequirement::KeepAlive,
102 )102 )
103 .map_err(dispatch_to_evm::<T>);103 .map_err(dispatch_to_evm::<T>)?;
104 Ok(true)104 Ok(true)
105 }105 }
106106
117 let to = T::CrossAccountId::from_eth(to);117 let to = T::CrossAccountId::from_eth(to);
118 let amount = amount.try_into().map_err(|_| "amount overflow")?;118 let amount = amount.try_into().map_err(|_| "amount overflow")?;
119119
120 if (from != to) {120 if from != to {
121 return Err("no permission".into());121 return Err("no permission".into());
122 }122 }
123 // let budget = self123 // let budget = self
132 amount,132 amount,
133 ExistenceRequirement::KeepAlive,133 ExistenceRequirement::KeepAlive,
134 )134 )
135 .map_err(dispatch_to_evm::<T>);135 .map_err(dispatch_to_evm::<T>)?;
136 Ok(true)136 Ok(true)
137 }137 }
138}138}
165 amount,165 amount,
166 ExistenceRequirement::KeepAlive,166 ExistenceRequirement::KeepAlive,
167 )167 )
168 .map_err(dispatch_to_evm::<T>);168 .map_err(dispatch_to_evm::<T>)?;
169 Ok(true)169 Ok(true)
170 }170 }
171171
182 let to = to.into_sub_cross_account::<T>()?;182 let to = to.into_sub_cross_account::<T>()?;
183 let amount = amount.try_into().map_err(|_| "amount overflow")?;183 let amount = amount.try_into().map_err(|_| "amount overflow")?;
184184
185 if (from != to) {185 if from != to {
186 return Err("no permission".into());186 return Err("no permission".into());
187 }187 }
188188
198 amount,198 amount,
199 ExistenceRequirement::KeepAlive,199 ExistenceRequirement::KeepAlive,
200 )200 )
201 .map_err(dispatch_to_evm::<T>);201 .map_err(dispatch_to_evm::<T>)?;
202 Ok(true)202 Ok(true)
203 }203 }
204}204}
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
--- 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'};