Skip to content

Commit

Permalink
remove cosmos sdk mintmodule as we use ugdmint module for handling mi…
Browse files Browse the repository at this point in the history
…nting
  • Loading branch information
dekm committed Jan 26, 2024
1 parent de41079 commit 73f23e2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
12 changes: 5 additions & 7 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import (
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper"
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
Expand Down Expand Up @@ -89,11 +88,11 @@ type App struct {
interfaceRegistry codectypes.InterfaceRegistry

// keepers
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
StakingKeeper *stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
MintKeeper mintkeeper.Keeper
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
StakingKeeper *stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
//MintKeeper mintkeeper.Keeper
DistrKeeper distrkeeper.Keeper
GovKeeper *govkeeper.Keeper
CrisisKeeper *crisiskeeper.Keeper
Expand Down Expand Up @@ -249,7 +248,6 @@ func New(
&app.BankKeeper,
&app.StakingKeeper,
&app.SlashingKeeper,
&app.MintKeeper,
&app.DistrKeeper,
&app.GovKeeper,
&app.CrisisKeeper,
Expand Down
25 changes: 14 additions & 11 deletions app/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
genutilmodulev1 "cosmossdk.io/api/cosmos/genutil/module/v1"
govmodulev1 "cosmossdk.io/api/cosmos/gov/module/v1"
groupmodulev1 "cosmossdk.io/api/cosmos/group/module/v1"
mintmodulev1 "cosmossdk.io/api/cosmos/mint/module/v1"
paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1"
slashingmodulev1 "cosmossdk.io/api/cosmos/slashing/module/v1"
stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1"
Expand Down Expand Up @@ -52,8 +51,9 @@ import (
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
"github.com/cosmos/cosmos-sdk/x/group"
_ "github.com/cosmos/cosmos-sdk/x/group/module" // import for side-effects
_ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"

//_ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects
//minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
_ "github.com/cosmos/cosmos-sdk/x/params" // import for side-effects
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
_ "github.com/cosmos/cosmos-sdk/x/slashing" // import for side-effects
Expand All @@ -69,6 +69,8 @@ import (
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"

//mintmodulev1 "github.com/unigrid-project/cosmos-ugdmint/api/cosmos/ugdmint/module/v1"

ugdmintmodulev1 "github.com/unigrid-project/cosmos-ugdmint/api/cosmos/ugdmint/module/v1"
_ "github.com/unigrid-project/cosmos-ugdmint/x/ugdmint/module" // import for side-effects
ugdmintmoduletypes "github.com/unigrid-project/cosmos-ugdmint/x/ugdmint/types"
Expand Down Expand Up @@ -103,7 +105,7 @@ var (
stakingtypes.ModuleName,
slashingtypes.ModuleName,
govtypes.ModuleName,
minttypes.ModuleName,
//minttypes.ModuleName,
crisistypes.ModuleName,
ibcexported.ModuleName,
genutiltypes.ModuleName,
Expand Down Expand Up @@ -135,7 +137,7 @@ var (
// NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC)
beginBlockers = []string{
// cosmos sdk modules
minttypes.ModuleName,
//minttypes.ModuleName,
distrtypes.ModuleName,
slashingtypes.ModuleName,
evidencetypes.ModuleName,
Expand Down Expand Up @@ -187,7 +189,7 @@ var (
moduleAccPerms = []*authmodulev1.ModuleAccountPermission{
{Account: authtypes.FeeCollectorName},
{Account: distrtypes.ModuleName},
{Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}},
//{Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}},
{Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}},
{Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}},
{Account: govtypes.ModuleName, Permissions: []string{authtypes.Burner}},
Expand All @@ -204,7 +206,8 @@ var (
blockAccAddrs = []string{
authtypes.FeeCollectorName,
distrtypes.ModuleName,
minttypes.ModuleName,
//minttypes.ModuleName,
ugdmintmoduletypes.ModuleName,
stakingtypes.BondedPoolName,
stakingtypes.NotBondedPoolName,
// We allow the following module accounts to receive funds:
Expand Down Expand Up @@ -296,10 +299,10 @@ var (
Name: evidencetypes.ModuleName,
Config: appconfig.WrapAny(&evidencemodulev1.Module{}),
},
{
Name: minttypes.ModuleName,
Config: appconfig.WrapAny(&mintmodulev1.Module{}),
},
// {
// Name: minttypes.ModuleName,
// Config: appconfig.WrapAny(&mintmodulev1.Module{}),
// },
{
Name: group.ModuleName,
Config: appconfig.WrapAny(&groupmodulev1.Module{
Expand Down
1 change: 1 addition & 0 deletions cmd/paxd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func NewRootCmd() *cobra.Command {
&moduleBasicManager,
&clientCtx,
); err != nil {
fmt.Printf("Error during dependency injection: %+v\n", err)
panic(err)
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)

//replace github.com/unigrid-project/cosmos-ugdmint => /home/evan/work/cosmos-sdk-ugdmint
replace github.com/unigrid-project/cosmos-ugdmint => /home/evan/work/cosmos-sdk-ugdmint

//replace github.com/unigrid-project/cosmos-unigrid-hedgehog-vesting => /home/evan/work/cosmos-sdk-unigrid-hedgehog-vesting

Expand Down

0 comments on commit 73f23e2

Please sign in to comment.