-
Notifications
You must be signed in to change notification settings - Fork 123
fix: limit tokenfactory changeadmin with page requests & index it properly #328
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
181902a
feat: add pagination to proto query denoms from creator
141eeac
feat: add admin secondary index to tokenfactory, alongside pagination
71c857f
feat: add pagination to cli
558778a
test: check pagination limits work
02ac596
chore: add migration from old admin indexing to new one
020cf4b
docs: changelog changes to tokenfactory denom queries
109220b
test: add migration test
0b2ab48
fix: nil request defaults to max page request
7689cd3
docs: add migration logs
9585048
docs: add details to getDenomFromCreator
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| package v720 | ||
|
|
||
| import ( | ||
| "github.com/kiichain/kiichain/v7/app/upgrades" | ||
| ) | ||
|
|
||
| const ( | ||
| // UpgradeName is the name of the upgrade | ||
| UpgradeName = "v7.2.0" | ||
| ) | ||
|
|
||
| // Upgrade defines the upgrade, running module migrations to backfill the | ||
| // tokenfactory admin secondary index. | ||
| var Upgrade = upgrades.Upgrade{ | ||
| UpgradeName: UpgradeName, | ||
| CreateUpgradeHandler: CreateUpgradeHandler, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| package v720 | ||
|
|
||
| import ( | ||
| "context" | ||
|
|
||
| upgradetypes "cosmossdk.io/x/upgrade/types" | ||
|
|
||
| sdk "github.com/cosmos/cosmos-sdk/types" | ||
| "github.com/cosmos/cosmos-sdk/types/module" | ||
|
|
||
| "github.com/kiichain/kiichain/v7/app/keepers" | ||
| ) | ||
|
|
||
| // CreateUpgradeHandler creates the upgrade handler for the v7.2.0 upgrade. | ||
| // It runs all pending module migrations, which includes the tokenfactory v1→v2 | ||
| // migration that backfills the secondary admin index. | ||
| func CreateUpgradeHandler( | ||
| mm *module.Manager, | ||
| configurator module.Configurator, | ||
| _ *keepers.AppKeepers, | ||
| ) upgradetypes.UpgradeHandler { | ||
| return func(c context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { | ||
| ctx := sdk.UnwrapSDKContext(c) | ||
|
|
||
| ctx.Logger().Info("Starting module migrations for v7.2.0...") | ||
|
|
||
| vm, err := mm.RunMigrations(ctx, configurator, vm) | ||
| if err != nil { | ||
| return vm, err | ||
| } | ||
|
|
||
| ctx.Logger().Info("Upgrade v7.2.0 complete") | ||
| return vm, nil | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.