-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Emission Enabled bolean flag to Mint Module (#708)
## Purpose of Changes and their Description This change adds a mint module parameter that allows network administrators or the `/x/gov` governance module to control whether or not any new tokens are minted, basically entirely turning off paying for rewards and creating new tokens / inflation. ## Link(s) to Ticket(s) or Issue(s) resolved by this PR PROTO-3083 ## Are these changes tested and documented? New tests added to `x/mint/migrations/v5/migrate_test.go` and `x/mint/module/module_test.go`
- Loading branch information
Showing
17 changed files
with
3,713 additions
and
78 deletions.
There are no files selected for viewing
This file contains 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 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 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,31 @@ | ||
package v0_8_0 //nolint:revive // var-naming: don't use an underscore in package name | ||
|
||
import ( | ||
"context" | ||
|
||
storetypes "cosmossdk.io/store/types" | ||
upgradetypes "cosmossdk.io/x/upgrade/types" | ||
"github.com/allora-network/allora-chain/app/keepers" | ||
"github.com/allora-network/allora-chain/app/upgrades" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
) | ||
|
||
const ( | ||
UpgradeName = "v0.8.0" | ||
) | ||
|
||
var Upgrade = upgrades.Upgrade{ | ||
UpgradeName: UpgradeName, | ||
CreateUpgradeHandler: CreateUpgradeHandler, | ||
StoreUpgrades: storetypes.StoreUpgrades{Added: nil, Renamed: nil, Deleted: nil}, | ||
} | ||
|
||
func CreateUpgradeHandler( | ||
moduleManager *module.Manager, | ||
configurator module.Configurator, | ||
keepers *keepers.AppKeepers, | ||
) upgradetypes.UpgradeHandler { | ||
return func(ctx context.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { | ||
return moduleManager.RunMigrations(ctx, configurator, vm) | ||
} | ||
} |
Oops, something went wrong.