Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle committed Sep 9, 2024
1 parent c055483 commit 26d765e
Show file tree
Hide file tree
Showing 81 changed files with 120 additions and 94 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ replace (
cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20240905174638-8ce77cbb2450
cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20240905174638-8ce77cbb2450
cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20240905174638-8ce77cbb2450
cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20240905174638-8ce77cbb2450
cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20240905174638-8ce77cbb2450
cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20240905174638-8ce77cbb2450
cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20240905174638-8ce77cbb2450
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ cosmossdk.io/x/consensus v0.0.0-20240905174638-8ce77cbb2450 h1:J//VFkxEHUAcUi+gX
cosmossdk.io/x/consensus v0.0.0-20240905174638-8ce77cbb2450/go.mod h1:l6pOuqO+/JfstuPFgRV+srKRtC0xxz65FrRGdzoQMt4=
cosmossdk.io/x/distribution v0.0.0-20240906090851-36d9b25e8981 h1:7nEV9siFRy8pcTo+8i3GQku27buS+yOSxTvMeL/uPK4=
cosmossdk.io/x/distribution v0.0.0-20240906090851-36d9b25e8981/go.mod h1:gyG0xDJw0O8Kmyy/n91248GaIpcC4OWhobjFw8MxRuI=
cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 h1:GuBrfHsK3RD5vlD4DuBz3DXslR6VlnzrYmHOC3L679Q=
cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337/go.mod h1:PhLn1pMBilyRC4GfRkoYhm+XVAYhF4adVrzut8AdpJI=
cosmossdk.io/x/epochs v0.0.0-20240905174638-8ce77cbb2450 h1:RVcQ2XCuh39Qg0BYTuzasorzMhtwlua8mBpA3SCPRtY=
cosmossdk.io/x/epochs v0.0.0-20240905174638-8ce77cbb2450/go.mod h1:ab0WK4m5EEvS060gKE8wINBD8bLxFk+OaSalVqwFpoM=
cosmossdk.io/x/gov v0.0.0-20240905174638-8ce77cbb2450 h1:4qpruZEf5JgMPmdQr2neXsc8at1TWnH59ZcEz9SR1uw=
cosmossdk.io/x/gov v0.0.0-20240905174638-8ce77cbb2450/go.mod h1:vxdu3r1+keQ0zugjZYwoaa0IcRscfqM/XQ8mw/MwFGc=
cosmossdk.io/x/group v0.0.0-20240905174638-8ce77cbb2450 h1:6UP+BMaQIf12+Zdm50nHJzBd47Ue9pq+CvTRIhOM4q0=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
testifysuite "github.com/stretchr/testify/suite"

govtypes "cosmossdk.io/x/gov/types"

"github.com/cosmos/cosmos-sdk/runtime"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/cosmos/gogoproto/proto"

banktypes "cosmossdk.io/x/bank/types"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/keeper"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/cosmos/gogoproto/proto"

banktypes "cosmossdk.io/x/bank/types"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/stretchr/testify/require"

banktypes "cosmossdk.io/x/bank/types"

"github.com/cosmos/cosmos-sdk/codec/testutil"
sdk "github.com/cosmos/cosmos-sdk/types"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"cosmossdk.io/core/registry"
banktypes "cosmossdk.io/x/bank/types"
stakingtypes "cosmossdk.io/x/staking/types"

"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
testifysuite "github.com/stretchr/testify/suite"

sdkmath "cosmossdk.io/math"

banktypes "cosmossdk.io/x/bank/types"

codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

govtypes "cosmossdk.io/x/gov/types"

"github.com/cosmos/cosmos-sdk/runtime"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package keeper_test
import (
banktypes "cosmossdk.io/x/bank/types"
stakingtypes "cosmossdk.io/x/staking/types"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/keeper"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"github.com/cosmos/gogoproto/proto"

sdkmath "cosmossdk.io/math"

banktypes "cosmossdk.io/x/bank/types"
disttypes "cosmossdk.io/x/distribution/types"
govtypesv1 "cosmossdk.io/x/gov/types/v1"
stakingtypes "cosmossdk.io/x/staking/types"

"github.com/cosmos/cosmos-sdk/testutil/testdata"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"math/rand"

coreaddress "cosmossdk.io/core/address"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/address"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/27-interchain-accounts/types/codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"github.com/cosmos/gogoproto/proto"

sdkmath "cosmossdk.io/math"

banktypes "cosmossdk.io/x/bank/types"
govtypesv1 "cosmossdk.io/x/gov/types/v1"
govtypes "cosmossdk.io/x/gov/types/v1beta1"
stakingtypes "cosmossdk.io/x/staking/types"

codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"

paramtypes "cosmossdk.io/x/params/types"

sdk "github.com/cosmos/cosmos-sdk/types"

capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
Expand Down
3 changes: 2 additions & 1 deletion modules/apps/27-interchain-accounts/types/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"encoding/json"
"strings"

errorsmod "cosmossdk.io/errors"
gogoprotoany "github.com/cosmos/gogoproto/types/any"

errorsmod "cosmossdk.io/errors"

sdk "github.com/cosmos/cosmos-sdk/types"

ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported"
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/29-fee/ica_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"github.com/cosmos/gogoproto/proto"

sdkmath "cosmossdk.io/math"

banktypes "cosmossdk.io/x/bank/types"
stakingtypes "cosmossdk.io/x/staking/types"

sdk "github.com/cosmos/cosmos-sdk/types"

icahosttypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/types"
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/29-fee/keeper/migrations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package keeper_test

import (
sdkmath "cosmossdk.io/math"

minttypes "cosmossdk.io/x/mint/types"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/ibc-go/v9/modules/apps/29-fee/keeper"
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/29-fee/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"

sdkmath "cosmossdk.io/math"

banktypes "cosmossdk.io/x/bank/types"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

Expand Down
2 changes: 1 addition & 1 deletion modules/apps/callbacks/callbacks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"cosmossdk.io/log"
sdkmath "cosmossdk.io/math"
storetypes "cosmossdk.io/store/types"

banktypes "cosmossdk.io/x/bank/types"

simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"

Expand Down
1 change: 1 addition & 0 deletions modules/apps/callbacks/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ replace (
cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20240905174638-8ce77cbb2450
cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20240905174638-8ce77cbb2450
cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20240905174638-8ce77cbb2450
cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20240905174638-8ce77cbb2450
cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20240905174638-8ce77cbb2450
cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20240905174638-8ce77cbb2450
cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20240905174638-8ce77cbb2450
Expand Down
4 changes: 2 additions & 2 deletions modules/apps/callbacks/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ cosmossdk.io/x/consensus v0.0.0-20240905174638-8ce77cbb2450 h1:J//VFkxEHUAcUi+gX
cosmossdk.io/x/consensus v0.0.0-20240905174638-8ce77cbb2450/go.mod h1:l6pOuqO+/JfstuPFgRV+srKRtC0xxz65FrRGdzoQMt4=
cosmossdk.io/x/distribution v0.0.0-20240906090851-36d9b25e8981 h1:7nEV9siFRy8pcTo+8i3GQku27buS+yOSxTvMeL/uPK4=
cosmossdk.io/x/distribution v0.0.0-20240906090851-36d9b25e8981/go.mod h1:gyG0xDJw0O8Kmyy/n91248GaIpcC4OWhobjFw8MxRuI=
cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 h1:GuBrfHsK3RD5vlD4DuBz3DXslR6VlnzrYmHOC3L679Q=
cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337/go.mod h1:PhLn1pMBilyRC4GfRkoYhm+XVAYhF4adVrzut8AdpJI=
cosmossdk.io/x/epochs v0.0.0-20240905174638-8ce77cbb2450 h1:RVcQ2XCuh39Qg0BYTuzasorzMhtwlua8mBpA3SCPRtY=
cosmossdk.io/x/epochs v0.0.0-20240905174638-8ce77cbb2450/go.mod h1:ab0WK4m5EEvS060gKE8wINBD8bLxFk+OaSalVqwFpoM=
cosmossdk.io/x/evidence v0.0.0-20240905174638-8ce77cbb2450 h1:qGDGb5WLDIy1SuiKb/JM8XcujQoXp0eILU0fxPY0wDU=
cosmossdk.io/x/evidence v0.0.0-20240905174638-8ce77cbb2450/go.mod h1:4zv2pGr0zHXd87GbD5crx+jPKnbh1XftcfJa9Hlvcd0=
cosmossdk.io/x/feegrant v0.0.0-20240905174638-8ce77cbb2450 h1:OcWM7iK+3zxgYWpM2WkbGBFVF1yjQne7z+i9uWO0GqY=
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/callbacks/ica_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/cosmos/gogoproto/proto"

sdkmath "cosmossdk.io/math"

stakingtypes "cosmossdk.io/x/staking/types"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp"
Expand Down
1 change: 1 addition & 0 deletions modules/apps/callbacks/testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import (
"cosmossdk.io/x/upgrade"
upgradekeeper "cosmossdk.io/x/upgrade/keeper"
upgradetypes "cosmossdk.io/x/upgrade/types"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
Expand Down
4 changes: 2 additions & 2 deletions modules/apps/callbacks/testing/simapp/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"encoding/json"
"fmt"

cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"

"cosmossdk.io/collections"
storetypes "cosmossdk.io/store/types"
slashingtypes "cosmossdk.io/x/slashing/types"
Expand All @@ -14,6 +12,8 @@ import (

servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"

cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
)

// ExportAppStateAndValidators exports the state of the application for a genesis
Expand Down
3 changes: 0 additions & 3 deletions modules/apps/callbacks/testing/simapp/simd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,6 @@ func initRootCmd(rootCmd *cobra.Command, moduleManager *module.Manager) {
)
}

func addModuleInitFlags(startCmd *cobra.Command) {
}

func queryCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "query",
Expand Down
7 changes: 3 additions & 4 deletions modules/apps/transfer/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import (
corestore "cosmossdk.io/core/store"
"cosmossdk.io/log"
"cosmossdk.io/math"
sdkmath "cosmossdk.io/math"

"cosmossdk.io/store/prefix"
storetypes "cosmossdk.io/store/types"

banktypes "cosmossdk.io/x/bank/types"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/runtime"
Expand Down Expand Up @@ -237,7 +236,7 @@ func (k Keeper) GetTotalEscrowForDenom(ctx context.Context, denom string) sdk.Co
panic(err)
}
if len(bz) == 0 {
return sdk.NewCoin(denom, sdkmath.ZeroInt())
return sdk.NewCoin(denom, math.ZeroInt())
}

amount := math.Int{}
Expand Down Expand Up @@ -266,7 +265,7 @@ func (k Keeper) SetTotalEscrowForDenom(ctx context.Context, coin sdk.Coin) {
return
}

bz, err := math.Int(coin.Amount).Marshal()
bz, err := coin.Amount.Marshal()
if err != nil {
panic(err)
}
Expand Down
15 changes: 7 additions & 8 deletions modules/apps/transfer/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import (

testifysuite "github.com/stretchr/testify/suite"

"cosmossdk.io/math"
sdkmath "cosmossdk.io/math"
storetypes "cosmossdk.io/store/types"

minttypes "cosmossdk.io/x/mint/types"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/runtime"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -207,7 +206,7 @@ func (suite *KeeperTestSuite) TestGetAllDenomEscrows() {
amount := sdkmath.NewInt(100)
expDenomEscrows = append(expDenomEscrows, sdk.NewCoin(denom, amount))

bz, err := math.Int(amount).Marshal()
bz, err := amount.Marshal()
suite.Require().NoError(err)
store.Set(types.TotalEscrowForDenomKey(denom), bz)
},
Expand All @@ -220,15 +219,15 @@ func (suite *KeeperTestSuite) TestGetAllDenomEscrows() {
amount := sdkmath.NewInt(100)
expDenomEscrows = append(expDenomEscrows, sdk.NewCoin(denom, amount))

bz, err := math.Int(amount).Marshal()
bz, err := amount.Marshal()
suite.Require().NoError(err)
store.Set(types.TotalEscrowForDenomKey(denom), bz)

denom = "bar/foo"
amount = sdkmath.NewInt(50)
expDenomEscrows = append(expDenomEscrows, sdk.NewCoin(denom, amount))

bz, err = math.Int(amount).Marshal()
bz, err = amount.Marshal()
suite.Require().NoError(err)
store.Set(types.TotalEscrowForDenomKey(denom), bz)
},
Expand All @@ -241,7 +240,7 @@ func (suite *KeeperTestSuite) TestGetAllDenomEscrows() {
amount := sdkmath.NewInt(100)
expDenomEscrows = append(expDenomEscrows, sdk.NewCoin(denom, amount))

bz, err := math.Int(amount).Marshal()
bz, err := amount.Marshal()
suite.Require().NoError(err)
store.Set(types.TotalEscrowForDenomKey(denom), bz)
},
Expand All @@ -253,7 +252,7 @@ func (suite *KeeperTestSuite) TestGetAllDenomEscrows() {
denom := ""
amount := sdkmath.ZeroInt()

bz, err := math.Int(amount).Marshal()
bz, err := amount.Marshal()
suite.Require().NoError(err)
store.Set(types.TotalEscrowForDenomKey(denom), bz)
},
Expand All @@ -265,7 +264,7 @@ func (suite *KeeperTestSuite) TestGetAllDenomEscrows() {
denom := "uatom"
amount := sdkmath.ZeroInt()

bz, err := math.Int(amount).Marshal()
bz, err := amount.Marshal()
suite.Require().NoError(err)
store.Set([]byte(fmt.Sprintf("wrong-prefix/%s", denom)), bz)
},
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/keeper/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"cosmossdk.io/store/prefix"
storetypes "cosmossdk.io/store/types"

banktypes "cosmossdk.io/x/bank/types"

"github.com/cosmos/cosmos-sdk/runtime"
sdk "github.com/cosmos/cosmos-sdk/types"

Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/keeper/migrations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"

sdkmath "cosmossdk.io/math"

banktestutil "cosmossdk.io/x/bank/testutil"
banktypes "cosmossdk.io/x/bank/types"

sdk "github.com/cosmos/cosmos-sdk/types"

internaltransfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/internal/types"
Expand Down
1 change: 1 addition & 0 deletions modules/apps/transfer/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

banktypes "cosmossdk.io/x/bank/types"
minttypes "cosmossdk.io/x/mint/types"

sdk "github.com/cosmos/cosmos-sdk/types"

abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/transfer/keeper/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"strings"

sdkmath "cosmossdk.io/math"

banktestutil "cosmossdk.io/x/bank/testutil"
banktypes "cosmossdk.io/x/bank/types"
minttypes "cosmossdk.io/x/mint/types"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

Expand Down
3 changes: 2 additions & 1 deletion modules/apps/transfer/simulation/proposals.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"math/rand"

coreaddress "cosmossdk.io/core/address"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/address"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
Expand Down Expand Up @@ -33,7 +34,7 @@ func ProposalMsgs() []simtypes.WeightedProposalMsg {

// SimulateMsgUpdateParams returns a MsgUpdateParams
func SimulateMsgUpdateParams(_ context.Context, _ *rand.Rand, _ []simtypes.Account, accCdc coreaddress.Codec) (sdk.Msg, error) {
var gov = address.Module("gov")
gov := address.Module("gov")
govString, err := accCdc.BytesToString(gov)
if err != nil {
return nil, err
Expand Down
Loading

0 comments on commit 26d765e

Please sign in to comment.