From 96b20f2918fb099d767e2fb1637358d2e8087130 Mon Sep 17 00:00:00 2001 From: str-mv Date: Fri, 11 Sep 2020 10:57:35 +0000 Subject: [PATCH] Chain runtime variable name changed --- --- a/pallets/nft/src/lib.rs +++ b/pallets/nft/src/lib.rs @@ -160,6 +160,8 @@ // Private members NextCollectionID: u64; + CreatedCollectionCount: u64; + ChainVersion: u64; ItemListIndex: map hasher(blake2_128_concat) u64 => u64; pub Collection get(fn collection): map hasher(identity) u64 => CollectionType; @@ -205,6 +207,18 @@ fn deposit_event() = default; + fn on_initialize(now: T::BlockNumber) -> Weight { + + if ChainVersion::get() == 0 + { + let value = NextCollectionID::get(); + CreatedCollectionCount::put(value); + ChainVersion::put(2); + } + + 0 + } + // Create collection of NFT with given parameters // // @param customDataSz size of custom data in each collection item -- gitstuff