git.delta.rocks / unique-network / refs/commits / dd1406bcaf7f

difftreelog

refactor extract EvmAddressMapping primitive

Yaroslav Bolyukin2021-11-18parent: #1e3b702.patch.diff
in: master

10 files changed

modifiedpallets/common/Cargo.tomldiffbeforeafterboth
--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -15,10 +15,10 @@
 sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
 sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
 sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
+up-evm-mapping = { default-features = false, path = '../../primitives/evm-mapping' }
 nft-data-structs = { default-features = false, path = '../../primitives/nft' }
 pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
 evm-coder = { default-features = false, path = '../../crates/evm-coder' }
-
 pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }
 serde = { version = "1.0.130", default-features = false }
 scale-info = { version = "1.0.0", default-features = false, features = [
@@ -32,6 +32,7 @@
     "frame-system/std",
     "sp-runtime/std",
     "sp-std/std",
+    "up-evm-mapping/std",
     "nft-data-structs/std",
     "pallet-evm/std",
 ]
modifiedpallets/common/src/account.rsdiffbeforeafterboth
--- a/pallets/common/src/account.rs
+++ b/pallets/common/src/account.rs
@@ -2,12 +2,12 @@
 use codec::{Encode, EncodeLike, Decode};
 use sp_core::H160;
 use scale_info::{Type, TypeInfo};
-use sp_core::crypto::AccountId32;
 use core::cmp::Ordering;
 use serde::{Serialize, Deserialize};
 use pallet_evm::AddressMapping;
 use sp_std::vec::Vec;
 use sp_std::clone::Clone;
+use up_evm_mapping::EvmBackwardsAddressMapping;
 
 pub trait CrossAccountId<AccountId>:
 	Encode + EncodeLike + Decode + TypeInfo + Clone + PartialEq + Ord + core::fmt::Debug + Default
@@ -174,19 +174,5 @@
 		} else {
 			BasicCrossAccountIdRepr::Substrate(v.as_sub().clone())
 		}
-	}
-}
-
-pub trait EvmBackwardsAddressMapping<AccountId> {
-	fn from_account_id(account_id: AccountId) -> H160;
-}
-
-/// Should have same mapping as EnsureAddressTruncated
-pub struct MapBackwardsAddressTruncated;
-impl EvmBackwardsAddressMapping<AccountId32> for MapBackwardsAddressTruncated {
-	fn from_account_id(account_id: AccountId32) -> H160 {
-		let mut out = [0; 20];
-		out.copy_from_slice(&(account_id.as_ref() as &[u8])[0..20]);
-		H160(out)
 	}
 }
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -141,7 +141,7 @@
 pub mod pallet {
 	use super::*;
 	use frame_support::{Blake2_128Concat, pallet_prelude::*, storage::Key};
-	use account::{EvmBackwardsAddressMapping, CrossAccountId};
+	use account::CrossAccountId;
 	use frame_support::traits::Currency;
 	use nft_data_structs::TokenId;
 	use scale_info::TypeInfo;
@@ -153,7 +153,7 @@
 		type CrossAccountId: CrossAccountId<Self::AccountId>;
 
 		type EvmAddressMapping: pallet_evm::AddressMapping<Self::AccountId>;
-		type EvmBackwardsAddressMapping: EvmBackwardsAddressMapping<Self::AccountId>;
+		type EvmBackwardsAddressMapping: up_evm_mapping::EvmBackwardsAddressMapping<Self::AccountId>;
 
 		type Currency: Currency<Self::AccountId>;
 		type CollectionCreationPrice: Get<
modifiedpallets/evm-transaction-payment/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-transaction-payment/Cargo.toml
+++ b/pallets/evm-transaction-payment/Cargo.toml
@@ -15,6 +15,7 @@
 fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }
 pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }
 up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" } 
+up-evm-mapping = { default-features = false, path = "../../primitives/evm-mapping" }
 
 [dependencies.codec]
 default-features = false
@@ -35,4 +36,5 @@
     "pallet-ethereum/std",
     "fp-evm/std",
     "up-sponsorship/std",
+    "up-evm-mapping/std",
 ]
