diff --git a/CHANGELOG.md b/CHANGELOG.md index 38defd73bb..3b889797b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/collection) [\#1276](https://github.com/Finschia/finschia-sdk/pull/1276) eliminates potential risk for Insufficient Sanity Check of tokenID in Genesis * (x/foundation) [\#1277](https://github.com/Finschia/finschia-sdk/pull/1277) add init logic of foundation module accounts to InitGenesis in order to eliminate potential panic * (x/collection, x/token) [\#1288](https://github.com/Finschia/finschia-sdk/pull/1288) use accAddress to compare in validatebasic function in collection & token modules +* (x/collection) [\#1268](https://github.com/Finschia/finschia-sdk/pull/1268) export x/collection params into genesis ### Removed diff --git a/x/collection/keeper/genesis.go b/x/collection/keeper/genesis.go index 01330383cc..812e99093f 100644 --- a/x/collection/keeper/genesis.go +++ b/x/collection/keeper/genesis.go @@ -211,6 +211,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *collection.GenesisState { contracts := k.getContracts(ctx) return &collection.GenesisState{ + Params: k.GetParams(ctx), Contracts: contracts, NextClassIds: k.getAllNextClassIDs(ctx), Classes: k.getClasses(ctx, contracts), diff --git a/x/collection/keeper/genesis_test.go b/x/collection/keeper/genesis_test.go index fc6c0c836c..e2108aeaca 100644 --- a/x/collection/keeper/genesis_test.go +++ b/x/collection/keeper/genesis_test.go @@ -28,3 +28,11 @@ func (s *KeeperTestSuite) TestImportExportGenesis() { newGenesis := s.keeper.ExportGenesis(s.ctx) s.Require().Equal(genesis, newGenesis) } + +func (s *KeeperTestSuite) TestExportGenesis() { + genesis := s.keeper.ExportGenesis(s.ctx) + + params := genesis.Params + s.Require().NotZero(params.DepthLimit) + s.Require().NotZero(params.WidthLimit) +}