Skip to content

Commit cbfeec5

Browse files
fixed lint errors
1 parent f55c382 commit cbfeec5

27 files changed

Lines changed: 43 additions & 58 deletions

simapp/app_config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ import (
3939
_ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects
4040
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
4141
distrmodulev1 "github.com/cosmos/cosmos-sdk/x/distribution/types/module"
42+
_ "github.com/cosmos/cosmos-sdk/x/dynamicfee" // import for side-effects
43+
dynamicfeetypes "github.com/cosmos/cosmos-sdk/x/dynamicfee/types"
44+
dynamicfeemodulev1 "github.com/cosmos/cosmos-sdk/x/dynamicfee/types/module"
4245
_ "github.com/cosmos/cosmos-sdk/x/epochs" // import for side-effects
4346
epochstypes "github.com/cosmos/cosmos-sdk/x/epochs/types"
4447
epochsmodulev1 "github.com/cosmos/cosmos-sdk/x/epochs/types/module"
@@ -62,9 +65,6 @@ import (
6265
_ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects
6366
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
6467
stakingmodulev1 "github.com/cosmos/cosmos-sdk/x/staking/types/module"
65-
_ "github.com/cosmos/cosmos-sdk/x/dynamicfee"
66-
dynamicfeetypes "github.com/cosmos/cosmos-sdk/x/dynamicfee/types"
67-
dynamicfeemodulev1 "github.com/cosmos/cosmos-sdk/x/dynamicfee/types/module"
6868
)
6969

7070
var (
@@ -244,7 +244,7 @@ var (
244244
Config: appconfig.WrapAny(&epochsmodulev1.Module{}),
245245
},
246246
{
247-
Name: dynamicfeetypes.ModuleName,
247+
Name: dynamicfeetypes.ModuleName,
248248
Config: appconfig.WrapAny(&dynamicfeemodulev1.Module{}),
249249
},
250250
},

simapp/app_di.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ import (
3434
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
3535
consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
3636
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
37+
dynamicfeekeeper "github.com/cosmos/cosmos-sdk/x/dynamicfee/keeper"
3738
epochskeeper "github.com/cosmos/cosmos-sdk/x/epochs/keeper"
3839
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
3940
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
4041
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
4142
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
4243
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
4344
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
44-
dynamicfeekeeper "github.com/cosmos/cosmos-sdk/x/dynamicfee/keeper"
4545
)
4646

4747
// DefaultNodeHome default home directories for the application daemon

simapp/app_test.go

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ import (
4141
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
4242
"github.com/cosmos/cosmos-sdk/x/distribution"
4343
disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
44+
"github.com/cosmos/cosmos-sdk/x/dynamicfee"
45+
dynamicfeetypes "github.com/cosmos/cosmos-sdk/x/dynamicfee/types"
4446
"github.com/cosmos/cosmos-sdk/x/epochs"
4547
epochstypes "github.com/cosmos/cosmos-sdk/x/epochs/types"
4648
"github.com/cosmos/cosmos-sdk/x/genutil"
@@ -55,8 +57,6 @@ import (
5557
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
5658
"github.com/cosmos/cosmos-sdk/x/staking"
5759
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
58-
"github.com/cosmos/cosmos-sdk/x/dynamicfee"
59-
dynamicfeetypes "github.com/cosmos/cosmos-sdk/x/dynamicfee/types"
6060
)
6161

6262
func TestSimAppExportAndBlockedAddrs(t *testing.T) {
@@ -210,22 +210,22 @@ func TestRunMigrations(t *testing.T) {
210210
_, err = app.ModuleManager.RunMigrations(
211211
app.NewContextLegacy(true, cmtproto.Header{Height: app.LastBlockHeight()}), configurator,
212212
module.VersionMap{
213-
banktypes.ModuleName: 1,
214-
authtypes.ModuleName: auth.AppModule{}.ConsensusVersion(),
215-
authz.ModuleName: authzmodule.AppModule{}.ConsensusVersion(),
216-
stakingtypes.ModuleName: staking.AppModule{}.ConsensusVersion(),
217-
minttypes.ModuleName: mint.AppModule{}.ConsensusVersion(),
218-
disttypes.ModuleName: distribution.AppModule{}.ConsensusVersion(),
219-
slashingtypes.ModuleName: slashing.AppModule{}.ConsensusVersion(),
220-
govtypes.ModuleName: gov.AppModule{}.ConsensusVersion(),
221-
paramstypes.ModuleName: params.AppModule{}.ConsensusVersion(),
222-
upgradetypes.ModuleName: upgrade.AppModule{}.ConsensusVersion(),
223-
vestingtypes.ModuleName: vesting.AppModule{}.ConsensusVersion(),
224-
feegrant.ModuleName: feegrantmodule.AppModule{}.ConsensusVersion(),
225-
evidencetypes.ModuleName: evidence.AppModule{}.ConsensusVersion(),
226-
genutiltypes.ModuleName: genutil.AppModule{}.ConsensusVersion(),
227-
epochstypes.ModuleName: epochs.AppModule{}.ConsensusVersion(),
228-
dynamicfeetypes.ModuleName: dynamicfee.AppModule{}.ConsensusVersion(),
213+
banktypes.ModuleName: 1,
214+
authtypes.ModuleName: auth.AppModule{}.ConsensusVersion(),
215+
authz.ModuleName: authzmodule.AppModule{}.ConsensusVersion(),
216+
stakingtypes.ModuleName: staking.AppModule{}.ConsensusVersion(),
217+
minttypes.ModuleName: mint.AppModule{}.ConsensusVersion(),
218+
disttypes.ModuleName: distribution.AppModule{}.ConsensusVersion(),
219+
slashingtypes.ModuleName: slashing.AppModule{}.ConsensusVersion(),
220+
govtypes.ModuleName: gov.AppModule{}.ConsensusVersion(),
221+
paramstypes.ModuleName: params.AppModule{}.ConsensusVersion(),
222+
upgradetypes.ModuleName: upgrade.AppModule{}.ConsensusVersion(),
223+
vestingtypes.ModuleName: vesting.AppModule{}.ConsensusVersion(),
224+
feegrant.ModuleName: feegrantmodule.AppModule{}.ConsensusVersion(),
225+
evidencetypes.ModuleName: evidence.AppModule{}.ConsensusVersion(),
226+
genutiltypes.ModuleName: genutil.AppModule{}.ConsensusVersion(),
227+
epochstypes.ModuleName: epochs.AppModule{}.ConsensusVersion(),
228+
dynamicfeetypes.ModuleName: dynamicfee.AppModule{}.ConsensusVersion(),
229229
},
230230
)
231231
if tc.expRunErr {
@@ -274,7 +274,7 @@ func TestInitGenesisOnMigration(t *testing.T) {
274274
"feegrant": feegrantmodule.AppModule{}.ConsensusVersion(),
275275
"evidence": evidence.AppModule{}.ConsensusVersion(),
276276
"genutil": genutil.AppModule{}.ConsensusVersion(),
277-
"dynamicfee": dynamicfee.AppModule{}.ConsensusVersion(),
277+
"dynamicfee": dynamicfee.AppModule{}.ConsensusVersion(),
278278
},
279279
)
280280
require.NoError(t, err)

testutil/configurator/configurator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ import (
1818
bankmodulev1 "github.com/cosmos/cosmos-sdk/x/bank/types/module"
1919
consensusmodulev1 "github.com/cosmos/cosmos-sdk/x/consensus/types/module"
2020
distrmodulev1 "github.com/cosmos/cosmos-sdk/x/distribution/types/module"
21+
dynamicfeemodulev1 "github.com/cosmos/cosmos-sdk/x/dynamicfee/types/module"
2122
genutilmodulev1 "github.com/cosmos/cosmos-sdk/x/genutil/types/module"
2223
govmodulev1 "github.com/cosmos/cosmos-sdk/x/gov/types/module"
2324
mintmodulev1 "github.com/cosmos/cosmos-sdk/x/mint/types/module"
2425
paramsmodulev1 "github.com/cosmos/cosmos-sdk/x/params/types/module"
2526
slashingmodulev1 "github.com/cosmos/cosmos-sdk/x/slashing/types/module"
2627
stakingmodulev1 "github.com/cosmos/cosmos-sdk/x/staking/types/module"
27-
dynamicfeemodulev1 "github.com/cosmos/cosmos-sdk/x/dynamicfee/types/module"
2828
)
2929

3030
// Config should never need to be instantiated manually and is solely used for ModuleOption.

x/dynamicfee/ante/expected_keepers.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55

66
sdk "github.com/cosmos/cosmos-sdk/types"
7-
87
"github.com/cosmos/cosmos-sdk/x/dynamicfee/types"
98
)
109

x/dynamicfee/ante/fee.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
sdk "github.com/cosmos/cosmos-sdk/types"
1111
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
1212
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
13-
1413
"github.com/cosmos/cosmos-sdk/x/dynamicfee/types"
1514
)
1615

@@ -229,7 +228,7 @@ func (dfd dynamicfeeCheckDecorator) DeductFees(ctx sdk.Context, sdkTx sdk.Tx, pr
229228
// CheckTxFee implements the logic for the dynamic fee pricing to check if a Tx
230229
// has provided sufficient fees given the current state of the dynamic fee
231230
// pricer. Returns an error if insufficient fees.
232-
func CheckTxFee(ctx sdk.Context, gasPrice sdk.DecCoin, feeCoin sdk.Coin, feeGas int64) error {
231+
func CheckTxFee(_ sdk.Context, gasPrice sdk.DecCoin, feeCoin sdk.Coin, feeGas int64) error {
233232
// Ensure that the provided fees meet the minimum
234233
if !gasPrice.IsZero() {
235234
var requiredFee sdk.Coin

x/dynamicfee/ante/fee_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ import (
55
"fmt"
66
"testing"
77

8+
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
9+
"github.com/cosmos/gogoproto/proto"
810
"github.com/golang/mock/gomock"
911
"github.com/stretchr/testify/assert"
1012
"github.com/stretchr/testify/require"
1113

1214
"cosmossdk.io/log"
13-
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
14-
1515
xtxsigning "cosmossdk.io/x/tx/signing"
16+
1617
"github.com/cosmos/cosmos-sdk/codec"
1718
"github.com/cosmos/cosmos-sdk/codec/address"
1819
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
@@ -22,8 +23,6 @@ import (
2223
"github.com/cosmos/cosmos-sdk/types/tx/signing"
2324
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
2425
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
25-
"github.com/cosmos/gogoproto/proto"
26-
2726
"github.com/cosmos/cosmos-sdk/x/dynamicfee/ante"
2827
"github.com/cosmos/cosmos-sdk/x/dynamicfee/types"
2928
)

x/dynamicfee/client/cli/query.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77

88
"github.com/cosmos/cosmos-sdk/client"
99
"github.com/cosmos/cosmos-sdk/client/flags"
10-
1110
"github.com/cosmos/cosmos-sdk/x/dynamicfee/types"
1211
)
1312

x/dynamicfee/fuzz/eip1559_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"pgregory.net/rapid"
88

99
"cosmossdk.io/log"
10-
1110
"cosmossdk.io/math"
1211

1312
"github.com/cosmos/cosmos-sdk/x/dynamicfee/types"

x/dynamicfee/fuzz/tx_priority_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import (
44
"math"
55
"testing"
66

7-
sdkmath "cosmossdk.io/math"
8-
sdk "github.com/cosmos/cosmos-sdk/types"
97
"github.com/stretchr/testify/require"
108
"pgregory.net/rapid"
119

10+
sdkmath "cosmossdk.io/math"
11+
12+
sdk "github.com/cosmos/cosmos-sdk/types"
1213
"github.com/cosmos/cosmos-sdk/x/dynamicfee/ante"
1314
)
1415

0 commit comments

Comments
 (0)