Skip to content

Commit 8a1d51a

Browse files
WIP: fix few more issues
1 parent d5b6904 commit 8a1d51a

21 files changed

Lines changed: 272 additions & 267 deletions

File tree

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ifeq (,$(VERSION))
1616
endif
1717

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

2121
LEDGER_ENABLED ?= true
2222
DB_BACKEND ?= goleveldb
@@ -103,7 +103,7 @@ ifeq ($(DB_BACKEND), badgerdb)
103103
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=badgerdb
104104
endif
105105

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

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

ante/fee_test.go

Lines changed: 80 additions & 79 deletions
Large diffs are not rendered by default.

ante/feeburn.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package ante
22

33
import (
4+
sdkmath "cosmossdk.io/math"
45
sdk "github.com/cosmos/cosmos-sdk/types"
56
)
67

7-
func GetBurnFeePortion(burnFactor sdk.Dec, fee sdk.Coins) sdk.Coins {
8+
func GetBurnFeePortion(burnFactor sdkmath.LegacyDec, fee sdk.Coins) sdk.Coins {
89
feeDecCoins := sdk.NewDecCoinsFromCoins(fee...)
910

1011
burnFeePortion, _ := feeDecCoins.MulDec(burnFactor).TruncateDecimal()

ante/feedistrib.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func ValidateDistributionFee(fee sdk.Coins, distrFeeAlloc DistributionFeeAllocat
4444
return errorsmod.Wrap(sdkerrors.ErrInsufficientFee, "fee cannot be zero")
4545
}
4646

47-
if !fee.IsEqual(SumDistributionFee(distrFeeAlloc)) {
47+
if !fee.Equal(SumDistributionFee(distrFeeAlloc)) {
4848
return errorsmod.Wrap(sdkerrors.ErrLogic, "fee distribution is invalid")
4949
}
5050

ante/testutil_test.go

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66

77
"cosmossdk.io/math"
8-
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
98
"github.com/skip-mev/feemarket/x/feemarket/types"
109
"github.com/stretchr/testify/suite"
1110

@@ -83,8 +82,8 @@ func createTestApp(isCheckTx bool) (*cheqdapp.TestApp, sdk.Context, error) {
8382
if err != nil {
8483
return nil, sdk.Context{}, err
8584
}
86-
ctx := app.BaseApp.NewContext(isCheckTx, tmproto.Header{})
87-
err = app.AccountKeeper.SetParams(ctx, authtypes.DefaultParams())
85+
ctx := app.BaseApp.NewContext(isCheckTx)
86+
err = app.AccountKeeper.Params.Set(ctx, authtypes.DefaultParams())
8887
if err != nil {
8988
return nil, sdk.Context{}, err
9089
}
@@ -111,14 +110,12 @@ func (s *AnteTestSuite) SetupTest(isCheckTx bool) error {
111110
return err
112111
}
113112
s.ctx = s.ctx.WithBlockHeight(1)
114-
// Set up TxConfig.
115-
encodingConfig := cheqdapp.MakeTestEncodingConfig()
116113
// We're using TestMsg encoding in some tests, so register it here.
117-
encodingConfig.Amino.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil)
118-
testdata.RegisterInterfaces(encodingConfig.InterfaceRegistry)
114+
s.app.LegacyAmino().Amino.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil)
115+
testdata.RegisterInterfaces(s.app.InterfaceRegistry())
119116

120117
s.clientCtx = client.Context{}.
121-
WithTxConfig(encodingConfig.TxConfig)
118+
WithTxConfig(s.app.TxConfig())
122119

123120
anteHandler, err := cheqdapp.NewAnteHandler(
124121
cheqdapp.HandlerOptions{
@@ -127,7 +124,7 @@ func (s *AnteTestSuite) SetupTest(isCheckTx bool) error {
127124
FeegrantKeeper: s.app.FeeGrantKeeper,
128125
DidKeeper: s.app.DidKeeper,
129126
ResourceKeeper: s.app.ResourceKeeper,
130-
SignModeHandler: encodingConfig.TxConfig.SignModeHandler(),
127+
SignModeHandler: s.app.TxConfig().SignModeHandler(),
131128
SigGasConsumer: sdkante.DefaultSigVerificationGasConsumer,
132129
IBCKeeper: s.app.IBCKeeper,
133130
FeeMarketKeeper: s.app.FeeMarketKeeper,
@@ -182,7 +179,7 @@ func (s *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums []uint
182179
sigV2 := signing.SignatureV2{
183180
PubKey: priv.PubKey(),
184181
Data: &signing.SingleSignatureData{
185-
SignMode: s.clientCtx.TxConfig.SignModeHandler().DefaultMode(),
182+
SignMode: signing.SignMode(s.clientCtx.TxConfig.SignModeHandler().DefaultMode()),
186183
Signature: nil,
187184
},
188185
Sequence: accSeqs[i],
@@ -203,8 +200,8 @@ func (s *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums []uint
203200
AccountNumber: accNums[i],
204201
Sequence: accSeqs[i],
205202
}
206-
sigV2, err := tx.SignWithPrivKey(
207-
s.clientCtx.TxConfig.SignModeHandler().DefaultMode(), signerData,
203+
sigV2, err := tx.SignWithPrivKey(s.ctx,
204+
signing.SignMode(s.clientCtx.TxConfig.SignModeHandler().DefaultMode()), signerData,
208205
s.txBuilder, priv, s.clientCtx.TxConfig, accSeqs[i])
209206
if err != nil {
210207
return nil, err

api/cheqd/did/v2/fee.pulsar.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/cheqd/did/v2/query.pulsar.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/cheqd/did/v2/tx.pulsar.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/cheqd/resource/v2/fee.pulsar.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/cheqd/resource/v2/query.pulsar.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)