Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dimiandre committed Jul 5, 2024
1 parent 3791ff2 commit bbb4280
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
3 changes: 1 addition & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ import (
testnetV21alpha1 "github.com/CosmosContracts/juno/v23/app/upgrades/testnet/v21.0.0-alpha.1"
testnetV22alpha1 "github.com/CosmosContracts/juno/v23/app/upgrades/testnet/v22.0.0-alpha.1"
testnetV23alpha1 "github.com/CosmosContracts/juno/v23/app/upgrades/testnet/v23.0.0-alpha.1"

v10 "github.com/CosmosContracts/juno/v23/app/upgrades/v10"
v11 "github.com/CosmosContracts/juno/v23/app/upgrades/v11"
v12 "github.com/CosmosContracts/juno/v23/app/upgrades/v12"
Expand Down Expand Up @@ -118,7 +117,7 @@ var (
testnetV21alpha1.Upgrade,
testnetV22alpha1.Upgrade,
testnetV23alpha1.Upgrade,

v10.Upgrade,
v11.Upgrade,
v12.Upgrade,
Expand Down
5 changes: 3 additions & 2 deletions app/upgrades/testnet/v23.0.0-alpha.1/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package v23
import (
"fmt"

icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v7/types"

store "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v7/types"

"github.com/CosmosContracts/juno/v23/app/keepers"
"github.com/CosmosContracts/juno/v23/app/upgrades"
Expand All @@ -19,7 +20,7 @@ const UpgradeName = "v2300alpha1"
var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: v2300Alpha1UpgradeHandler,
StoreUpgrades: store.StoreUpgrades{
StoreUpgrades: store.StoreUpgrades{
Added: []string{
// updated modules
icqtypes.ModuleName,
Expand Down
10 changes: 6 additions & 4 deletions app/upgrades/v23/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ package v23
import (
"fmt"

"github.com/CosmosContracts/juno/v23/app/keepers"
"github.com/CosmosContracts/juno/v23/app/upgrades"
icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v7/types"

"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v7/types"

"github.com/CosmosContracts/juno/v23/app/keepers"
"github.com/CosmosContracts/juno/v23/app/upgrades"
)

func CreateV23UpgradeHandler(
Expand Down Expand Up @@ -52,7 +54,7 @@ func CreateV23UpgradeHandler(
if err != nil {
return nil, err
}

logger.Info(fmt.Sprintf("post migrate version map: %v", versionMap))

// convert pob builder account to an actual module account
Expand Down
4 changes: 2 additions & 2 deletions x/tokenfactory/keeper/bankactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@ func (k Keeper) forceTransfer(ctx sdk.Context, amount sdk.Coin, fromAddr string,
}

// IsModuleAcc checks if a given address is restricted
func (k Keeper) IsModuleAcc(ctx sdk.Context, addr sdk.AccAddress) bool {
func (k Keeper) IsModuleAcc(_ sdk.Context, addr sdk.AccAddress) bool {
return k.permAddrMap[addr.String()]
}
}
6 changes: 3 additions & 3 deletions x/tokenfactory/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (

type (
Keeper struct {
cdc codec.BinaryCodec
storeKey storetypes.StoreKey
permAddrs map[string]authtypes.PermissionsForAddress
cdc codec.BinaryCodec
storeKey storetypes.StoreKey
permAddrs map[string]authtypes.PermissionsForAddress
permAddrMap map[string]bool

accountKeeper types.AccountKeeper
Expand Down
2 changes: 1 addition & 1 deletion x/tokenfactory/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ var (
ErrCreatorTooLong = errorsmod.Register(ModuleName, 9, fmt.Sprintf("creator too long, max length is %d bytes", MaxCreatorLength))
ErrDenomDoesNotExist = errorsmod.Register(ModuleName, 10, "denom does not exist")
ErrCapabilityNotEnabled = errorsmod.Register(ModuleName, 11, "this capability is not enabled on chain")
ErrModuleAccount = errorsmod.Register(ModuleName, 12, "interacting with module accounts not allowed")
ErrModuleAccount = errorsmod.Register(ModuleName, 12, "interacting with module accounts not allowed")
)

0 comments on commit bbb4280

Please sign in to comment.