Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/linters/.golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
run:
timeout: 10m

go: "1.23"

linters:
enable:
- bodyclose
- copyloopvar
- depguard
- dogsled
- errcheck
- exportloopref
- goconst
- gocritic
- gofumpt
Expand Down Expand Up @@ -47,18 +47,13 @@ linters-settings:
- regexpMust
- badCall # Remove this after CI workflow PR

gofumpt:
lang-version: "1.21"

misspell:
ignore-words:
- cheqd
- cheq
- ncheq

stylecheck:
# Select the Go version to target.
go: "1.21"
# STxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
# Default: ["*"]
checks: ["all"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.23

- uses: actions/checkout@v4
with:
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ifeq (,$(VERSION))
endif

SDK_VERSION := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's:.* ::')
TM_VERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::')
CMT_VERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::')

LEDGER_ENABLED ?= true
DB_BACKEND ?= goleveldb
Expand Down Expand Up @@ -103,7 +103,7 @@ ifeq ($(DB_BACKEND), badgerdb)
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=badgerdb
endif

ldflags += -X github.com/cometbft/cometbft/version.TMCoreSemVer=$(TM_VERSION)
ldflags += -X github.com/cometbft/cometbft/version.TMCoreSemVer=$(CMT_VERSION)

ifeq ($(NO_STRIP),false)
ldflags += -w -s
Expand Down Expand Up @@ -149,7 +149,7 @@ clean:
GO_MAJOR_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1)
GO_MINOR_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)
MIN_GO_MAJOR_VERSION = 1
MIN_GO_MINOR_VERSION = 18
MIN_GO_MINOR_VERSION = 22
GO_VERSION_ERROR = Golang version $(GO_MAJOR_VERSION).$(GO_MINOR_VERSION) is not supported, \
please update to at least $(MIN_GO_MAJOR_VERSION).$(MIN_GO_MINOR_VERSION)

Expand Down Expand Up @@ -203,7 +203,7 @@ generate:
###############################################################################


golangci_version=v1.56.2
golangci_version=v1.60.3

lint:
@echo "--> Running linter"
Expand Down
10 changes: 6 additions & 4 deletions ante/ante_feeabs_feemarket.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ante

import (
feeabskeeper "github.com/osmosis-labs/fee-abstraction/v7/x/feeabs/keeper"
feeabstypes "github.com/osmosis-labs/fee-abstraction/v7/x/feeabs/types"
feeabskeeper "github.com/osmosis-labs/fee-abstraction/v8/x/feeabs/keeper"
feeabstypes "github.com/osmosis-labs/fee-abstraction/v8/x/feeabs/types"
feemarkettypes "github.com/skip-mev/feemarket/x/feemarket/types"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -21,14 +21,16 @@ var _ feemarkettypes.DenomResolver = &DenomResolverImpl{}
// If the denom is the bond denom, convert `coin` to the native denom. return error if coin.Denom is not in the allowed list
// If the denom is not the bond denom, convert the `coin` to the given denom. return error if denom is not in the allowed list
func (r *DenomResolverImpl) ConvertToDenom(ctx sdk.Context, coin sdk.DecCoin, denom string) (sdk.DecCoin, error) {
bondDenom := r.StakingKeeper.BondDenom(ctx)
bondDenom, err := r.StakingKeeper.BondDenom(ctx)
if err != nil {
return sdk.DecCoin{}, err
}
if denom != bondDenom && coin.Denom != bondDenom {
return sdk.DecCoin{}, ErrNeitherNativeDenom(coin.Denom, denom)
}
var amount sdk.Coins
var hostZoneConfig feeabstypes.HostChainFeeAbsConfig
var found bool
var err error

if denom == bondDenom {
hostZoneConfig, found = r.FeeabsKeeper.GetHostZoneConfig(ctx, coin.Denom)
Expand Down
39 changes: 16 additions & 23 deletions ante/expected_keepers.go
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
package ante

import (
"context"

"cosmossdk.io/core/address"
didtypes "github.com/cheqd/cheqd-node/x/did/types"
resourcetypes "github.com/cheqd/cheqd-node/x/resource/types"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
feemarkettypes "github.com/skip-mev/feemarket/x/feemarket/types"
)

type BankKeeper interface {
GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin

SendCoins(ctx sdk.Context, from, to sdk.AccAddress, amt sdk.Coins) error
SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error
IsSendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error
SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
}

type DidKeeper interface {
GetParams(ctx sdk.Context) (params didtypes.FeeParams)
}
Expand All @@ -27,22 +19,23 @@ type ResourceKeeper interface {
GetParams(ctx sdk.Context) (params resourcetypes.FeeParams)
}
type AccountKeeper interface {
GetParams(ctx sdk.Context) (params authtypes.Params)
GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
SetAccount(ctx sdk.Context, acc authtypes.AccountI)
GetParams(ctx context.Context) (params authtypes.Params)
GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI
SetAccount(ctx context.Context, acc sdk.AccountI)
GetModuleAddress(moduleName string) sdk.AccAddress
GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI
NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
GetModuleAccount(ctx context.Context, name string) sdk.ModuleAccountI
NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI
AddressCodec() address.Codec
}
type FeeGrantKeeper interface {
UseGrantedFees(ctx sdk.Context, granter, grantee sdk.AccAddress, fee sdk.Coins, msgs []sdk.Msg) error
UseGrantedFees(ctx context.Context, granter, grantee sdk.AccAddress, fee sdk.Coins, msgs []sdk.Msg) error
}

type FeeMarketKeeper interface {
GetState(ctx sdk.Context) (feemarkettypes.State, error)
GetMinGasPrice(ctx sdk.Context, denom string) (sdk.DecCoin, error)
GetParams(ctx sdk.Context) (feemarkettypes.Params, error)
SetState(ctx sdk.Context, state feemarkettypes.State) error
SetParams(ctx sdk.Context, params feemarkettypes.Params) error
ResolveToDenom(ctx sdk.Context, coin sdk.DecCoin, denom string) (sdk.DecCoin, error)
GetState(ctx context.Context) (feemarkettypes.State, error)
GetMinGasPrice(ctx context.Context, denom string) (sdk.DecCoin, error)
GetParams(ctx context.Context) (feemarkettypes.Params, error)
SetState(ctx context.Context, state feemarkettypes.State) error
SetParams(ctx context.Context, params feemarkettypes.Params) error
ResolveToDenom(ctx context.Context, coin sdk.DecCoin, denom string) (sdk.DecCoin, error)
}
Loading
Loading