Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WILL NOT BE MERGED] Kava v0.50.10 patch #84

Open
wants to merge 81 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
b0cd15a
wip: upgrade kava to sdk v0.50
boodyvo Oct 17, 2024
201b669
wip: upgrade kava to sdk v0.50
boodyvo Oct 17, 2024
0c7c61e
wip: testing cdp
boodyvo Oct 18, 2024
a621660
wip: testing cdp
boodyvo Oct 18, 2024
50aa71d
wip: internal debug
boodyvo Oct 23, 2024
f5b62d8
wip: comment parts trying to run app
boodyvo Oct 24, 2024
2269119
kava-v0.50.10-patch
boodyvo Oct 24, 2024
25d6caa
wip: updated the server and cmd to run in kava
boodyvo Oct 25, 2024
fb08046
wip: updated cmd running
boodyvo Oct 25, 2024
832c489
wip: remoe autocli to test build
boodyvo Oct 25, 2024
4436cd5
wip: added autocli to test build
boodyvo Oct 25, 2024
333bd3f
wip: added autocli to test build
boodyvo Oct 25, 2024
2d95f1f
wip: add debug print
boodyvo Oct 25, 2024
c69c04d
wip: add debug print
boodyvo Oct 25, 2024
079f8e3
wip: update init codec
boodyvo Oct 25, 2024
f7bb2cf
wip: update init codec
boodyvo Oct 25, 2024
4b6d2f4
wip: update init codec
boodyvo Oct 25, 2024
75ad2ff
wip: update init codec
boodyvo Oct 25, 2024
373e83d
wip: update tests and initialization
boodyvo Oct 28, 2024
1024e8a
wip: update tests and initialization
boodyvo Oct 28, 2024
1f4a7f8
wip: update tests and initialization
boodyvo Oct 28, 2024
8432ffc
wip: update tests and initialization
boodyvo Oct 28, 2024
cf40f6a
wip: update tests and initialization
boodyvo Oct 28, 2024
11868d1
wip: update tests and initialization
boodyvo Oct 28, 2024
15f1577
wip: update tests and initialization
boodyvo Oct 28, 2024
4bc8eda
wip: update tests and initialization
boodyvo Oct 28, 2024
2a4e155
wip: update tests and initialization
boodyvo Oct 28, 2024
6c194e8
wip: update tests and initialization
boodyvo Oct 28, 2024
67b2605
wip: update tests and initialization
boodyvo Oct 28, 2024
4bc25e1
wip: update tests and initialization
boodyvo Oct 28, 2024
89620ec
wip: update tests and initialization
boodyvo Oct 28, 2024
69345c2
wip: update tests and initialization
boodyvo Oct 28, 2024
85f6cfc
wip: update tests and initialization
boodyvo Oct 28, 2024
14df430
wip: remove extra logging
boodyvo Oct 28, 2024
1511a6a
wip: remove extra logging
boodyvo Oct 28, 2024
46b887f
wip: remove logging
boodyvo Oct 30, 2024
8f2e114
wip: update ante handler
boodyvo Oct 30, 2024
6a2ba62
wip: update ante handler
boodyvo Oct 31, 2024
499be6a
wip: update ante handler
boodyvo Oct 31, 2024
1ac1b4b
wip: update ante handler
boodyvo Oct 31, 2024
502c6dd
wip: update ante handler
boodyvo Oct 31, 2024
63d9779
wip: update message signer
boodyvo Oct 31, 2024
59969b9
wip: update message signer
boodyvo Oct 31, 2024
9e57cd0
wip: update message signer
boodyvo Oct 31, 2024
55cd499
wip: update message signer
boodyvo Oct 31, 2024
9ee867b
wip: update message signer
boodyvo Oct 31, 2024
9391f34
wip: update message signer
boodyvo Oct 31, 2024
cdf7a45
wip: update message signer
boodyvo Oct 31, 2024
10fd039
wip: update message signer
boodyvo Oct 31, 2024
ec7c54a
wip: update message signer
boodyvo Oct 31, 2024
b7c073c
wip: update message signer
boodyvo Nov 1, 2024
20b8c1d
wip: update message signer
boodyvo Nov 1, 2024
bc73f5d
wip: update message signer
boodyvo Nov 1, 2024
089b759
wip: update message signer
boodyvo Nov 1, 2024
c9235ea
wip: update message signer
boodyvo Nov 1, 2024
9d5e2d3
wip: update message signer
boodyvo Nov 1, 2024
9c8b42a
wip: update message signer
boodyvo Nov 1, 2024
884c77e
wip: update message signer
boodyvo Nov 1, 2024
8661160
wip: update message signer
boodyvo Nov 1, 2024
16c3e6b
wip: update message signer
boodyvo Nov 1, 2024
ca5f805
wip: update message signer
boodyvo Nov 1, 2024
3e698f0
wip: update message signer
boodyvo Nov 1, 2024
1bf06ae
wip: update message signer
boodyvo Nov 1, 2024
90d593b
wip: update message signer
boodyvo Nov 1, 2024
84fa563
wip: update message signer
boodyvo Nov 1, 2024
0a8c606
wip: update signing
boodyvo Nov 4, 2024
8a2ef3e
wip: update signing
boodyvo Nov 4, 2024
42abf87
wip: update e2e test for debugging
boodyvo Nov 4, 2024
8eda2c9
wip: update e2e test for debugging
boodyvo Nov 4, 2024
7c83cdc
wip: update e2e test for debugging
boodyvo Nov 4, 2024
65dd3df
wip: update e2e test for debugging
boodyvo Nov 4, 2024
bb02c25
wip: update e2e test for debugging
boodyvo Nov 4, 2024
17663a0
wip: update e2e test for debugging
boodyvo Nov 4, 2024
8128d9e
wip: update e2e test for debugging
boodyvo Nov 4, 2024
46860cc
wip: update e2e test for debugging
boodyvo Nov 5, 2024
2b40405
wip: add cdp signers
boodyvo Nov 5, 2024
88c6096
wip: add debug for handler
boodyvo Nov 6, 2024
d910f31
wip: add debug for handler
boodyvo Nov 7, 2024
d8ee91e
wip: removed one debug log
boodyvo Nov 7, 2024
986ef50
wip: removed one debug log
boodyvo Nov 12, 2024
b04d78f
wip: add logging to debug traces
boodyvo Nov 14, 2024
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
7 changes: 4 additions & 3 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
package ante

