Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: export x/collection params into genesis (backport #1268) #1290

Merged
merged 2 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,19 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Improvements

### Bug Fixes
<<<<<<< HEAD
* (x/auth) [#1281](https://github.com/Finschia/finschia-sdk/pull/1281) `ModuleAccount.Validate` now reports a nil `.BaseAccount` instead of panicking. (backport #1274)
* (x/foundation) [\#1283](https://github.com/Finschia/finschia-sdk/pull/1283) add init logic of foundation module accounts to InitGenesis in order to eliminate potential panic (backport #1277)
* (x/collection) [\#1282](https://github.com/Finschia/finschia-sdk/pull/1282) eliminates potential risk for Insufficient Sanity Check of tokenID in Genesis (backport #1276)
=======
* 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/auth) [#1274](https://github.com/Finschia/finschia-sdk/pull/1274) `ModuleAccount.Validate` now reports a nil `.BaseAccount` instead of panicking.
* (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
>>>>>>> e86b98002 (fix: export x/collection params into genesis (#1268))
0Tech marked this conversation as resolved.
Show resolved Hide resolved

### Removed

Expand Down
1 change: 1 addition & 0 deletions x/collection/keeper/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
8 changes: 8 additions & 0 deletions x/collection/keeper/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Loading