modifiedpallets/evm-transaction-payment/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-transaction-payment/src/lib.rs
+++ b/pallets/evm-transaction-payment/src/lib.rs
@@ -1,6 +1,7 @@
 #![cfg_attr(not(feature = "std"), no_std)]
 
 pub use pallet::*;
+use up_evm_mapping::EvmBackwardsAddressMapping;
 
 #[frame_support::pallet]
 pub mod pallet {
@@ -20,6 +21,7 @@
 	pub trait Config: frame_system::Config {
 		type SponsorshipHandler: SponsorshipHandler<H160, (H160, Vec<u8>)>;
 		type Currency: Currency<Self::AccountId>;
+		type EvmBackwardsAddressMapping: EvmBackwardsAddressMapping<Self::AccountId>;
 	}
 
 	#[pallet::pallet]
modifiedpallets/nft/Cargo.tomldiffbeforeafterboth
--- a/pallets/nft/Cargo.toml
+++ b/pallets/nft/Cargo.toml
@@ -34,6 +34,7 @@
     'fp-evm/std',
     'nft-data-structs/std',
     'up-sponsorship/std',
+    'up-evm-mapping/std',
     'sp-std/std',
     'sp-api/std',
     'sp-runtime/std',
@@ -135,7 +136,7 @@
 sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.12" }
 
 up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" } 
-
+up-evm-mapping = { default-features = false, path = "../../primitives/evm-mapping" }
 evm-coder = { default-features = false, path = "../../crates/evm-coder" }
 pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
 primitive-types = { version = "0.10.1", default-features = false, features = [
addedprimitives/evm-mapping/Cargo.tomldiffbeforeafterboth
--- /dev/null
+++ b/primitives/evm-mapping/Cargo.toml
@@ -0,0 +1,15 @@
+[package]
+name = "up-evm-mapping"
+version = "0.1.0"
+edition = "2018"
+
+[dependencies]
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
+
+[features]
+default = ["std"]
+std = [
+	"sp-core/std",
+	"frame-support/std",
+]
addedprimitives/evm-mapping/src/lib.rsdiffbeforeafterboth
--- /dev/null
+++ b/primitives/evm-mapping/src/lib.rs
@@ -0,0 +1,23 @@
+#![cfg_attr(not(feature = "std"), no_std)]
+
+use frame_support::sp_runtime::AccountId32;
+use sp_core::H160;
+
+/// Transforms substrate addresses to ethereum (Reverse of `EvmAddressMapping`)
+/// pallet_evm doesn't have this, as it only checks if eth address 
+/// is owned by substrate via `EnsureAddressOrigin` trait
+/// 
+/// This trait implementations shouldn't conflict with used `EnsureAddressOrigin`
+pub trait EvmBackwardsAddressMapping<AccountId> {
+	fn from_account_id(account_id: AccountId) -> H160;
+}
+
+/// Should have same mapping as EnsureAddressTruncated
+pub struct MapBackwardsAddressTruncated;
+impl EvmBackwardsAddressMapping<AccountId32> for MapBackwardsAddressTruncated {
+	fn from_account_id(account_id: AccountId32) -> H160 {
+		let mut out = [0; 20];
+		out.copy_from_slice(&(account_id.as_ref() as &[u8])[0..20]);
+		H160(out)
+	}
+}
modifiedruntime/Cargo.tomldiffbeforeafterboth
before · runtime/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Substrate node nft'8edition = '2018'9homepage = 'https://unique.network'10license = 'All Rights Reserved'11name = 'nft-runtime'12repository = 'https://github.com/usetech-llc/nft_private/'13version = '0.9.12'1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std']20runtime-benchmarks = [21    'hex-literal',22    'frame-benchmarking',23    'frame-support/runtime-benchmarks',24    'frame-system-benchmarking',25    'frame-system/runtime-benchmarks',26    'pallet-evm-migration/runtime-benchmarks',27    'pallet-balances/runtime-benchmarks',28    'pallet-timestamp/runtime-benchmarks',29    'pallet-common/runtime-benchmarks',30    'pallet-fungible/runtime-benchmarks',31    'pallet-refungible/runtime-benchmarks',32    'pallet-nonfungible/runtime-benchmarks',33    'pallet-nft/runtime-benchmarks',34    'pallet-inflation/runtime-benchmarks',35    'pallet-xcm/runtime-benchmarks',36    'sp-runtime/runtime-benchmarks',37    'xcm-builder/runtime-benchmarks',38]39std = [40    'codec/std',41    'cumulus-pallet-aura-ext/std',42    'cumulus-pallet-parachain-system/std',43    'cumulus-pallet-xcm/std',44    'cumulus-pallet-xcmp-queue/std',45    'cumulus-primitives-core/std',46    'cumulus-primitives-utility/std',47    'frame-executive/std',48    'frame-support/std',49    'frame-system/std',50    'frame-system-rpc-runtime-api/std',51    'pallet-aura/std',52    'pallet-balances/std',53    # 'pallet-contracts/std',54    # 'pallet-contracts-primitives/std',55    # 'pallet-contracts-rpc-runtime-api/std',56    # 'pallet-contract-helpers/std',57    'pallet-randomness-collective-flip/std',58    'pallet-sudo/std',59    'pallet-timestamp/std',60    'pallet-transaction-payment/std',61    'pallet-transaction-payment-rpc-runtime-api/std',62    'pallet-treasury/std',63    # 'pallet-vesting/std',64    'pallet-evm/std',65    'pallet-evm-migration/std',66    'pallet-evm-contract-helpers/std',67    'pallet-evm-transaction-payment/std',68    'pallet-evm-coder-substrate/std',69    'pallet-ethereum/std',70    'fp-rpc/std',71    'up-rpc/std',72    'fp-self-contained/std',73    'parachain-info/std',74    'serde',75    'pallet-inflation/std',76    'pallet-common/std',77    'pallet-fungible/std',78    'pallet-refungible/std',79    'pallet-nonfungible/std',80    'pallet-nft/std',81    'pallet-unq-scheduler/std',82    'pallet-nft-charge-transaction/std',83    'nft-data-structs/std',84    'sp-api/std',85    'sp-block-builder/std',86    "sp-consensus-aura/std",87    'sp-core/std',88    'sp-inherents/std',89    'sp-io/std',90    'sp-offchain/std',91    'sp-runtime/std',92    'sp-session/std',93    'sp-std/std',94    'sp-transaction-pool/std',95    'sp-version/std',96    'xcm/std',97    'xcm-builder/std',98    'xcm-executor/std',99100    "orml-vesting/std",101]102limit-testing = ['pallet-nft/limit-testing', 'nft-data-structs/limit-testing']103104################################################################################105# Substrate Dependencies106107[dependencies.codec]108default-features = false109features = ['derive']110package = 'parity-scale-codec'111version = '2.3.0'112113[dependencies.frame-benchmarking]114default-features = false115git = 'https://github.com/paritytech/substrate.git'116optional = true117branch = 'polkadot-v0.9.12'118119[dependencies.frame-executive]120default-features = false121git = 'https://github.com/paritytech/substrate.git'122branch = 'polkadot-v0.9.12'123124[dependencies.frame-support]125default-features = false126git = 'https://github.com/paritytech/substrate.git'127branch = 'polkadot-v0.9.12'128129[dependencies.frame-system]130default-features = false131git = 'https://github.com/paritytech/substrate.git'132branch = 'polkadot-v0.9.12'133134[dependencies.frame-system-benchmarking]135default-features = false136git = 'https://github.com/paritytech/substrate.git'137optional = true138branch = 'polkadot-v0.9.12'139140[dependencies.frame-system-rpc-runtime-api]141default-features = false142git = 'https://github.com/paritytech/substrate.git'143branch = 'polkadot-v0.9.12'144145[dependencies.hex-literal]146optional = true147version = '0.3.3'148149[dependencies.serde]150default-features = false151features = ['derive']152optional = true153version = '1.0.130'154155[dependencies.pallet-aura]156default-features = false157git = 'https://github.com/paritytech/substrate.git'158branch = 'polkadot-v0.9.12'159160[dependencies.pallet-balances]161default-features = false162git = 'https://github.com/paritytech/substrate.git'163branch = 'polkadot-v0.9.12'164165# Contracts specific packages166# [dependencies.pallet-contracts]167# git = 'https://github.com/paritytech/substrate.git'168# default-features = false169# branch = 'polkadot-v0.9.12'170# version = '4.0.0-dev'171172# [dependencies.pallet-contracts-primitives]173# git = 'https://github.com/paritytech/substrate.git'174# default-features = false175# branch = 'polkadot-v0.9.12'176# version = '4.0.0-dev'177178# [dependencies.pallet-contracts-rpc-runtime-api]179# git = 'https://github.com/paritytech/substrate.git'180# default-features = false181# branch = 'polkadot-v0.9.12'182# version = '4.0.0-dev'183184[dependencies.pallet-randomness-collective-flip]185default-features = false186git = 'https://github.com/paritytech/substrate.git'187branch = 'polkadot-v0.9.12'188189[dependencies.pallet-sudo]190default-features = false191git = 'https://github.com/paritytech/substrate.git'192branch = 'polkadot-v0.9.12'193194[dependencies.pallet-timestamp]195default-features = false196git = 'https://github.com/paritytech/substrate.git'197branch = 'polkadot-v0.9.12'198199[dependencies.pallet-transaction-payment]200default-features = false201git = 'https://github.com/paritytech/substrate.git'202branch = 'polkadot-v0.9.12'203204[dependencies.pallet-transaction-payment-rpc-runtime-api]205default-features = false206git = 'https://github.com/paritytech/substrate.git'207branch = 'polkadot-v0.9.12'208209[dependencies.pallet-treasury]210default-features = false211git = 'https://github.com/paritytech/substrate.git'212branch = 'polkadot-v0.9.12'213214# [dependencies.pallet-vesting]215# default-features = false216# git = 'https://github.com/paritytech/substrate.git'217# branch = 'polkadot-v0.9.12'218219[dependencies.sp-arithmetic]220default-features = false221git = 'https://github.com/paritytech/substrate.git'222branch = 'polkadot-v0.9.12'223224[dependencies.sp-api]225default-features = false226git = 'https://github.com/paritytech/substrate.git'227branch = 'polkadot-v0.9.12'228229[dependencies.sp-block-builder]230default-features = false231git = 'https://github.com/paritytech/substrate.git'232branch = 'polkadot-v0.9.12'233234[dependencies.sp-core]235default-features = false236git = 'https://github.com/paritytech/substrate.git'237branch = 'polkadot-v0.9.12'238239[dependencies.sp-consensus-aura]240default-features = false241git = 'https://github.com/paritytech/substrate.git'242branch = 'polkadot-v0.9.12'243244[dependencies.sp-inherents]245default-features = false246git = 'https://github.com/paritytech/substrate.git'247branch = 'polkadot-v0.9.12'248249[dependencies.sp-io]250default-features = false251git = 'https://github.com/paritytech/substrate.git'252branch = 'polkadot-v0.9.12'253254[dependencies.sp-offchain]255default-features = false256git = 'https://github.com/paritytech/substrate.git'257branch = 'polkadot-v0.9.12'258259[dependencies.sp-runtime]260default-features = false261git = 'https://github.com/paritytech/substrate.git'262branch = 'polkadot-v0.9.12'263264[dependencies.sp-session]265default-features = false266git = 'https://github.com/paritytech/substrate.git'267branch = 'polkadot-v0.9.12'268269[dependencies.sp-std]270default-features = false271git = 'https://github.com/paritytech/substrate.git'272branch = 'polkadot-v0.9.12'273274[dependencies.sp-transaction-pool]275default-features = false276git = 'https://github.com/paritytech/substrate.git'277branch = 'polkadot-v0.9.12'278279[dependencies.sp-version]280default-features = false281git = 'https://github.com/paritytech/substrate.git'282branch = 'polkadot-v0.9.12'283284[dependencies.smallvec]285version = '1.6.1'286287################################################################################288# Cumulus dependencies289290[dependencies.parachain-info]291default-features = false292git = 'https://github.com/paritytech/cumulus.git'293branch = 'polkadot-v0.9.12'294295[dependencies.cumulus-pallet-aura-ext]296git = 'https://github.com/paritytech/cumulus.git'297branch = 'polkadot-v0.9.12'298default-features = false299300[dependencies.cumulus-pallet-parachain-system]301git = 'https://github.com/paritytech/cumulus.git'302branch = 'polkadot-v0.9.12'303default-features = false304305[dependencies.cumulus-primitives-core]306git = 'https://github.com/paritytech/cumulus.git'307branch = 'polkadot-v0.9.12'308default-features = false309310[dependencies.cumulus-pallet-xcm]311git = 'https://github.com/paritytech/cumulus.git'312branch = 'polkadot-v0.9.12'313default-features = false314315[dependencies.cumulus-pallet-dmp-queue]316git = 'https://github.com/paritytech/cumulus.git'317branch = 'polkadot-v0.9.12'318default-features = false319320[dependencies.cumulus-pallet-xcmp-queue]321git = 'https://github.com/paritytech/cumulus.git'322branch = 'polkadot-v0.9.12'323default-features = false324325[dependencies.cumulus-primitives-utility]326git = 'https://github.com/paritytech/cumulus.git'327branch = 'polkadot-v0.9.12'328default-features = false329330[dependencies.cumulus-primitives-timestamp]331git = 'https://github.com/paritytech/cumulus.git'332branch = 'polkadot-v0.9.12'333default-features = false334335################################################################################336# Polkadot dependencies337338[dependencies.polkadot-parachain]339git = 'https://github.com/paritytech/polkadot'340branch = 'release-v0.9.12'341default-features = false342343[dependencies.xcm]344git = 'https://github.com/paritytech/polkadot'345branch = 'release-v0.9.12'346default-features = false347348[dependencies.xcm-builder]349git = 'https://github.com/paritytech/polkadot'350branch = 'release-v0.9.12'351default-features = false352353[dependencies.xcm-executor]354git = 'https://github.com/paritytech/polkadot'355branch = 'release-v0.9.12'356default-features = false357358[dependencies.pallet-xcm]359git = 'https://github.com/paritytech/polkadot'360branch = 'release-v0.9.12'361default-features = false362363[dependencies.orml-vesting]364git = "https://github.com/open-web3-stack/open-runtime-module-library"365version = "0.4.1-dev" 366default-features = false367368################################################################################369# local dependencies370371[dependencies]372scale-info = { version = "1.0.0", default-features = false, features = [373    "derive",374] }375derivative = "2.2.0"376pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }377up-rpc = { path = "../primitives/rpc", default-features = false }378pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }379nft-data-structs = { path = '../primitives/nft', default-features = false, version = '0.9.0' }380pallet-common = { default-features = false, path = "../pallets/common" }381pallet-fungible = { default-features = false, path = "../pallets/fungible" }382pallet-refungible = { default-features = false, path = "../pallets/refungible" }383pallet-nonfungible = { default-features = false, path = "../pallets/nonfungible" }384pallet-unq-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }385# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }386pallet-nft-charge-transaction = { git = "https://github.com/UniqueNetwork/pallet-sponsoring", package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }387pallet-evm-migration = { path = '../pallets/evm-migration', default-features = false }388pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }389pallet-evm-transaction-payment = { path = '../pallets/evm-transaction-payment', default-features = false }390pallet-evm-coder-substrate = { default-features = false, path = "../pallets/evm-coder-substrate" }391392pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }393pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }394fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }395fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }396397################################################################################398# Build Dependencies399400[build-dependencies.substrate-wasm-builder]401git = 'https://github.com/paritytech/substrate.git'402branch = 'polkadot-v0.9.12'
after · runtime/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Substrate node nft'8edition = '2018'9homepage = 'https://unique.network'10license = 'All Rights Reserved'11name = 'nft-runtime'12repository = 'https://github.com/usetech-llc/nft_private/'13version = '0.9.12'1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std']20runtime-benchmarks = [21    'hex-literal',22    'frame-benchmarking',23    'frame-support/runtime-benchmarks',24    'frame-system-benchmarking',25    'frame-system/runtime-benchmarks',26    'pallet-evm-migration/runtime-benchmarks',27    'pallet-balances/runtime-benchmarks',28    'pallet-timestamp/runtime-benchmarks',29    'pallet-common/runtime-benchmarks',30    'pallet-fungible/runtime-benchmarks',31    'pallet-refungible/runtime-benchmarks',32    'pallet-nonfungible/runtime-benchmarks',33    'pallet-nft/runtime-benchmarks',34    'pallet-inflation/runtime-benchmarks',35    'pallet-xcm/runtime-benchmarks',36    'sp-runtime/runtime-benchmarks',37    'xcm-builder/runtime-benchmarks',38]39std = [40    'codec/std',41    'cumulus-pallet-aura-ext/std',42    'cumulus-pallet-parachain-system/std',43    'cumulus-pallet-xcm/std',44    'cumulus-pallet-xcmp-queue/std',45    'cumulus-primitives-core/std',46    'cumulus-primitives-utility/std',47    'frame-executive/std',48    'frame-support/std',49    'frame-system/std',50    'frame-system-rpc-runtime-api/std',51    'pallet-aura/std',52    'pallet-balances/std',53    # 'pallet-contracts/std',54    # 'pallet-contracts-primitives/std',55    # 'pallet-contracts-rpc-runtime-api/std',56    # 'pallet-contract-helpers/std',57    'pallet-randomness-collective-flip/std',58    'pallet-sudo/std',59    'pallet-timestamp/std',60    'pallet-transaction-payment/std',61    'pallet-transaction-payment-rpc-runtime-api/std',62    'pallet-treasury/std',63    # 'pallet-vesting/std',64    'pallet-evm/std',65    'pallet-evm-migration/std',66    'pallet-evm-contract-helpers/std',67    'pallet-evm-transaction-payment/std',68    'pallet-evm-coder-substrate/std',69    'pallet-ethereum/std',70    'fp-rpc/std',71    'up-rpc/std',72    'up-evm-mapping/std',73    'fp-self-contained/std',74    'parachain-info/std',75    'serde',76    'pallet-inflation/std',77    'pallet-common/std',78    'pallet-fungible/std',79    'pallet-refungible/std',80    'pallet-nonfungible/std',81    'pallet-nft/std',82    'pallet-unq-scheduler/std',83    'pallet-nft-charge-transaction/std',84    'nft-data-structs/std',85    'sp-api/std',86    'sp-block-builder/std',87    "sp-consensus-aura/std",88    'sp-core/std',89    'sp-inherents/std',90    'sp-io/std',91    'sp-offchain/std',92    'sp-runtime/std',93    'sp-session/std',94    'sp-std/std',95    'sp-transaction-pool/std',96    'sp-version/std',97    'xcm/std',98    'xcm-builder/std',99    'xcm-executor/std',100101    "orml-vesting/std",102]103limit-testing = ['pallet-nft/limit-testing', 'nft-data-structs/limit-testing']104105################################################################################106# Substrate Dependencies107108[dependencies.codec]109default-features = false110features = ['derive']111package = 'parity-scale-codec'112version = '2.3.0'113114[dependencies.frame-benchmarking]115default-features = false116git = 'https://github.com/paritytech/substrate.git'117optional = true118branch = 'polkadot-v0.9.12'119120[dependencies.frame-executive]121default-features = false122git = 'https://github.com/paritytech/substrate.git'123branch = 'polkadot-v0.9.12'124125[dependencies.frame-support]126default-features = false127git = 'https://github.com/paritytech/substrate.git'128branch = 'polkadot-v0.9.12'129130[dependencies.frame-system]131default-features = false132git = 'https://github.com/paritytech/substrate.git'133branch = 'polkadot-v0.9.12'134135[dependencies.frame-system-benchmarking]136default-features = false137git = 'https://github.com/paritytech/substrate.git'138optional = true139branch = 'polkadot-v0.9.12'140141[dependencies.frame-system-rpc-runtime-api]142default-features = false143git = 'https://github.com/paritytech/substrate.git'144branch = 'polkadot-v0.9.12'145146[dependencies.hex-literal]147optional = true148version = '0.3.3'149150[dependencies.serde]151default-features = false152features = ['derive']153optional = true154version = '1.0.130'155156[dependencies.pallet-aura]157default-features = false158git = 'https://github.com/paritytech/substrate.git'159branch = 'polkadot-v0.9.12'160161[dependencies.pallet-balances]162default-features = false163git = 'https://github.com/paritytech/substrate.git'164branch = 'polkadot-v0.9.12'165166# Contracts specific packages167# [dependencies.pallet-contracts]168# git = 'https://github.com/paritytech/substrate.git'169# default-features = false170# branch = 'polkadot-v0.9.12'171# version = '4.0.0-dev'172173# [dependencies.pallet-contracts-primitives]174# git = 'https://github.com/paritytech/substrate.git'175# default-features = false176# branch = 'polkadot-v0.9.12'177# version = '4.0.0-dev'178179# [dependencies.pallet-contracts-rpc-runtime-api]180# git = 'https://github.com/paritytech/substrate.git'181# default-features = false182# branch = 'polkadot-v0.9.12'183# version = '4.0.0-dev'184185[dependencies.pallet-randomness-collective-flip]186default-features = false187git = 'https://github.com/paritytech/substrate.git'188branch = 'polkadot-v0.9.12'189190[dependencies.pallet-sudo]191default-features = false192git = 'https://github.com/paritytech/substrate.git'193branch = 'polkadot-v0.9.12'194195[dependencies.pallet-timestamp]196default-features = false197git = 'https://github.com/paritytech/substrate.git'198branch = 'polkadot-v0.9.12'199200[dependencies.pallet-transaction-payment]201default-features = false202git = 'https://github.com/paritytech/substrate.git'203branch = 'polkadot-v0.9.12'204205[dependencies.pallet-transaction-payment-rpc-runtime-api]206default-features = false207git = 'https://github.com/paritytech/substrate.git'208branch = 'polkadot-v0.9.12'209210[dependencies.pallet-treasury]211default-features = false212git = 'https://github.com/paritytech/substrate.git'213branch = 'polkadot-v0.9.12'214215# [dependencies.pallet-vesting]216# default-features = false217# git = 'https://github.com/paritytech/substrate.git'218# branch = 'polkadot-v0.9.12'219220[dependencies.sp-arithmetic]221default-features = false222git = 'https://github.com/paritytech/substrate.git'223branch = 'polkadot-v0.9.12'224225[dependencies.sp-api]226default-features = false227git = 'https://github.com/paritytech/substrate.git'228branch = 'polkadot-v0.9.12'229230[dependencies.sp-block-builder]231default-features = false232git = 'https://github.com/paritytech/substrate.git'233branch = 'polkadot-v0.9.12'234235[dependencies.sp-core]236default-features = false237git = 'https://github.com/paritytech/substrate.git'238branch = 'polkadot-v0.9.12'239240[dependencies.sp-consensus-aura]241default-features = false242git = 'https://github.com/paritytech/substrate.git'243branch = 'polkadot-v0.9.12'244245[dependencies.sp-inherents]246default-features = false247git = 'https://github.com/paritytech/substrate.git'248branch = 'polkadot-v0.9.12'249250[dependencies.sp-io]251default-features = false252git = 'https://github.com/paritytech/substrate.git'253branch = 'polkadot-v0.9.12'254255[dependencies.sp-offchain]256default-features = false257git = 'https://github.com/paritytech/substrate.git'258branch = 'polkadot-v0.9.12'259260[dependencies.sp-runtime]261default-features = false262git = 'https://github.com/paritytech/substrate.git'263branch = 'polkadot-v0.9.12'264265[dependencies.sp-session]266default-features = false267git = 'https://github.com/paritytech/substrate.git'268branch = 'polkadot-v0.9.12'269270[dependencies.sp-std]271default-features = false272git = 'https://github.com/paritytech/substrate.git'273branch = 'polkadot-v0.9.12'274275[dependencies.sp-transaction-pool]276default-features = false277git = 'https://github.com/paritytech/substrate.git'278branch = 'polkadot-v0.9.12'279280[dependencies.sp-version]281default-features = false282git = 'https://github.com/paritytech/substrate.git'283branch = 'polkadot-v0.9.12'284285[dependencies.smallvec]286version = '1.6.1'287288################################################################################289# Cumulus dependencies290291[dependencies.parachain-info]292default-features = false293git = 'https://github.com/paritytech/cumulus.git'294branch = 'polkadot-v0.9.12'295296[dependencies.cumulus-pallet-aura-ext]297git = 'https://github.com/paritytech/cumulus.git'298branch = 'polkadot-v0.9.12'299default-features = false300301[dependencies.cumulus-pallet-parachain-system]302git = 'https://github.com/paritytech/cumulus.git'303branch = 'polkadot-v0.9.12'304default-features = false305306[dependencies.cumulus-primitives-core]307git = 'https://github.com/paritytech/cumulus.git'308branch = 'polkadot-v0.9.12'309default-features = false310311[dependencies.cumulus-pallet-xcm]312git = 'https://github.com/paritytech/cumulus.git'313branch = 'polkadot-v0.9.12'314default-features = false315316[dependencies.cumulus-pallet-dmp-queue]317git = 'https://github.com/paritytech/cumulus.git'318branch = 'polkadot-v0.9.12'319default-features = false320321[dependencies.cumulus-pallet-xcmp-queue]322git = 'https://github.com/paritytech/cumulus.git'323branch = 'polkadot-v0.9.12'324default-features = false325326[dependencies.cumulus-primitives-utility]327git = 'https://github.com/paritytech/cumulus.git'328branch = 'polkadot-v0.9.12'329default-features = false330331[dependencies.cumulus-primitives-timestamp]332git = 'https://github.com/paritytech/cumulus.git'333branch = 'polkadot-v0.9.12'334default-features = false335336################################################################################337# Polkadot dependencies338339[dependencies.polkadot-parachain]340git = 'https://github.com/paritytech/polkadot'341branch = 'release-v0.9.12'342default-features = false343344[dependencies.xcm]345git = 'https://github.com/paritytech/polkadot'346branch = 'release-v0.9.12'347default-features = false348349[dependencies.xcm-builder]350git = 'https://github.com/paritytech/polkadot'351branch = 'release-v0.9.12'352default-features = false353354[dependencies.xcm-executor]355git = 'https://github.com/paritytech/polkadot'356branch = 'release-v0.9.12'357default-features = false358359[dependencies.pallet-xcm]360git = 'https://github.com/paritytech/polkadot'361branch = 'release-v0.9.12'362default-features = false363364[dependencies.orml-vesting]365git = "https://github.com/open-web3-stack/open-runtime-module-library"366version = "0.4.1-dev"367default-features = false368369################################################################################370# local dependencies371372[dependencies]373scale-info = { version = "1.0.0", default-features = false, features = [374    "derive",375] }376derivative = "2.2.0"377pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }378up-rpc = { path = "../primitives/rpc", default-features = false }379up-evm-mapping = { path = "../primitives/evm-mapping", default-features = false }380pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }381nft-data-structs = { path = '../primitives/nft', default-features = false, version = '0.9.0' }382pallet-common = { default-features = false, path = "../pallets/common" }383pallet-fungible = { default-features = false, path = "../pallets/fungible" }384pallet-refungible = { default-features = false, path = "../pallets/refungible" }385pallet-nonfungible = { default-features = false, path = "../pallets/nonfungible" }386pallet-unq-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }387# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }388pallet-nft-charge-transaction = { git = "https://github.com/UniqueNetwork/pallet-sponsoring", package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }389pallet-evm-migration = { path = '../pallets/evm-migration', default-features = false }390pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }391pallet-evm-transaction-payment = { path = '../pallets/evm-transaction-payment', default-features = false }392pallet-evm-coder-substrate = { default-features = false, path = "../pallets/evm-coder-substrate" }393394pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }395pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }396fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }397fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }398399################################################################################400# Build Dependencies401402[build-dependencies.substrate-wasm-builder]403git = 'https://github.com/paritytech/substrate.git'404branch = 'polkadot-v0.9.12'
modifiedruntime/src/lib.rsdiffbeforeafterboth
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -736,7 +736,7 @@
 
 impl pallet_common::Config for Runtime {
 	type Event = Event;
-	type EvmBackwardsAddressMapping = pallet_common::account::MapBackwardsAddressTruncated;
+	type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;
 	type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;
 	type CrossAccountId = pallet_common::account::BasicCrossAccountId<Self>;
 
@@ -811,6 +811,7 @@
 		pallet_evm_contract_helpers::HelpersContractSponsoring<Self>,
 	);
 	type Currency = Balances;
+	type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;
 }
 
 impl pallet_nft_charge_transaction::Config for Runtime {