chore: remove mint imports in the sdk (#18307)

This commit is contained in:
Marko
2023-10-31 10:30:38 +00:00
committed by GitHub
parent 16c2abffbe
commit f03b396c8a
31 changed files with 47 additions and 53 deletions
+4 -3
View File
@@ -10,7 +10,6 @@ import (
errorsmod "cosmossdk.io/errors"
"cosmossdk.io/math"
bankkeeper "cosmossdk.io/x/bank/keeper"
minttypes "cosmossdk.io/x/mint/types"
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
@@ -18,6 +17,8 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
const mintModuleName = "mint"
type GenerateAccountStrategy func(int) []sdk.AccAddress
// BondDenomProvider is a subset of the staking keeper's public interface that
@@ -67,11 +68,11 @@ func addTestAddrs(bankKeeper bankkeeper.Keeper, stakingKeeper BondDenomProvider,
}
func initAccountWithCoins(bankKeeper bankkeeper.Keeper, ctx sdk.Context, addr sdk.AccAddress, coins sdk.Coins) {
if err := bankKeeper.MintCoins(ctx, minttypes.ModuleName, coins); err != nil {
if err := bankKeeper.MintCoins(ctx, mintModuleName, coins); err != nil {
panic(err)
}
if err := bankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr, coins); err != nil {
if err := bankKeeper.SendCoinsFromModuleToAccount(ctx, mintModuleName, addr, coins); err != nil {
panic(err)
}
}