From c944d894f560cb618def4c2a5350372633092504 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 6 Mar 2024 09:23:59 +0000 Subject: [PATCH 1/3] Export params --- x/collection/keeper/genesis.go | 1 + x/collection/keeper/genesis_test.go | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/x/collection/keeper/genesis.go b/x/collection/keeper/genesis.go index 01330383cc..641b0cc0d8 100644 --- a/x/collection/keeper/genesis.go +++ b/x/collection/keeper/genesis.go @@ -212,6 +212,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *collection.GenesisState { return &collection.GenesisState{ Contracts: contracts, + Params: k.GetParams(ctx), NextClassIds: k.getAllNextClassIDs(ctx), Classes: k.getClasses(ctx, contracts), NextTokenIds: k.getNextTokenIDs(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) +} From 345232ed52ddd1754c306e106242e664b13886be Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 6 Mar 2024 09:28:54 +0000 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c5c5569f4..0f26479fd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes * chore(deps) [\#1141](https://github.com/Finschia/finschia-sdk/pull/1141) Bump github.com/cosmos/ledger-cosmos-go from 0.12.2 to 0.13.2 to fix ledger signing issue * (x/auth, x/slashing) [\#1179](https://github.com/Finschia/finschia-sdk/pull/1179) modify missing changes of converting to tendermint +* (x/collection) [\#1268](https://github.com/Finschia/finschia-sdk/pull/1268) export x/collection params into genesis ### Removed From b5e9ae73686dafa9122bd1b0087d974a50924516 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 6 Mar 2024 09:32:01 +0000 Subject: [PATCH 3/3] Move position --- x/collection/keeper/genesis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/collection/keeper/genesis.go b/x/collection/keeper/genesis.go index 641b0cc0d8..812e99093f 100644 --- a/x/collection/keeper/genesis.go +++ b/x/collection/keeper/genesis.go @@ -211,8 +211,8 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *collection.GenesisState { contracts := k.getContracts(ctx) return &collection.GenesisState{ - Contracts: contracts, Params: k.GetParams(ctx), + Contracts: contracts, NextClassIds: k.getAllNextClassIDs(ctx), Classes: k.getClasses(ctx, contracts), NextTokenIds: k.getNextTokenIDs(ctx, contracts),