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

difftreelog

CORE-300 Fix PR

Trubnikov Sergey2022-03-24parent: #77bb9d1.patch.diff
in: master

12 files changed

modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2751,6 +2751,15 @@
 ]
 
 [[package]]
+name = "fp-evm-mapping"
+version = "0.1.0"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=feature/300#8718bfde84a370f5a6e7642b216dd913ca33db5c"
+dependencies = [
+ "frame-support",
+ "sp-core",
+]
+
+[[package]]
 name = "fp-rpc"
 version = "3.0.0-dev"
 source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18#7c8ce8f83e0c8a5b57655622b721f8655b161903"
@@ -5576,6 +5585,7 @@
  "cumulus-primitives-timestamp",
  "cumulus-primitives-utility",
  "derivative",
+ "fp-evm-mapping",
  "fp-rpc",
  "fp-self-contained",
  "frame-benchmarking",
@@ -5632,7 +5642,6 @@
  "substrate-wasm-builder",
  "unique-runtime-common",
  "up-data-structs",
- "up-evm-mapping",
  "up-rpc",
  "xcm",
  "xcm-builder",
@@ -5984,6 +5993,7 @@
 version = "0.1.0"
 dependencies = [
  "evm-coder",
+ "fp-evm-mapping",
  "frame-support",
  "frame-system",
  "pallet-evm",
@@ -5995,7 +6005,6 @@
  "sp-runtime",
  "sp-std",
  "up-data-structs",
- "up-evm-mapping",
 ]
 
 [[package]]
@@ -6136,6 +6145,7 @@
 version = "0.1.0"
 dependencies = [
  "evm-coder",
+ "fp-evm-mapping",
  "frame-support",
  "frame-system",
  "log",
@@ -6146,7 +6156,6 @@
  "sp-core",
  "sp-runtime",
  "sp-std",
- "up-evm-mapping",
  "up-sponsorship",
 ]
 
@@ -6182,7 +6191,6 @@
  "sp-io",
  "sp-runtime",
  "sp-std",
- "up-evm-mapping",
  "up-sponsorship",
 ]
 
@@ -6825,7 +6833,6 @@
  "sp-runtime",
  "sp-std",
  "up-data-structs",
- "up-evm-mapping",
  "up-sponsorship",
 ]
 
@@ -8708,6 +8715,7 @@
  "cumulus-primitives-timestamp",
  "cumulus-primitives-utility",
  "derivative",
+ "fp-evm-mapping",
  "fp-rpc",
  "fp-self-contained",
  "frame-benchmarking",
@@ -8764,7 +8772,6 @@
  "substrate-wasm-builder",
  "unique-runtime-common",
  "up-data-structs",
- "up-evm-mapping",
  "up-rpc",
  "xcm",
  "xcm-builder",
@@ -12550,6 +12557,7 @@
  "cumulus-primitives-timestamp",
  "cumulus-primitives-utility",
  "derivative",
+ "fp-evm-mapping",
  "fp-rpc",
  "fp-self-contained",
  "frame-benchmarking",
@@ -12606,7 +12614,6 @@
  "substrate-wasm-builder",
  "unique-runtime-common",
  "up-data-structs",
- "up-evm-mapping",
  "up-rpc",
  "xcm",
  "xcm-builder",
@@ -12687,15 +12694,6 @@
  "sp-core",
  "sp-runtime",
  "sp-std",
-]
-
-[[package]]
-name = "up-evm-mapping"
-version = "0.1.0"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=feature/300#0a1dc4086cbe971ddf57edf82a61cfce52c8c20b"
-dependencies = [
- "frame-support",
- "sp-core",
 ]
 
 [[package]]
modifiedpallets/common/Cargo.tomldiffbeforeafterboth
--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -16,12 +16,12 @@
 sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
 sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
 sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }
 up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
 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.18" }
 frame-common = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }
-up-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }
 serde = { version = "1.0.130", default-features = false }
 scale-info = { version = "2.0.1", default-features = false, features = [
     "derive",
@@ -34,7 +34,7 @@
     "frame-system/std",
     "sp-runtime/std",
     "sp-std/std",
-    "up-evm-mapping/std",
+    "fp-evm-mapping/std",
     "up-data-structs/std",
     "pallet-evm/std",
 ]
modifiedpallets/evm-contract-helpers/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-contract-helpers/Cargo.toml
+++ b/pallets/evm-contract-helpers/Cargo.toml
@@ -17,7 +17,7 @@
 pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
 pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }
 up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }
-up-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }
 log = "0.4.14"
 
 [dependencies.codec]
modifiedpallets/evm-transaction-payment/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-transaction-payment/Cargo.toml
+++ b/pallets/evm-transaction-payment/Cargo.toml
@@ -18,7 +18,7 @@
 fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }
 pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }
 up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }
-up-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }
 
 [dependencies.codec]
 default-features = false
@@ -39,5 +39,5 @@
     "pallet-ethereum/std",
     "fp-evm/std",
     "up-sponsorship/std",
-    "up-evm-mapping/std",
+    "fp-evm-mapping/std",
 ]
modifiedpallets/unique/Cargo.tomldiffbeforeafterboth
before · pallets/unique/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6description = 'Unique Pallet'7edition = '2018'8homepage = 'https://unique.network'9license = 'GPLv3'10name = 'pallet-unique'11repository = 'https://github.com/UniqueNetwork/unique-chain'12version = '0.1.0'1314[package.metadata.docs.rs]15targets = ['x86_64-unknown-linux-gnu']1617[features]18default = ['std']19runtime-benchmarks = ['frame-benchmarking', 'pallet-common/runtime-benchmarks']20std = [21    'codec/std',22    'serde/std',23    'frame-support/std',24    'frame-system/std',25    'pallet-balances/std',26    'pallet-evm/std',27    'pallet-timestamp/std',28    'pallet-randomness-collective-flip/std',29    'pallet-transaction-payment/std',30    'pallet-common/std',31    'pallet-fungible/std',32    'pallet-nonfungible/std',33    'pallet-refungible/std',34    'fp-evm/std',35    'up-data-structs/std',36    'up-sponsorship/std',37    'up-evm-mapping/std',38    'sp-std/std',39    'sp-api/std',40    'sp-runtime/std',41    'frame-benchmarking/std',42    'ethereum/std',43    'rlp/std',4445    'primitive-types/std',46    'evm-coder/std',47    'pallet-evm-coder-substrate/std',48]49limit-testing = ["up-data-structs/limit-testing"]5051################################################################################52# Substrate Dependencies5354[dependencies.codec]55default-features = false56features = ['derive']57package = 'parity-scale-codec'58version = '3.1.2'5960[dependencies.frame-benchmarking]61default-features = false62optional = true63git = 'https://github.com/paritytech/substrate.git'64branch = 'polkadot-v0.9.18'6566[dependencies.frame-support]67default-features = false68git = 'https://github.com/paritytech/substrate.git'69branch = 'polkadot-v0.9.18'7071[dependencies.frame-system]72default-features = false73git = 'https://github.com/paritytech/substrate.git'74branch = 'polkadot-v0.9.18'7576[dependencies.pallet-balances]77default-features = false78git = 'https://github.com/paritytech/substrate.git'79branch = 'polkadot-v0.9.18'8081[dependencies.pallet-timestamp]82default-features = false83git = 'https://github.com/paritytech/substrate.git'84branch = 'polkadot-v0.9.18'8586[dependencies.pallet-randomness-collective-flip]87default-features = false88git = 'https://github.com/paritytech/substrate.git'89branch = 'polkadot-v0.9.18'9091[dependencies.sp-std]92default-features = false93git = 'https://github.com/paritytech/substrate.git'94branch = 'polkadot-v0.9.18'9596[dependencies.pallet-transaction-payment]97default-features = false98git = 'https://github.com/paritytech/substrate.git'99branch = 'polkadot-v0.9.18'100101[dependencies.serde]102default-features = false103features = ['derive']104version = '1.0.130'105106[dependencies.sp-runtime]107default-features = false108git = 'https://github.com/paritytech/substrate.git'109branch = 'polkadot-v0.9.18'110111[dependencies.sp-core]112default-features = false113git = 'https://github.com/paritytech/substrate.git'114branch = 'polkadot-v0.9.18'115116[dependencies.sp-io]117default-features = false118git = 'https://github.com/paritytech/substrate.git'119branch = 'polkadot-v0.9.18'120121122################################################################################123# Local Dependencies124[dependencies]125up-data-structs = { default-features = false, path = "../../primitives/data-structs" }126127scale-info = { version = "2.0.1", default-features = false, features = [128    "derive",129] }130ethereum = { version = "0.12.0", default-features = false }131rlp = { default-features = false, version = "0.5.0" }132sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }133134up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }135up-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }136evm-coder = { default-features = false, path = "../../crates/evm-coder" }137pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }138primitive-types = { version = "0.11.1", default-features = false, features = [139    "serde_no_std",140] }141142pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }143pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }144fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }145hex-literal = "0.3.3"146147pallet-common = { default-features = false, path = "../common" }148pallet-fungible = { default-features = false, path = "../fungible" }149pallet-nonfungible = { default-features = false, path = "../nonfungible" }150pallet-refungible = { default-features = false, path = "../refungible" }
after · pallets/unique/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6description = 'Unique Pallet'7edition = '2018'8homepage = 'https://unique.network'9license = 'GPLv3'10name = 'pallet-unique'11repository = 'https://github.com/UniqueNetwork/unique-chain'12version = '0.1.0'1314[package.metadata.docs.rs]15targets = ['x86_64-unknown-linux-gnu']1617[features]18default = ['std']19runtime-benchmarks = ['frame-benchmarking', 'pallet-common/runtime-benchmarks']20std = [21    'codec/std',22    'serde/std',23    'frame-support/std',24    'frame-system/std',25    'pallet-balances/std',26    'pallet-evm/std',27    'pallet-timestamp/std',28    'pallet-randomness-collective-flip/std',29    'pallet-transaction-payment/std',30    'pallet-common/std',31    'pallet-fungible/std',32    'pallet-nonfungible/std',33    'pallet-refungible/std',34    'fp-evm/std',35    'up-data-structs/std',36    'up-sponsorship/std',37    'fp-evm-mapping/std',38    'sp-std/std',39    'sp-api/std',40    'sp-runtime/std',41    'frame-benchmarking/std',42    'ethereum/std',43    'rlp/std',4445    'primitive-types/std',46    'evm-coder/std',47    'pallet-evm-coder-substrate/std',48]49limit-testing = ["up-data-structs/limit-testing"]5051################################################################################52# Substrate Dependencies5354[dependencies.codec]55default-features = false56features = ['derive']57package = 'parity-scale-codec'58version = '3.1.2'5960[dependencies.frame-benchmarking]61default-features = false62optional = true63git = 'https://github.com/paritytech/substrate.git'64branch = 'polkadot-v0.9.18'6566[dependencies.frame-support]67default-features = false68git = 'https://github.com/paritytech/substrate.git'69branch = 'polkadot-v0.9.18'7071[dependencies.frame-system]72default-features = false73git = 'https://github.com/paritytech/substrate.git'74branch = 'polkadot-v0.9.18'7576[dependencies.pallet-balances]77default-features = false78git = 'https://github.com/paritytech/substrate.git'79branch = 'polkadot-v0.9.18'8081[dependencies.pallet-timestamp]82default-features = false83git = 'https://github.com/paritytech/substrate.git'84branch = 'polkadot-v0.9.18'8586[dependencies.pallet-randomness-collective-flip]87default-features = false88git = 'https://github.com/paritytech/substrate.git'89branch = 'polkadot-v0.9.18'9091[dependencies.sp-std]92default-features = false93git = 'https://github.com/paritytech/substrate.git'94branch = 'polkadot-v0.9.18'9596[dependencies.pallet-transaction-payment]97default-features = false98git = 'https://github.com/paritytech/substrate.git'99branch = 'polkadot-v0.9.18'100101[dependencies.serde]102default-features = false103features = ['derive']104version = '1.0.130'105106[dependencies.sp-runtime]107default-features = false108git = 'https://github.com/paritytech/substrate.git'109branch = 'polkadot-v0.9.18'110111[dependencies.sp-core]112default-features = false113git = 'https://github.com/paritytech/substrate.git'114branch = 'polkadot-v0.9.18'115116[dependencies.sp-io]117default-features = false118git = 'https://github.com/paritytech/substrate.git'119branch = 'polkadot-v0.9.18'120121122################################################################################123# Local Dependencies124[dependencies]125up-data-structs = { default-features = false, path = "../../primitives/data-structs" }126127scale-info = { version = "2.0.1", default-features = false, features = [128    "derive",129] }130ethereum = { version = "0.12.0", default-features = false }131rlp = { default-features = false, version = "0.5.0" }132sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }133134up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }135fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }136evm-coder = { default-features = false, path = "../../crates/evm-coder" }137pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }138primitive-types = { version = "0.11.1", default-features = false, features = [139    "serde_no_std",140] }141142pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }143pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }144fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }145hex-literal = "0.3.3"146147pallet-common = { default-features = false, path = "../common" }148pallet-fungible = { default-features = false, path = "../fungible" }149pallet-nonfungible = { default-features = false, path = "../nonfungible" }150pallet-refungible = { default-features = false, path = "../refungible" }
modifiedpallets/unique/src/mock.rsdiffbeforeafterboth
--- a/pallets/unique/src/mock.rs
+++ b/pallets/unique/src/mock.rs
@@ -26,7 +26,7 @@
 use pallet_transaction_payment::{CurrencyAdapter};
 use frame_system as system;
 use pallet_evm::{AddressMapping, runner::stack::MaybeMirroredLog};