import (
storetypes "cosmossdk.io/store/types"
"fmt"
"runtime/debug"

tmlog "github.com/cometbft/cometbft/libs/log"
tmlog "cosmossdk.io/log"

errorsmod "cosmossdk.io/errors"
"github.com/cosmos/cosmos-sdk/crypto/types/multisig"
Expand Down Expand Up @@ -114,7 +115,7 @@ var _ authante.SignatureVerificationGasConsumer = DefaultSigVerificationGasConsu
// for signature verification based upon the public key type. The cost is fetched from the given params and is matched
// by the concrete type.
func DefaultSigVerificationGasConsumer(
meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params,
meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params,
) error {
pubkey := sig.PubKey
switch pubkey := pubkey.(type) {
Expand All @@ -137,7 +138,7 @@ func DefaultSigVerificationGasConsumer(

// ConsumeMultisignatureVerificationGas consumes gas from a GasMeter for verifying a multisig pubkey signature
func ConsumeMultisignatureVerificationGas(
meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey,
meter storetypes.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey,
params authtypes.Params, accSeq uint64,
) error {
size := sig.BitArray.Count()
Expand Down
2 changes: 1 addition & 1 deletion app/ante/ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
)

func (suite AnteTestSuite) TestAnteHandler() {
var acc authtypes.AccountI
var acc sdk.AccountI
addr, privKey := tests.NewAddrKey()
to := tests.GenerateAddress()

Expand Down
16 changes: 10 additions & 6 deletions app/ante/eip712.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package ante

import (
txsigning "cosmossdk.io/x/tx/signing"
"fmt"

errorsmod "cosmossdk.io/errors"
Expand All @@ -27,7 +28,7 @@ import (
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"

ethcrypto "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/secp256k1"
Expand Down Expand Up @@ -76,14 +77,14 @@ func NewLegacyCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler {
// CONTRACT: Tx must implement SigVerifiableTx interface
type LegacyEip712SigVerificationDecorator struct {
ak evmtypes.AccountKeeper
signModeHandler authsigning.SignModeHandler
signModeHandler *txsigning.HandlerMap
evmKeeper EVMKeeper
}

// Deprecated: NewLegacyEip712SigVerificationDecorator creates a new LegacyEip712SigVerificationDecorator
func NewLegacyEip712SigVerificationDecorator(
ak evmtypes.AccountKeeper,
signModeHandler authsigning.SignModeHandler,
signModeHandler *txsigning.HandlerMap,
ek EVMKeeper,
) LegacyEip712SigVerificationDecorator {
return LegacyEip712SigVerificationDecorator{
Expand Down Expand Up @@ -122,7 +123,10 @@ func (svd LegacyEip712SigVerificationDecorator) AnteHandle(ctx sdk.Context,
return ctx, err
}

signerAddrs := sigTx.GetSigners()
signerAddrs, err := sigTx.GetSigners()
if err != nil {
return ctx, err
}

// EIP712 allows just one signature
if len(sigs) != 1 {
Expand Down Expand Up @@ -196,7 +200,7 @@ func VerifySignature(
pubKey cryptotypes.PubKey,
signerData authsigning.SignerData,
sigData signing.SignatureData,
_ authsigning.SignModeHandler,
_ *txsigning.HandlerMap,
tx authsigning.Tx,
params evmtypes.Params,
) error {
Expand Down Expand Up @@ -229,7 +233,7 @@ func VerifySignature(
Gas: tx.GetGas(),
},
msgs, tx.GetMemo(),
tx.GetTip(),
// tx.TipTx interface was removed, added types.TxWithTimeoutHeight, they have been deprecated and should not be used since v0.46.0
)

signerChainID, err := ethermint.ParseChainID(signerData.ChainID)
Expand Down
2 changes: 1 addition & 1 deletion app/ante/eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

// check whether the sender address is EOA
fromAddr := common.BytesToAddress(from)
acct := avd.evmKeeper.GetAccount(ctx, fromAddr)

Check failure on line 86 in app/ante/eth.go

View workflow job for this annotation

GitHub Actions / Run golangci-lint

avd.evmKeeper.GetAccount undefined (type EVMKeeper has no field or method GetAccount) (typecheck)

if acct == nil {
acc := avd.ak.NewAccountWithAddress(ctx, from)
Expand Down Expand Up @@ -302,7 +302,7 @@
BaseFee: baseFee,
}

stateDB := statedb.New(ctx, ctd.evmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash().Bytes())))
stateDB := statedb.New(ctx, ctd.evmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash())))
evm := ctd.evmKeeper.NewEVM(ctx, coreMsg, cfg, evmtypes.NewNoOpTracer(), stateDB)

// check that caller has enough balance to cover asset transfer for **topmost** call
Expand Down
2 changes: 1 addition & 1 deletion app/ante/fee_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

// Determine the required fees by multiplying each required minimum gas
// price by the gas limit, where fee = ceil(minGasPrice * gasLimit).
glDec := sdk.NewDec(int64(gas))
glDec := sdkmath.LegacyNewDec(int64(gas))

Check failure

Code scanning / gosec

Potential integer overflow by integer type conversion Error

Potential integer overflow by integer type conversion

for i, gp := range minGasPrices {
fee := gp.Amount.Mul(glDec)
Expand Down
4 changes: 2 additions & 2 deletions app/ante/fee_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/cometbft/cometbft/libs/log"
"cosmossdk.io/log"
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -52,7 +52,7 @@ func TestSDKTxFeeChecker(t *testing.T) {
// without extension option
// london hardfork enableness
encodingConfig := encoding.MakeConfig(module.NewBasicManager())
minGasPrices := sdk.NewDecCoins(sdk.NewDecCoin("aphoton", sdk.NewInt(10)))
minGasPrices := sdkmath.LegacyNewDecCoins(sdkmath.LegacyNewDecCoin("aphoton", sdk.NewInt(10)))

genesisCtx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger())
checkTxCtx := sdk.NewContext(nil, tmproto.Header{Height: 1}, true, log.NewNopLogger()).WithMinGasPrices(minGasPrices)
Expand Down
11 changes: 6 additions & 5 deletions app/ante/fees.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package ante

import (
sdkmath "cosmossdk.io/math"
"math/big"

errorsmod "cosmossdk.io/errors"
Expand Down Expand Up @@ -104,7 +105,7 @@ func (mpd MinGasPriceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate

// Determine the required fees by multiplying each required minimum gas
// price by the gas limit, where fee = ceil(minGasPrice * gasLimit).
gasLimit := sdk.NewDecFromBigInt(new(big.Int).SetUint64(gas))
gasLimit := sdkmath.LegacyNewDecFromBigInt(new(big.Int).SetUint64(gas))

for _, gp := range minGasPrices {
fee := gp.Amount.Mul(gasLimit).Ceil().RoundInt()
Expand Down Expand Up @@ -168,10 +169,10 @@ func (empd EthMinGasPriceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simul
feeAmt = ethMsg.GetEffectiveFee(baseFee)
}

gasLimit := sdk.NewDecFromBigInt(new(big.Int).SetUint64(ethMsg.GetGas()))
gasLimit := sdkmath.LegacyNewDecFromBigInt(new(big.Int).SetUint64(ethMsg.GetGas()))

requiredFee := minGasPrice.Mul(gasLimit)
fee := sdk.NewDecFromBigInt(feeAmt)
fee := sdkmath.LegacyNewDecFromBigInt(feeAmt)

if fee.LT(requiredFee) {
return ctx, errorsmod.Wrapf(
Expand Down Expand Up @@ -211,8 +212,8 @@ func (mfd EthMempoolFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulat
return ctx, errorsmod.Wrapf(errortypes.ErrUnknownRequest, "invalid message type %T, expected %T", msg, (*evmtypes.MsgEthereumTx)(nil))
}

fee := sdk.NewDecFromBigInt(ethMsg.GetFee())
gasLimit := sdk.NewDecFromBigInt(new(big.Int).SetUint64(ethMsg.GetGas()))
fee := sdkmath.LegacyNewDecFromBigInt(ethMsg.GetFee())
gasLimit := sdkmath.LegacyNewDecFromBigInt(new(big.Int).SetUint64(ethMsg.GetGas()))
requiredFee := minGasPrice.Mul(gasLimit)

if fee.LT(requiredFee) {
Expand Down
36 changes: 18 additions & 18 deletions app/ante/fees_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (s AnteTestSuite) TestMinGasPriceDecorator() {
"valid cosmos tx with MinGasPrices = 0, gasPrice = 0",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.ZeroDec()
params.MinGasPrice = sdkmath.LegacyZeroDec()
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

txBuilder := s.CreateTestCosmosTxBuilder(sdkmath.NewInt(0), denom, &testMsg)
Expand All @@ -63,7 +63,7 @@ func (s AnteTestSuite) TestMinGasPriceDecorator() {
"valid cosmos tx with MinGasPrices = 0, gasPrice > 0",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.ZeroDec()
params.MinGasPrice = sdkmath.LegacyZeroDec()
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

txBuilder := s.CreateTestCosmosTxBuilder(sdkmath.NewInt(10), denom, &testMsg)
Expand All @@ -77,7 +77,7 @@ func (s AnteTestSuite) TestMinGasPriceDecorator() {
"valid cosmos tx with MinGasPrices = 10, gasPrice = 10",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.NewDec(10)
params.MinGasPrice = sdkmath.LegacyNewDec(10)
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

txBuilder := s.CreateTestCosmosTxBuilder(sdkmath.NewInt(10), denom, &testMsg)
Expand All @@ -91,7 +91,7 @@ func (s AnteTestSuite) TestMinGasPriceDecorator() {
"invalid cosmos tx with MinGasPrices = 10, gasPrice = 0",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.NewDec(10)
params.MinGasPrice = sdkmath.LegacyNewDec(10)
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

txBuilder := s.CreateTestCosmosTxBuilder(sdkmath.NewInt(0), denom, &testMsg)
Expand All @@ -105,7 +105,7 @@ func (s AnteTestSuite) TestMinGasPriceDecorator() {
"invalid cosmos tx with wrong denom",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.NewDec(10)
params.MinGasPrice = sdkmath.LegacyNewDec(10)
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

txBuilder := s.CreateTestCosmosTxBuilder(sdkmath.NewInt(10), "stake", &testMsg)
Expand Down Expand Up @@ -152,7 +152,7 @@ func (s AnteTestSuite) TestEthMinGasPriceDecorator() {
"invalid tx type",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.NewDec(10)
params.MinGasPrice = sdkmath.LegacyNewDec(10)
s.app.FeeMarketKeeper.SetParams(s.ctx, params)
return &invalidTx{}
},
Expand All @@ -163,7 +163,7 @@ func (s AnteTestSuite) TestEthMinGasPriceDecorator() {
"wrong tx type",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.NewDec(10)
params.MinGasPrice = sdkmath.LegacyNewDec(10)
s.app.FeeMarketKeeper.SetParams(s.ctx, params)
testMsg := banktypes.MsgSend{
FromAddress: "evmos1x8fhpj9nmhqk8z9kpgjt95ck2xwyue0ptzkucp",
Expand All @@ -180,7 +180,7 @@ func (s AnteTestSuite) TestEthMinGasPriceDecorator() {
"valid: invalid tx type with MinGasPrices = 0",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.ZeroDec()
params.MinGasPrice = sdkmath.LegacyZeroDec()
s.app.FeeMarketKeeper.SetParams(s.ctx, params)
return &invalidTx{}
},
Expand All @@ -191,7 +191,7 @@ func (s AnteTestSuite) TestEthMinGasPriceDecorator() {
"valid legacy tx with MinGasPrices = 0, gasPrice = 0",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.ZeroDec()
params.MinGasPrice = sdkmath.LegacyZeroDec()
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), big.NewInt(0), nil, nil, nil)
Expand All @@ -204,7 +204,7 @@ func (s AnteTestSuite) TestEthMinGasPriceDecorator() {
"valid legacy tx with MinGasPrices = 0, gasPrice > 0",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.ZeroDec()
params.MinGasPrice = sdkmath.LegacyZeroDec()
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), big.NewInt(10), nil, nil, nil)
Expand All @@ -217,7 +217,7 @@ func (s AnteTestSuite) TestEthMinGasPriceDecorator() {
"valid legacy tx with MinGasPrices = 10, gasPrice = 10",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.NewDec(10)
params.MinGasPrice = sdkmath.LegacyNewDec(10)
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), big.NewInt(10), nil, nil, nil)
Expand All @@ -230,7 +230,7 @@ func (s AnteTestSuite) TestEthMinGasPriceDecorator() {
"invalid legacy tx with MinGasPrices = 10, gasPrice = 0",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.NewDec(10)
params.MinGasPrice = sdkmath.LegacyNewDec(10)
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), big.NewInt(0), nil, nil, nil)
Expand All @@ -243,7 +243,7 @@ func (s AnteTestSuite) TestEthMinGasPriceDecorator() {
"valid dynamic tx with MinGasPrices = 0, EffectivePrice = 0",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.ZeroDec()
params.MinGasPrice = sdkmath.LegacyZeroDec()
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), nil, big.NewInt(0), big.NewInt(0), &emptyAccessList)
Expand All @@ -256,7 +256,7 @@ func (s AnteTestSuite) TestEthMinGasPriceDecorator() {
"valid dynamic tx with MinGasPrices = 0, EffectivePrice > 0",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.ZeroDec()
params.MinGasPrice = sdkmath.LegacyZeroDec()
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), nil, big.NewInt(100), big.NewInt(50), &emptyAccessList)
Expand All @@ -269,7 +269,7 @@ func (s AnteTestSuite) TestEthMinGasPriceDecorator() {
"valid dynamic tx with MinGasPrices < EffectivePrice",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.NewDec(10)
params.MinGasPrice = sdkmath.LegacyNewDec(10)
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), nil, big.NewInt(100), big.NewInt(100), &emptyAccessList)
Expand All @@ -282,7 +282,7 @@ func (s AnteTestSuite) TestEthMinGasPriceDecorator() {
"invalid dynamic tx with MinGasPrices > EffectivePrice",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.NewDec(10)
params.MinGasPrice = sdkmath.LegacyNewDec(10)
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), nil, big.NewInt(0), big.NewInt(0), &emptyAccessList)
Expand All @@ -295,7 +295,7 @@ func (s AnteTestSuite) TestEthMinGasPriceDecorator() {
"invalid dynamic tx with MinGasPrices > BaseFee, MinGasPrices > EffectivePrice",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.NewDec(100)
params.MinGasPrice = sdkmath.LegacyNewDec(100)
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

feemarketParams := s.app.FeeMarketKeeper.GetParams(s.ctx)
Expand All @@ -312,7 +312,7 @@ func (s AnteTestSuite) TestEthMinGasPriceDecorator() {
"valid dynamic tx with MinGasPrices > BaseFee, MinGasPrices < EffectivePrice (big GasTipCap)",
func() sdk.Tx {
params := s.app.FeeMarketKeeper.GetParams(s.ctx)
params.MinGasPrice = sdk.NewDec(100)
params.MinGasPrice = sdkmath.LegacyNewDec(100)
s.app.FeeMarketKeeper.SetParams(s.ctx, params)

feemarketParams := s.app.FeeMarketKeeper.GetParams(s.ctx)
Expand Down
11 changes: 6 additions & 5 deletions app/ante/handler_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ package ante

import (
errorsmod "cosmossdk.io/errors"
storetypes "cosmossdk.io/store/types"
txsigning "cosmossdk.io/x/tx/signing"
sdk "github.com/cosmos/cosmos-sdk/types"
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"

evmtypes "github.com/evmos/ethermint/x/evm/types"
)
Expand All @@ -39,8 +40,8 @@ type HandlerOptions struct {
FeeMarketKeeper FeeMarketKeeper
EvmKeeper EVMKeeper
FeegrantKeeper ante.FeegrantKeeper
SignModeHandler authsigning.SignModeHandler
SigGasConsumer func(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
SignModeHandler *txsigning.HandlerMap
SigGasConsumer func(meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
MaxTxGasWanted uint64
ExtensionOptionChecker ante.ExtensionOptionChecker
TxFeeChecker ante.TxFeeChecker
Expand Down
Loading
Loading