difftreelog
feat(pallet nft) added GenesisConfig
in: master
3 files changed
node/cli/src/chain_spec.rsdiffbeforeafterboth168 .collect(),168 .collect(),169 },169 },170 common: Default::default(),170 common: Default::default(),171 nonfungible: Default::default(),171 treasury: Default::default(),172 treasury: Default::default(),172 tokens: TokensConfig { balances: vec![] },173 tokens: TokensConfig { balances: vec![] },173 sudo: SudoConfig {174 sudo: SudoConfig {227 .to_vec(),228 .to_vec(),228 },229 },229 common: Default::default(),230 common: Default::default(),231 nonfungible: Default::default(),230 balances: BalancesConfig {232 balances: BalancesConfig {231 balances: $endowed_accounts233 balances: $endowed_accounts232 .iter()234 .iter()pallets/common/src/lib.rsdiffbeforeafterbothno syntactic changes
pallets/nonfungible/src/lib.rsdiffbeforeafterboth282 QueryKind = ValueQuery,282 QueryKind = ValueQuery,283 >;283 >;284285 #[pallet::genesis_config]286 pub struct GenesisConfig<T>(PhantomData<T>);287288 #[cfg(feature = "std")]289 impl<T: Config> Default for GenesisConfig<T> {290 fn default() -> Self {291 Self(Default::default())292 }293 }294295 #[pallet::genesis_build]296 impl<T: Config> GenesisBuild<T> for GenesisConfig<T> {297 fn build(&self) {298 StorageVersion::new(1).put::<Pallet<T>>();299 }300 }284}301}285302286pub struct NonfungibleHandle<T: Config>(pallet_common::CollectionHandle<T>);303pub struct NonfungibleHandle<T: Config>(pallet_common::CollectionHandle<T>);