mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Deploy pallet-parameters to rococo and fix dynamic_params name expand (#4006)
Changes: - Add pallet-parameters to Rococo to configure the NIS and preimage pallet. - Fix names of expanded dynamic params. Apparently, `to_class_case` removes suffix `s`, and `Nis` becomes `Ni` 😑. Now using `to_pascal_case`. --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Alessandro Siniscalchi <asiniscalchi@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: command-bot <>
This commit is contained in:
committed by
GitHub
parent
1bca825cc2
commit
30c58fa22a
@@ -16,6 +16,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
#![cfg(any(test, feature = "runtime-benchmarks"))]
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
//! Mock runtime that configures the `pallet_example_basic` to use dynamic params for testing.
|
||||
|
||||
@@ -66,6 +67,20 @@ pub mod dynamic_params {
|
||||
#[codec(index = 0)]
|
||||
pub static Key3: u128 = 4;
|
||||
}
|
||||
|
||||
#[dynamic_pallet_params]
|
||||
#[codec(index = 2)]
|
||||
pub mod nis {
|
||||
#[codec(index = 0)]
|
||||
pub static Target: u64 = 0;
|
||||
}
|
||||
|
||||
#[dynamic_pallet_params]
|
||||
#[codec(index = 3)]
|
||||
pub mod somE_weird_SPElLInG_s {
|
||||
#[codec(index = 0)]
|
||||
pub static V: u64 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#[docify::export(benchmarking_default)]
|
||||
@@ -98,6 +113,8 @@ mod custom_origin {
|
||||
}
|
||||
|
||||
match key {
|
||||
RuntimeParametersKey::SomEWeirdSPElLInGS(_) |
|
||||
RuntimeParametersKey::Nis(_) |
|
||||
RuntimeParametersKey::Pallet1(_) => ensure_root(origin.clone()),
|
||||
RuntimeParametersKey::Pallet2(_) => ensure_signed(origin.clone()).map(|_| ()),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user