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
--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -168,6 +168,7 @@
 					.collect(),
 			},
 			common: Default::default(),
+			nonfungible: Default::default(),
 			treasury: Default::default(),
 			tokens: TokensConfig { balances: vec![] },
 			sudo: SudoConfig {
@@ -227,6 +228,7 @@
 					.to_vec(),
 			},
 			common: Default::default(),
+			nonfungible: Default::default(),
 			balances: BalancesConfig {
 				balances: $endowed_accounts
 					.iter()
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -496,6 +496,7 @@
 			StorageVersion::new(1).put::<Pallet<T>>();
 		}
 	}
+
 	impl<T: Config> Pallet<T> {
 		/// Helper function that handles deposit events
 		pub fn deposit_event(event: Event<T>) {
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>);