difftreelog
feat register pallet in runtimes
in: master
8 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5871,6 +5871,7 @@
"pallet-aura",
"pallet-authorship",
"pallet-balances",
+ "pallet-balances-adapter",
"pallet-base-fee",
"pallet-collator-selection",
"pallet-common",
@@ -6255,13 +6256,19 @@
name = "pallet-balances-adapter"
version = "0.1.0"
dependencies = [
+ "evm-coder",
"frame-support",
"frame-system",
"pallet-balances",
+ "pallet-common",
+ "pallet-evm",
+ "pallet-evm-coder-substrate",
+ "pallet-evm-transaction-payment",
"parity-scale-codec",
"scale-info",
"sp-core",
"sp-std",
+ "up-data-structs",
]
[[package]]
@@ -9364,6 +9371,7 @@
"pallet-aura",
"pallet-authorship",
"pallet-balances",
+ "pallet-balances-adapter",
"pallet-base-fee",
"pallet-collator-selection",
"pallet-common",
@@ -13781,6 +13789,7 @@
"pallet-aura",
"pallet-authorship",
"pallet-balances",
+ "pallet-balances-adapter",
"pallet-base-fee",
"pallet-collator-selection",
"pallet-common",
pallets/balances-adapter/Cargo.tomldiffbeforeafterboth--- a/pallets/balances-adapter/Cargo.toml
+++ b/pallets/balances-adapter/Cargo.toml
@@ -16,8 +16,28 @@
codec = { workspace = true, package = "parity-scale-codec" }
scale-info = { workspace = true }
+# Unique
+evm-coder = { workspace = true }
+pallet-evm = { workspace = true }
+
+#Local
+pallet-common = { workspace = true }
+pallet-evm-coder-substrate = { workspace = true }
+pallet-evm-transaction-payment = { workspace = true }
+up-data-structs = { workspace = true, features = ['serde1'] }
+
[features]
default = ["std"]
-std = ["frame-support/std", "frame-system/std", "pallet-balances/std", "sp-core/std", "sp-std/std"]
-# stubgen = ["evm-coder/stubgen", "pallet-common/stubgen"]
+std = [
+ "evm-coder/std",
+ "frame-support/std",
+ "frame-system/std",
+ "pallet-balances/std",
+ "pallet-common/std",
+ "pallet-evm-coder-substrate/std",
+ "pallet-evm/std",
+ "sp-core/std",
+ "sp-std/std",
+]
+stubgen = ["evm-coder/stubgen", "pallet-common/stubgen"]
try-runtime = ["frame-support/try-runtime"]
pallets/balances-adapter/src/lib.rsdiffbeforeafterboth--- a/pallets/balances-adapter/src/lib.rs
+++ b/pallets/balances-adapter/src/lib.rs
@@ -2,6 +2,8 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![warn(missing_docs)]
+pub use pallet::*;
+
#[frame_support::pallet]
pub mod pallet {
#[pallet::config]
runtime/common/config/pallets/mod.rsdiffbeforeafterboth--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -83,6 +83,9 @@
impl pallet_nonfungible::Config for Runtime {
type WeightInfo = pallet_nonfungible::weights::SubstrateWeight<Self>;
}
+impl pallet_balances_adapter::Config for Runtime {
+ // type WeightInfo = pallet_nonfungible::weights::SubstrateWeight<Self>;
+}
parameter_types! {
pub const InflationBlockInterval: BlockNumber = 100; // every time per how many blocks inflation is applied
runtime/common/construct_runtime.rsdiffbeforeafterboth--- a/runtime/common/construct_runtime.rs
+++ b/runtime/common/construct_runtime.rs
@@ -106,6 +106,8 @@
Maintenance: pallet_maintenance = 154,
+ BalancesAdapter: pallet_balances_adapter = 155,
+
#[cfg(feature = "pallet-test-utils")]
TestUtils: pallet_test_utils = 255,
}
runtime/opal/Cargo.tomldiffbeforeafterboth18[features]18[features]19default = ['opal-runtime', 'std']19default = ['opal-runtime', 'std']20limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']20limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']21opal-runtime = ['app-promotion', 'collator-selection', 'foreign-assets', 'preimage', 'pallet-test-utils', 'refungible']21opal-runtime = ['app-promotion', 'collator-selection', 'foreign-assets', 'pallet-test-utils', 'preimage', 'refungible']22pov-estimate = []22pov-estimate = []23runtime-benchmarks = [23runtime-benchmarks = [24 "pallet-preimage/runtime-benchmarks",24 'cumulus-pallet-parachain-system/runtime-benchmarks',25 'cumulus-pallet-parachain-system/runtime-benchmarks',25 'frame-benchmarking',26 'frame-benchmarking',26 'frame-support/runtime-benchmarks',27 'frame-support/runtime-benchmarks',41 'pallet-inflation/runtime-benchmarks',42 'pallet-inflation/runtime-benchmarks',42 'pallet-maintenance/runtime-benchmarks',43 'pallet-maintenance/runtime-benchmarks',43 'pallet-nonfungible/runtime-benchmarks',44 'pallet-nonfungible/runtime-benchmarks',44 "pallet-preimage/runtime-benchmarks",45 'pallet-refungible/runtime-benchmarks',45 'pallet-refungible/runtime-benchmarks',46 'pallet-structure/runtime-benchmarks',46 'pallet-structure/runtime-benchmarks',47 'pallet-timestamp/runtime-benchmarks',47 'pallet-timestamp/runtime-benchmarks',70 # 'pallet-contracts-primitives/std',70 # 'pallet-contracts-primitives/std',71 # 'pallet-contracts-rpc-runtime-api/std',71 # 'pallet-contracts-rpc-runtime-api/std',72 # 'pallet-contract-helpers/std',72 # 'pallet-contract-helpers/std',73 "pallet-authorship/std",73 "pallet-preimage/std",74 "pallet-preimage/std",74 "pallet-authorship/std",75 "pallet-session/std",75 "pallet-session/std",76 "sp-consensus-aura/std",76 "sp-consensus-aura/std",77 'app-promotion-rpc/std',77 'app-promotion-rpc/std',78 'evm-coder/std',78 'evm-coder/std',79 'fp-rpc/std',79 'fp-rpc/std',80 'fp-self-contained/std',80 'fp-self-contained/std',81 'pallet-app-promotion/std',81 'pallet-app-promotion/std',82 'pallet-balances-adapter/std',82 'pallet-base-fee/std',83 'pallet-base-fee/std',83 'pallet-charge-transaction/std',84 'pallet-charge-transaction/std',84 'pallet-collator-selection/std',85 'pallet-collator-selection/std',128 "orml-tokens/std",129 "orml-tokens/std",129 "orml-traits/std",130 "orml-traits/std",130 "orml-vesting/std",131 "orml-vesting/std",132 "orml-xcm-support/std",131 "orml-xtokens/std",133 "orml-xtokens/std",132 "orml-xcm-support/std",133 "pallet-foreign-assets/std",134 "pallet-foreign-assets/std",134135135 'pallet-maintenance/std',136 'pallet-maintenance/std',139 "pallet-authorship/try-runtime",140 "pallet-authorship/try-runtime",140 "pallet-collator-selection/try-runtime",141 "pallet-collator-selection/try-runtime",141 "pallet-identity/try-runtime",142 "pallet-identity/try-runtime",143 "pallet-preimage/try-runtime",142 "pallet-session/try-runtime",144 "pallet-session/try-runtime",143 "pallet-preimage/try-runtime",144 'cumulus-pallet-aura-ext/try-runtime',145 'cumulus-pallet-aura-ext/try-runtime',145 'cumulus-pallet-dmp-queue/try-runtime',146 'cumulus-pallet-dmp-queue/try-runtime',146 'cumulus-pallet-parachain-system/try-runtime',147 'cumulus-pallet-parachain-system/try-runtime',189app-promotion = []190app-promotion = []190collator-selection = []191collator-selection = []191foreign-assets = []192foreign-assets = []192preimage = []193pallet-test-utils = []193pallet-test-utils = []194preimage = []194refungible = []195refungible = []195scheduler = []196scheduler = []196197216orml-tokens = { workspace = true }217orml-tokens = { workspace = true }217orml-traits = { workspace = true }218orml-traits = { workspace = true }218orml-vesting = { workspace = true }219orml-vesting = { workspace = true }219orml-xtokens = { workspace = true }220orml-xcm-support = { workspace = true }220orml-xcm-support = { workspace = true }221orml-xtokens = { workspace = true }221pallet-aura = { workspace = true }222pallet-aura = { workspace = true }222pallet-authorship = { workspace = true }223pallet-authorship = { workspace = true }223pallet-balances = { features = ["insecure_zero_ed"], workspace = true }224pallet-balances = { features = ["insecure_zero_ed"], workspace = true }258log = { workspace = true }259log = { workspace = true }259num_enum = { workspace = true }260num_enum = { workspace = true }260pallet-app-promotion = { workspace = true }261pallet-app-promotion = { workspace = true }262pallet-balances-adapter = { workspace = true }261pallet-base-fee = { workspace = true }263pallet-base-fee = { workspace = true }262pallet-charge-transaction = { workspace = true }264pallet-charge-transaction = { workspace = true }263pallet-collator-selection = { workspace = true }265pallet-collator-selection = { workspace = true }291################################################################################293################################################################################292# Optional dependencies294# Optional dependencies293295296frame-benchmarking = { workspace = true, optional = true }294frame-system-benchmarking = { workspace = true, optional = true}297frame-system-benchmarking = { workspace = true, optional = true }295frame-benchmarking = { workspace = true, optional = true }296frame-try-runtime = { workspace = true, optional = true }298frame-try-runtime = { workspace = true, optional = true }299hex-literal = { workspace = true, optional = true }297serde = { workspace = true, optional = true }300serde = { workspace = true, optional = true }298hex-literal = { workspace = true, optional = true }299301300################################################################################302################################################################################301# Test dependencies303# Test dependenciesruntime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -22,6 +22,7 @@
pov-estimate = []
quartz-runtime = ['app-promotion', 'collator-selection', 'foreign-assets', 'preimage', 'refungible']
runtime-benchmarks = [
+ "pallet-preimage/runtime-benchmarks",
'cumulus-pallet-parachain-system/runtime-benchmarks',
'frame-benchmarking',
'frame-support/runtime-benchmarks',
@@ -42,7 +43,6 @@
'pallet-inflation/runtime-benchmarks',
'pallet-maintenance/runtime-benchmarks',
'pallet-nonfungible/runtime-benchmarks',
- "pallet-preimage/runtime-benchmarks",
'pallet-refungible/runtime-benchmarks',
'pallet-structure/runtime-benchmarks',
'pallet-timestamp/runtime-benchmarks',
@@ -70,9 +70,9 @@
# 'pallet-contracts-primitives/std',
# 'pallet-contracts-rpc-runtime-api/std',
# 'pallet-contract-helpers/std',
- "pallet-preimage/std",
"pallet-authorship/std",
"pallet-identity/std",
+ "pallet-preimage/std",
"pallet-session/std",
"sp-consensus-aura/std",
'app-promotion-rpc/std',
@@ -127,8 +127,8 @@
"orml-tokens/std",
"orml-traits/std",
"orml-vesting/std",
+ "orml-xcm-support/std",
"orml-xtokens/std",
- "orml-xcm-support/std",
"pallet-foreign-assets/std",
"pallet-maintenance/std",
]
@@ -136,8 +136,8 @@
"pallet-authorship/try-runtime",
"pallet-collator-selection/try-runtime",
"pallet-identity/try-runtime",
+ "pallet-preimage/try-runtime",
"pallet-session/try-runtime",
- "pallet-preimage/try-runtime",
'cumulus-pallet-aura-ext/try-runtime',
'cumulus-pallet-dmp-queue/try-runtime',
'cumulus-pallet-parachain-system/try-runtime',
@@ -153,6 +153,7 @@
'orml-xtokens/try-runtime',
'pallet-app-promotion/try-runtime',
'pallet-aura/try-runtime',
+ 'pallet-balances-adapter/std',
'pallet-balances/try-runtime',
'pallet-charge-transaction/try-runtime',
'pallet-common/try-runtime',
@@ -208,8 +209,8 @@
orml-tokens = { workspace = true }
orml-traits = { workspace = true }
orml-vesting = { workspace = true }
+orml-xcm-support = { workspace = true }
orml-xtokens = { workspace = true }
-orml-xcm-support = { workspace = true }
pallet-aura = { workspace = true }
pallet-authorship = { workspace = true }
pallet-balances = { features = ["insecure_zero_ed"], workspace = true }
@@ -246,6 +247,7 @@
fp-evm = { workspace = true }
log = { workspace = true }
pallet-app-promotion = { workspace = true }
+pallet-balances-adapter = { workspace = true }
pallet-collator-selection = { workspace = true }
pallet-common = { workspace = true }
pallet-configuration = { workspace = true }
@@ -283,11 +285,11 @@
################################################################################
# Optional dependencies
+frame-benchmarking = { workspace = true, optional = true }
frame-system-benchmarking = { workspace = true, optional = true }
-frame-benchmarking = { workspace = true, optional = true }
frame-try-runtime = { workspace = true, optional = true }
+hex-literal = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
-hex-literal = { workspace = true, optional = true }
################################################################################
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -20,6 +20,7 @@
limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
pov-estimate = []
runtime-benchmarks = [
+ "pallet-preimage/runtime-benchmarks",
'frame-benchmarking',
'frame-support/runtime-benchmarks',
'frame-system-benchmarking',
@@ -39,7 +40,6 @@
'pallet-inflation/runtime-benchmarks',
'pallet-maintenance/runtime-benchmarks',
'pallet-nonfungible/runtime-benchmarks',
- "pallet-preimage/runtime-benchmarks",
'pallet-refungible/runtime-benchmarks',
'pallet-structure/runtime-benchmarks',
'pallet-timestamp/runtime-benchmarks',
@@ -68,9 +68,9 @@
# 'pallet-contracts-primitives/std',
# 'pallet-contracts-rpc-runtime-api/std',
# 'pallet-contract-helpers/std',
- "pallet-preimage/std",
"pallet-authorship/std",
"pallet-identity/std",
+ "pallet-preimage/std",
"pallet-session/std",
"sp-consensus-aura/std",
'app-promotion-rpc/std',
@@ -78,6 +78,7 @@
'fp-rpc/std',
'fp-self-contained/std',
'pallet-app-promotion/std',
+ 'pallet-balances-adapter/std',
'pallet-base-fee/std',
'pallet-charge-transaction/std',
'pallet-collator-selection/std',
@@ -124,8 +125,8 @@
"orml-tokens/std",
"orml-traits/std",
"orml-vesting/std",
+ "orml-xcm-support/std",
"orml-xtokens/std",
- "orml-xcm-support/std",
"pallet-foreign-assets/std",
"pallet-maintenance/std",
]
@@ -134,8 +135,8 @@
"pallet-authorship/try-runtime",
"pallet-collator-selection/try-runtime",
"pallet-identity/try-runtime",
+ "pallet-preimage/try-runtime",
"pallet-session/try-runtime",
- "pallet-preimage/try-runtime",
'cumulus-pallet-aura-ext/try-runtime',
'cumulus-pallet-dmp-queue/try-runtime',
'cumulus-pallet-parachain-system/try-runtime',
@@ -207,8 +208,8 @@
orml-tokens = { workspace = true }
orml-traits = { workspace = true }
orml-vesting = { workspace = true }
+orml-xcm-support = { workspace = true }
orml-xtokens = { workspace = true }
-orml-xcm-support = { workspace = true }
pallet-aura = { workspace = true }
pallet-authorship = { workspace = true }
pallet-balances = { features = ["insecure_zero_ed"], workspace = true }
@@ -244,6 +245,7 @@
derivative = { workspace = true }
log = { workspace = true }
pallet-app-promotion = { workspace = true }
+pallet-balances-adapter = { workspace = true }
pallet-collator-selection = { workspace = true }
pallet-common = { workspace = true }
pallet-configuration = { workspace = true }
@@ -282,11 +284,11 @@
################################################################################
# Optional dependencies
+frame-benchmarking = { workspace = true, optional = true }
frame-system-benchmarking = { workspace = true, optional = true }
-frame-benchmarking = { workspace = true, optional = true }
frame-try-runtime = { workspace = true, optional = true }
+hex-literal = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
-hex-literal = { workspace = true, optional = true }
################################################################################
# Test dependencies