difftreelog
fix build
in: master
4 files changed
pallets/balances-adapter/src/erc.rsdiffbeforeafterboth100 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 }106106117 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")?;119119120 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 = self132 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 }171171182 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")?;184184185 if (from != to) {185 if from != to {186 return Err("no permission".into());186 return Err("no permission".into());187 }187 }188188198 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}pallets/balances-adapter/src/lib.rsdiffbeforeafterboth2#![cfg_attr(not(feature = "std"), no_std)]2#![cfg_attr(not(feature = "std"), no_std)]3#![warn(missing_docs)]3#![warn(missing_docs)]445extern crate alloc;5pub use pallet::*;6pub use pallet::*;677pub mod erc;8pub mod erc;899#[frame_support::pallet]10#[frame_support::pallet]10pub mod pallet {11pub mod pallet {12 use alloc::string::String;11 use frame_support::traits::Get;13 use frame_support::traits::Get;12 use sp_core::U256;14 use sp_core::U256;1315runtime/common/config/pallets/mod.rsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// 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/>.161617use 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::{tests/src/eth/util/playgrounds/unique.dev.tsdiffbeforeafterboth222223// Native contracts ABI23// Native contracts ABI24import 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'};