Skip to content

Commit 7e0ad1e

Browse files
authored
Merge pull request #884 from comdex-official/v14upgrade
skip block sdk, params migration
2 parents 1ac9a48 + 5eced3f commit 7e0ad1e

File tree

208 files changed

+7278
-2822
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+7278
-2822
lines changed

.DS_Store

-8 KB
Binary file not shown.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up Go 1.x
2727
uses: actions/setup-go@v4.0.1
2828
with:
29-
go-version: 1.20.5
29+
go-version: 1.21.7
3030
id: go
3131

3232
- name: Check out code into the Go module directory˛˜

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@v3
2020
- uses: actions/setup-go@v4.0.1
2121
with:
22-
go-version: 1.20.5
22+
go-version: 1.21.7
2323
# Initializes the CodeQL tools for scanning.
2424
- name: Initialize CodeQL
2525
uses: github/codeql-action/init@v2

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- uses: actions/setup-go@v4.0.1
2121
with:
22-
go-version: 1.20.5 # we run the linter with go 1.20 to match dev laptops even though we use 1.18 for the chain (don't update the chain to 1.19 please-- there is an issue in golang causing 1.19 to output some hashes differently from 1.18)
22+
go-version: 1.21.7 # we run the linter with go 1.21 to match dev laptops even though we use 1.18 for the chain (don't update the chain to 1.19 please-- there is an issue in golang causing 1.19 to output some hashes differently from 1.18)
2323
- uses: actions/checkout@v3
2424
- name: golangci-lint
2525
uses: golangci/golangci-lint-action@v3

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Go 1.x
1717
uses: actions/setup-go@v4.0.1
1818
with:
19-
go-version: 1.20.5
19+
go-version: 1.21.7
2020
id: go
2121

2222
- name: Check out code into the Go module directory

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
name: Setup Golang
4242
uses: actions/setup-go@v4.0.1
4343
with:
44-
go-version: 1.20.5
44+
go-version: 1.21.7
4545
-
4646
name: Display go version
4747
run: go version

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ GOBIN = $(shell go env GOPATH)/bin
2424
GOARCH = $(shell go env GOARCH)
2525
GOOS = $(shell go env GOOS)
2626
GO_MINOR_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2)
27+
GO_MINIMUM_MINOR_VERSION = $(shell cat go.mod | grep -E 'go [0-9].[0-9]+' | cut -d ' ' -f2 | cut -d'.' -f2)
2728

2829
export GO111MODULE = on
2930

@@ -94,8 +95,8 @@ endif
9495
#$(info $$BUILD_FLAGS is [$(BUILD_FLAGS)])
9596

9697
check_version:
97-
ifneq ($(GO_MINOR_VERSION),20)
98-
@echo "ERROR: Please upgrade Go version to 1.20+"
98+
ifneq ($(GO_MINIMUM_MINOR_VERSION),21)
99+
@echo "ERROR: Please upgrade Go version to 1.21+"
99100
exit 1
100101
endif
101102

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you have technical questions or concerns, ask a developer or community member
2828

2929
### Installation
3030

31-
Requires [Go 1.20+](https://golang.org/dl/)
31+
Requires [Go 1.21+](https://golang.org/dl/)
3232

3333
### Linux
3434

app/ante.go

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,47 @@
11
package app
22

33
import (
4-
"github.com/CosmWasm/wasmd/x/wasm"
4+
errorsmod "cosmossdk.io/errors"
55
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
6+
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
67
"github.com/comdex-official/comdex/app/decorators"
78
"github.com/cosmos/cosmos-sdk/codec"
9+
storetypes "github.com/cosmos/cosmos-sdk/store/types"
810
sdk "github.com/cosmos/cosmos-sdk/types"
911
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
1012
"github.com/cosmos/cosmos-sdk/x/auth/ante"
1113
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
1214
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
1315
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
14-
storetypes "github.com/cosmos/cosmos-sdk/store/types"
16+
auctionanteskip "github.com/skip-mev/block-sdk/x/auction/ante"
17+
auctionkeeperskip "github.com/skip-mev/block-sdk/x/auction/keeper"
1518
)
1619

1720
// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
1821
// channel keeper.
1922
type HandlerOptions struct {
2023
ante.HandlerOptions
21-
wasmConfig wasm.Config
24+
wasmConfig wasmtypes.WasmConfig
2225
txCounterStoreKey storetypes.StoreKey
2326
IBCChannelKeeper *ibckeeper.Keeper
2427
GovKeeper govkeeper.Keeper
2528
Cdc codec.BinaryCodec
29+
30+
MEVLane auctionanteskip.MEVLane
31+
TxDecoder sdk.TxDecoder
32+
TxEncoder sdk.TxEncoder
33+
auctionkeeperskip auctionkeeperskip.Keeper
2634
}
2735

2836
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
2937
if options.AccountKeeper == nil {
30-
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "account keeper is required for AnteHandler")
38+
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "account keeper is required for AnteHandler")
3139
}
3240
if options.BankKeeper == nil {
33-
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "bank keeper is required for AnteHandler")
41+
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "bank keeper is required for AnteHandler")
3442
}
3543
if options.SignModeHandler == nil {
36-
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
44+
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
3745
}
3846

3947
sigGasConsumer := options.SigGasConsumer
@@ -59,6 +67,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
5967
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
6068
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
6169
ibcante.NewRedundantRelayDecorator(options.IBCChannelKeeper),
70+
auctionanteskip.NewAuctionDecorator(options.auctionkeeperskip, options.TxEncoder, options.MEVLane),
6271
}
6372

6473
return sdk.ChainAnteDecorators(anteDecorators...), nil

0 commit comments

Comments
 (0)