Skip to content

Commit

Permalink
style(logic): fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed Mar 27, 2023
1 parent 2d613dd commit f44d280
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 32 deletions.
9 changes: 4 additions & 5 deletions proto/logic/v1beta2/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ syntax = "proto3";

package logic.v1beta2;

option go_package = "github.com/okp4/okp4d/x/logic/types";

import "cosmos/msg/v1/msg.proto";
import "logic/v1beta2/params.proto";
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "logic/v1beta2/params.proto";

option go_package = "github.com/okp4/okp4d/x/logic/types";

// MsgService defines the service for the logic module.
// Do nothing for now as the service is without any side effects.
Expand All @@ -17,7 +17,6 @@ service MsgService {
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
}


// MsgUpdateParams defines a Msg for updating the x/logic module parameters.
message MsgUpdateParams {
option (cosmos.msg.v1.signer) = "authority";
Expand Down
6 changes: 5 additions & 1 deletion x/logic/genesis.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
package logic

import (
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/okp4/okp4d/x/logic/keeper"
"github.com/okp4/okp4d/x/logic/types"
)

// InitGenesis initializes the module's state from a provided genesis state.
func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) {
k.SetParams(ctx, genState.Params)
err := k.SetParams(ctx, genState.Params)
if err != nil {
panic(errorsmod.Wrapf(err, "error setting params"))
}
}

// ExportGenesis returns the module's exported genesis.
Expand Down
1 change: 0 additions & 1 deletion x/logic/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func NewKeeper(
bankKeeper types.BankKeeper,
fsProvider FSProvider,
) *Keeper {

// ensure gov module account is set and is not nil
if err := sdk.VerifyAddressFormat(authority); err != nil {
panic(err)
Expand Down
3 changes: 2 additions & 1 deletion x/logic/migrations/v3/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ func v2ParamKeyTable() paramtypes.KeyTable {
func MigrateStore(ctx sdk.Context,
storeKey storetypes.StoreKey,
cdc codec.BinaryCodec,
legacySubspace exported.Subspace) error {
legacySubspace exported.Subspace,
) error {
logger := ctx.Logger().
With("module", "logic").
With("migration", "v3")
Expand Down
6 changes: 3 additions & 3 deletions x/logic/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ var (
)

const (
// Amino names
// Amino names.
updateParamsName = "okp4/logic/MsgUpdateParams"
)

// NOTE: This is required for the GetSignBytes function
// NOTE: This is required for the GetSignBytes function.
func init() {
RegisterLegacyAminoCodec(Amino)
Amino.Seal()
}

// RegisterLegacyAminoCodec required for EIP-712
// RegisterLegacyAminoCodec required for EIP-712.
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgUpdateParams{}, updateParamsName, nil)
}
2 changes: 1 addition & 1 deletion x/logic/types/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress {
return []sdk.AccAddress{addr}
}

// ValidateBasic does a sanity check of the provided data
// ValidateBasic does a sanity check of the provided data.
func (m *MsgUpdateParams) ValidateBasic() error {
if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil {
return errorsmod.Wrap(err, "invalid authority address")
Expand Down
4 changes: 2 additions & 2 deletions x/logic/types/params_legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"

// ParamKeyTable the param key table for launch module.
//
// DEPRECATED: kept for migration purpose,
// Deprecated: kept for migration purpose,
// will be removed soon.
func ParamKeyTable() paramtypes.KeyTable {
return paramtypes.NewKeyTable().RegisterParamSet(&Params{})
Expand All @@ -14,7 +14,7 @@ var _ paramtypes.ParamSet = (*Params)(nil)

// ParamSetPairs get the params.ParamSet.
//
// DEPRECATED: kept for migration purpose,
// Deprecated: kept for migration purpose,
// will be removed soon.
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
return []paramtypes.ParamSetPair{
Expand Down
36 changes: 18 additions & 18 deletions x/logic/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f44d280

Please sign in to comment.