diff --git a/Cargo.lock b/Cargo.lock index b20595eace0..9d5dba0fee9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5934,7 +5934,7 @@ dependencies = [ [[package]] name = "pallet-liquidity-mining" -version = "1.0.1" +version = "1.1.0" dependencies = [ "frame-support", "frame-system", diff --git a/pallets/liquidity-mining/Cargo.toml b/pallets/liquidity-mining/Cargo.toml index 47d770e57d8..617c7e561cd 100644 --- a/pallets/liquidity-mining/Cargo.toml +++ b/pallets/liquidity-mining/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-liquidity-mining" -version = "1.0.1" +version = "1.1.0" description = "Liquidity mining" authors = ["GalacticCouncil"] edition = "2018" diff --git a/pallets/liquidity-mining/src/lib.rs b/pallets/liquidity-mining/src/lib.rs index 96420a89b2f..8e9764e9661 100644 --- a/pallets/liquidity-mining/src/lib.rs +++ b/pallets/liquidity-mining/src/lib.rs @@ -242,6 +242,13 @@ pub mod pallet { fn on_runtime_upgrade() -> frame_support::weights::Weight { migration::init_nft_class::() } + + fn integrity_test() { + assert!( + T::NftClass::get() <= T::ReserveClassIdUpTo::get(), + "`NftClass` must be within the range of reserved NFT class IDs" + ); + } } #[pallet::config] @@ -280,7 +287,7 @@ pub mod pallet { /// The block number provider type BlockNumberProvider: BlockNumberProvider; - /// NFT class id for liq. mining deposit nfts. + /// NFT class id for liq. mining deposit nfts. Has to be within the range of reserved NFT class IDs. type NftClass: Get; /// Weight information for extrinsic in this module.