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
2#![cfg_attr(not(feature = "std"), no_std)]2#![cfg_attr(not(feature = "std"), no_std)]
3#![warn(missing_docs)]3#![warn(missing_docs)]
44
5extern crate alloc;
5pub use pallet::*;6pub use pallet::*;
67
7pub mod erc;8pub mod erc;
89
9#[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;
1315
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
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'};