mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
GenesisBuild<T,I> deprecated. BuildGenesisConfig added (#2757)
* GenesisBuild<T,I> deprecated. BuildGenesisConfig added
* ".git/.scripts/commands/fmt/fmt.sh"
* integration-tests/emulated: ..Default::default added to genesis configs
* Cargo.lock updated
* Cargo.lock updated
* update lockfile for {"polkadot", "substrate"}
* clippy fixes
* clippy fixes
* clippy fixes again
---------
Co-authored-by: command-bot <>
This commit is contained in:
committed by
GitHub
parent
f3ada7b81f
commit
94d2e4bc28
@@ -11,6 +11,9 @@ scale-info = { version = "2.9.0", default-features = false, features = ["derive"
|
||||
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
|
||||
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
|
||||
cumulus-primitives-core = { path = "../../../primitives/core", default-features = false }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -39,18 +39,20 @@ pub mod pallet {
|
||||
impl<T: Config> Pallet<T> {}
|
||||
|
||||
#[pallet::genesis_config]
|
||||
pub struct GenesisConfig {
|
||||
pub struct GenesisConfig<T: Config> {
|
||||
#[serde(skip)]
|
||||
pub _config: sp_std::marker::PhantomData<T>,
|
||||
pub parachain_id: ParaId,
|
||||
}
|
||||
|
||||
impl Default for GenesisConfig {
|
||||
impl<T: Config> Default for GenesisConfig<T> {
|
||||
fn default() -> Self {
|
||||
Self { parachain_id: 100.into() }
|
||||
Self { parachain_id: 100.into(), _config: Default::default() }
|
||||
}
|
||||
}
|
||||
|
||||
#[pallet::genesis_build]
|
||||
impl<T: Config> GenesisBuild<T> for GenesisConfig {
|
||||
impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
|
||||
fn build(&self) {
|
||||
<ParachainId<T>>::put(self.parachain_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user