-use up_evm_mapping::EvmBackwardsAddressMapping;
+use fp_evm_mapping::EvmBackwardsAddressMapping;
 use pallet_evm::account::CrossAccountId;
 use codec::{Encode, Decode, MaxEncodedLen};
 use scale_info::TypeInfo;
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -72,7 +72,7 @@
     'pallet-base-fee/std',
     'fp-rpc/std',
     'up-rpc/std',
-    'up-evm-mapping/std',
+    'fp-evm-mapping/std',
     'fp-self-contained/std',
     'parachain-info/std',
     'serde',
@@ -382,7 +382,7 @@
 derivative = "2.2.0"
 pallet-unique = { path = '../../pallets/unique', default-features = false }
 up-rpc = { path = "../../primitives/rpc", default-features = false }
-up-evm-mapping = { path = "../../primitives/evm-mapping", default-features = false }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }
 pallet-inflation = { path = '../../pallets/inflation', default-features = false }
 up-data-structs = { path = '../../primitives/data-structs', default-features = false }
 pallet-common = { default-features = false, path = "../../pallets/common" }
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -275,7 +275,7 @@
 impl pallet_evm::account::Config for Runtime {
 	type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Self>;
 	type EvmAddressMapping = pallet_evm::HashedAddressMapping<Self::Hashing>;
-	type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;
+	type EvmBackwardsAddressMapping = fp_evm_mapping::MapBackwardsAddressTruncated;
 }
 
 impl pallet_evm::Config for Runtime {
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -72,7 +72,7 @@
     'pallet-base-fee/std',
     'fp-rpc/std',
     'up-rpc/std',
-    'up-evm-mapping/std',
+    'fp-evm-mapping/std',
     'fp-self-contained/std',
     'parachain-info/std',
     'serde',
@@ -382,7 +382,7 @@
 derivative = "2.2.0"
 pallet-unique = { path = '../../pallets/unique', default-features = false }
 up-rpc = { path = "../../primitives/rpc", default-features = false }
-up-evm-mapping = { path = "../../primitives/evm-mapping", default-features = false }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }
 pallet-inflation = { path = '../../pallets/inflation', default-features = false }
 up-data-structs = { path = '../../primitives/data-structs', default-features = false }
 pallet-common = { default-features = false, path = "../../pallets/common" }
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -853,6 +853,12 @@
 	type TreasuryAccountId = TreasuryAccountId;
 }
 
+impl pallet_evm::account::Config for Runtime {
+	type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Self>;
+	type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;
+	type EvmBackwardsAddressMapping = fp_evm_mapping::MapBackwardsAddressTruncated;
+}
+
 impl pallet_fungible::Config for Runtime {
 	type WeightInfo = pallet_fungible::weights::SubstrateWeight<Self>;
 }
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -72,7 +72,7 @@
     'pallet-base-fee/std',
     'fp-rpc/std',
     'up-rpc/std',
-    'up-evm-mapping/std',
+    'fp-evm-mapping/std',
     'fp-self-contained/std',
     'parachain-info/std',
     'serde',
@@ -400,7 +400,7 @@
 pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }
 fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }
 fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18" }
-up-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }
 frame-common = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "feature/300" }
 
 ################################################################################
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -852,6 +852,12 @@
 	type TreasuryAccountId = TreasuryAccountId;
 }
 
+impl pallet_evm::account::Config for Runtime {
+	type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Self>;
+	type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;
+	type EvmBackwardsAddressMapping = fp_evm_mapping::MapBackwardsAddressTruncated;
+}
+
 impl pallet_fungible::Config for Runtime {
 	type WeightInfo = pallet_fungible::weights::SubstrateWeight<Self>;
 }