git.delta.rocks / unique-network / refs/commits / 81e4404a75c5

difftreelog

feat(pallet nft) added GenesisConfig

PraetorP2023-04-20parent: #fb505f1.patch.diff
in: master

3 files changed

modifiednode/cli/src/chain_spec.rsdiffbeforeafterboth
168 .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_accounts
232 .iter()234 .iter()
modifiedpallets/common/src/lib.rsdiffbeforeafterboth

no syntactic changes

modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
282 QueryKind = ValueQuery,282 QueryKind = ValueQuery,
283 >;283 >;
284
285 #[pallet::genesis_config]
286 pub struct GenesisConfig<T>(PhantomData<T>);
287
288 #[cfg(feature = "std")]
289 impl<T: Config> Default for GenesisConfig<T> {
290 fn default() -> Self {
291 Self(Default::default())
292 }
293 }
294
295 #[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}
285302
286pub struct NonfungibleHandle<T: Config>(pallet_common::CollectionHandle<T>);303pub struct NonfungibleHandle<T: Config>(pallet_common::CollectionHandle<T>);