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

Feat: Upgrade SDK 47 and upstream x/evm and x/feemarket module from evmos #144

Open
wants to merge 91 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 77 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
29255ac
change dependency
GNaD13 Apr 28, 2024
21be234
write upgrade for new minimum commission rate
neitdung May 6, 2024
71cebe2
fix lint error
neitdung May 6, 2024
238f11a
add upgrade test and fix error when change commission rate
neitdung May 6, 2024
1ce2a27
fix lint
neitdung May 6, 2024
d395870
Fix permission file
neitdung May 6, 2024
23d6528
fix spacing issue
neitdung May 6, 2024
8342e72
specific validator commission in test
neitdung May 6, 2024
01c3675
proto third party
GNaD13 May 7, 2024
ba9af85
go mod
GNaD13 May 7, 2024
16ada9b
remove ethermint dependency
GNaD13 May 7, 2024
e36315b
fork sdk
GNaD13 May 8, 2024
d051a97
app.go
GNaD13 May 8, 2024
4d7af03
fix sdk 47 tests and testutil folder
neitdung May 8, 2024
52d87f7
fix sdk 47 cmd folder
neitdung May 8, 2024
684330b
ante.go
GNaD13 May 8, 2024
691580a
ante
GNaD13 May 8, 2024
d9a0a01
Merge pull request #5 from decentrio/dzung/sdk-47
GNaD13 May 8, 2024
dcff4e8
update sdk 47 x folder
neitdung May 8, 2024
b63bb8b
upgrade
GNaD13 May 8, 2024
bbea83d
test_helper
GNaD13 May 8, 2024
5c683c5
Merge pull request #6 from decentrio/dzung/sdk-47
GNaD13 May 8, 2024
b4e21b6
proto
GNaD13 May 8, 2024
f74fb2a
remove third party
GNaD13 May 8, 2024
51be06a
buf
GNaD13 May 8, 2024
07d3d21
nit
GNaD13 May 8, 2024
c8ca223
nit
GNaD13 May 8, 2024
8f4bccc
nit
GNaD13 May 8, 2024
84c645b
CI
GNaD13 May 8, 2024
4f0e4ae
nit
GNaD13 May 8, 2024
03659ae
chain ID
GNaD13 May 8, 2024
aa698ec
fork evmos
GNaD13 May 8, 2024
4369914
correct check
GNaD13 May 9, 2024
14924e6
ante test
GNaD13 May 9, 2024
6dddc07
TestMintedCoinsEachBlock
GNaD13 May 9, 2024
e9146bb
lint
GNaD13 May 9, 2024
c1b41dd
bump go lint versino
GNaD13 May 9, 2024
0f8690b
lint
GNaD13 May 9, 2024
881c30d
lint
GNaD13 May 9, 2024
a8610e1
migrate param space for mint module
neitdung May 9, 2024
d304de4
Merge pull request #7 from decentrio/param-space
GNaD13 May 9, 2024
5ee6bed
lint
GNaD13 May 9, 2024
ea0edcb
Merge branch 'feat/sdk-47' of https://github.com/decentrio/realio-net…
neitdung May 13, 2024
db86787
fix for sdk 47
neitdung May 13, 2024
c903fbc
add RegisterGRPCGatewayRoutes
GNaD13 May 13, 2024
1294ccd
fix lint error
neitdung May 13, 2024
e2e23ae
Merge branch 'feat/sdk-47' of https://github.com/decentrio/realio-net…
neitdung May 14, 2024
d91ca00
fix lint error
neitdung May 14, 2024
a82e5ec
Merge pull request #8 from decentrio/fix-min-commission
GNaD13 May 14, 2024
175fc95
upgrade handler for sdk 47
neitdung May 14, 2024
505aace
add tm client ibc
GNaD13 May 14, 2024
a231fd5
Merge remote-tracking branch 'decent/feat/sdk-47' into feat/sdk-47
GNaD13 May 14, 2024
d109b64
Merge pull request #9 from decentrio/sdk-47-upgrade
GNaD13 May 14, 2024
aaa1a6e
add flag get chain id
GNaD13 May 15, 2024
bd46ff9
add chain id when initialize app
GNaD13 May 15, 2024
6ef09f8
nit
GNaD13 May 15, 2024
42663b4
update dependency
GNaD13 May 15, 2024
0d7dc42
add test cmd
GNaD13 May 15, 2024
4b2dffd
Fix store to save new commission
neitdung May 15, 2024
551c45a
Merge branch 'feat/sdk-47' of https://github.com/decentrio/realio-net…
neitdung May 15, 2024
216a128
fix lint error
neitdung May 15, 2024
873277d
fix file permission
neitdung May 15, 2024
2ea4c8b
Merge pull request #10 from decentrio/sdk-47-upgrade
GNaD13 May 15, 2024
c344d8d
remove unused code
GNaD13 May 15, 2024
89dd590
change to used evmos test utils
GNaD13 May 17, 2024
c40e6b5
nit
GNaD13 May 17, 2024
fc90881
add new script without third_party folder
neitdung May 18, 2024
cccc0aa
fix conflict in staking module
neitdung May 19, 2024
a3ddce3
Merge pull request #11 from decentrio/swagger-script
GNaD13 May 20, 2024
01c4d0f
change upgrade name from v4 to v3
neitdung May 22, 2024
3c26795
Merge pull request #12 from decentrio/change-upgrade-name
GNaD13 May 22, 2024
b582c35
v2
GNaD13 May 24, 2024
827d911
lint
GNaD13 May 24, 2024
b642dad
nit
GNaD13 May 24, 2024
070aa35
update dependency evmos
GNaD13 Jun 4, 2024
448a47d
nit
GNaD13 Jun 4, 2024
c48f099
correct logger name
GNaD13 Jun 4, 2024
7051c1e
change back to use cosmos ante
GNaD13 Jun 14, 2024
3c8a4c5
change to auth ante
GNaD13 Jun 17, 2024
50b6ebe
add multi staking params
GNaD13 Jun 18, 2024
add75d1
change ante to multistaking
GNaD13 Jun 18, 2024
12fa225
nit
GNaD13 Jun 18, 2024
b2dacba
nit
GNaD13 Jun 18, 2024
732637d
remove .ethermint proto
GNaD13 Jun 18, 2024
bb28039
cleanup
GNaD13 Jun 18, 2024
9a4f705
remove upgrade commission cause we already have a separate upgrade fo…
GNaD13 Jul 12, 2024
b2f2948
Merge remote-tracking branch 'origin/main' into feat/sdk-47
GNaD13 Jul 12, 2024
e1ac66f
lint
GNaD13 Jul 12, 2024
3e007a9
default genesis multistaking
GNaD13 Jul 16, 2024
cbe4001
nit
GNaD13 Jul 17, 2024
f884503
Merge remote-tracking branch 'origin/main' into feat/sdk-47
GNaD13 Jul 17, 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
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.20.2
go-version: 1.22
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20
go-version: 1.22
check-latest: true
- name: release dry run
run: make release-dry-run
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.22.2'
cache: false
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.52.2
version: v1.57.1

2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.19.x, 1.20.x]
go-version: [1.22.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ run:
linters:
disable-all: true
enable:
- depguard
- dogsled
- errcheck
- exportloopref
- gci
- goconst
- gocritic
- gofumpt
Expand All @@ -24,6 +24,7 @@ linters:
- staticcheck
- stylecheck
- typecheck
- thelper
- unconvert
- unparam
- unused
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,10 @@ endif
# NOTE: Link to the tendermintdev/sdk-proto-gen docker images:
# https://hub.docker.com/r/tendermintdev/sdk-proto-gen/tags
#
protoVer=v0.7
protoImageName=tendermintdev/sdk-proto-gen:$(protoVer)
protoImage=$(DOCKER) run --network host --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
protoVer=0.14.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
protoGenSwagger=$(PROJECT_NAME)-proto-gen-swagger-$(protoVer)
# ------
# NOTE: cosmos/proto-builder image is needed because clang-format is not installed
# on the tendermintdev/sdk-proto-gen docker image.
Expand Down Expand Up @@ -280,7 +281,8 @@ proto-swagger-gen:
@echo "Downloading Protobuf dependencies"
# @make proto-download-deps
@echo "Generating Protobuf Swagger"
$(protoCosmosImage) sh ./scripts/protoc-swagger-gen.sh
./scripts/protoc-third-party.sh
$(protoImage) sh ./scripts/protoc-swagger-gen.sh

proto-format:
@echo "Formatting Protobuf files"
Expand Down
4 changes: 0 additions & 4 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"

ethante "github.com/evmos/ethermint/app/ante"
)

// NewAnteHandler returns an ante handler responsible for attempting to route an
Expand All @@ -20,8 +18,6 @@ func NewAnteHandler(options HandlerOptions) sdk.AnteHandler {
) (newCtx sdk.Context, err error) {
var anteHandler sdk.AnteHandler

defer ethante.Recover(ctx.Logger(), &err)

txWithExtensions, ok := tx.(authante.HasExtensionOptionsTx)
if ok {
opts := txWithExtensions.GetExtensionOptions()
Expand Down
26 changes: 20 additions & 6 deletions app/ante/antes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ package ante_test

import (
"fmt"
"math/big"
"time"

abci "github.com/cometbft/cometbft/abci/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
sdkvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
"github.com/cosmos/cosmos-sdk/x/authz"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
evmtypes "github.com/evmos/ethermint/x/evm/types"
abci "github.com/tendermint/tendermint/abci/types"
utiltx "github.com/evmos/evmos/v18/testutil/tx"
evmtypes "github.com/evmos/evmos/v18/x/evm/types"
)

func (suite *AnteTestSuite) TestRejectMsgsInAuthz() {
Expand All @@ -32,6 +34,18 @@ func (suite *AnteTestSuite) TestRejectMsgsInAuthz() {
return msg
}

to := utiltx.GenerateAddress()

ethTxParams := &evmtypes.EvmTxArgs{
ChainID: suite.app.EvmKeeper.ChainID(),
To: &to,
Nonce: 1,
Amount: big.NewInt(10),
GasLimit: 100000,
GasPrice: big.NewInt(150),
GasFeeCap: big.NewInt(200),
}

testcases := []struct {
name string
msgs []sdk.Msg
Expand Down Expand Up @@ -65,7 +79,7 @@ func (suite *AnteTestSuite) TestRejectMsgsInAuthz() {
testAddresses[3],
sdk.NewCoins(sdk.NewInt64Coin(evmtypes.DefaultEVMDenom, 100e6)),
),
&evmtypes.MsgEthereumTx{},
evmtypes.NewTx(ethTxParams),
},
),
},
Expand All @@ -78,7 +92,7 @@ func (suite *AnteTestSuite) TestRejectMsgsInAuthz() {
testAddresses[1],
2,
[]sdk.Msg{
&evmtypes.MsgEthereumTx{},
evmtypes.NewTx(ethTxParams),
},
),
},
Expand Down Expand Up @@ -156,14 +170,14 @@ func (suite *AnteTestSuite) TestRejectMsgsInAuthz() {
Type: abci.CheckTxType_New,
},
)
suite.Require().Equal(resCheckTx.Code, tc.expectedCode, resCheckTx.Log)
suite.Require().Equal(tc.expectedCode, resCheckTx.Code, resCheckTx.Log)

resDeliverTx := suite.app.DeliverTx(
abci.RequestDeliverTx{
Tx: bz,
},
)
suite.Require().Equal(resDeliverTx.Code, tc.expectedCode, resDeliverTx.Log)
suite.Require().Equal(tc.expectedCode, resDeliverTx.Code, resDeliverTx.Log)
})
}
}
9 changes: 3 additions & 6 deletions app/ante/authz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/authz"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

evmtypes "github.com/evmos/ethermint/x/evm/types"

"github.com/realiotech/realio-network/app/ante"
evmtypes "github.com/evmos/evmos/v18/x/evm/types"
"github.com/realiotech/realio-network/v2/app/ante"
"github.com/stretchr/testify/require"
)

func TestAuthzLimiterDecorator(t *testing.T) {
Expand Down
59 changes: 31 additions & 28 deletions app/ante/handler_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import (
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
sdkvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
ibcante "github.com/cosmos/ibc-go/v6/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"

ethante "github.com/evmos/ethermint/app/ante"
evmtypes "github.com/evmos/ethermint/x/evm/types"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
cosmosante "github.com/evmos/evmos/v18/app/ante/cosmos"
evmante "github.com/evmos/evmos/v18/app/ante/evm"
anteutils "github.com/evmos/evmos/v18/app/ante/utils"
evmtypes "github.com/evmos/evmos/v18/x/evm/types"
)

// HandlerOptions defines the list of module keepers required to run the RealioNetwork
Expand All @@ -22,15 +23,17 @@ import (
type HandlerOptions struct {
AccountKeeper evmtypes.AccountKeeper
BankKeeper evmtypes.BankKeeper
DistributionKeeper anteutils.DistributionKeeper
ExtensionOptionChecker ante.ExtensionOptionChecker
IBCKeeper *ibckeeper.Keeper
FeeMarketKeeper ethante.FeeMarketKeeper
EvmKeeper ethante.EVMKeeper
StakingKeeper anteutils.StakingKeeper
FeeMarketKeeper evmante.FeeMarketKeeper
EvmKeeper evmante.EVMKeeper
FeegrantKeeper ante.FeegrantKeeper
SignModeHandler authsigning.SignModeHandler
SigGasConsumer func(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
MaxTxGasWanted uint64
TxFeeChecker ante.TxFeeChecker
TxFeeChecker anteutils.TxFeeChecker
}

// Validate checks if the keepers are defined
Expand Down Expand Up @@ -65,24 +68,24 @@ func (options HandlerOptions) Validate() error {
// newEthAnteHandler creates the default ante handler for Ethereum transactions
func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler {
return sdk.ChainAnteDecorators(
ethante.NewEthSetUpContextDecorator(options.EvmKeeper), // outermost AnteDecorator. SetUpContext must be called first
ethante.NewEthMempoolFeeDecorator(options.EvmKeeper), // Check eth effective gas price against the node's minimal-gas-prices config
ethante.NewEthMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper), // Check eth effective gas price against the global MinGasPrice
ethante.NewEthValidateBasicDecorator(options.EvmKeeper),
ethante.NewEthSigVerificationDecorator(options.EvmKeeper),
ethante.NewEthAccountVerificationDecorator(options.AccountKeeper, options.EvmKeeper),
ethante.NewCanTransferDecorator(options.EvmKeeper),
ethante.NewEthGasConsumeDecorator(options.EvmKeeper, options.MaxTxGasWanted),
ethante.NewEthIncrementSenderSequenceDecorator(options.AccountKeeper),
ethante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper),
ethante.NewEthEmitEventDecorator(options.EvmKeeper), // emit eth tx hash and index at the very last ante handler.
evmante.NewEthSetUpContextDecorator(options.EvmKeeper), // outermost AnteDecorator. SetUpContext must be called first
evmante.NewEthMempoolFeeDecorator(options.EvmKeeper), // Check eth effective gas price against the node's minimal-gas-prices config
evmante.NewEthMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper), // Check eth effective gas price against the global MinGasPrice
evmante.NewEthValidateBasicDecorator(options.EvmKeeper),
evmante.NewEthSigVerificationDecorator(options.EvmKeeper),
evmante.NewEthAccountVerificationDecorator(options.AccountKeeper, options.EvmKeeper),
evmante.NewCanTransferDecorator(options.EvmKeeper),
evmante.NewEthGasConsumeDecorator(options.BankKeeper, options.DistributionKeeper, options.EvmKeeper, options.StakingKeeper, options.MaxTxGasWanted),
evmante.NewEthIncrementSenderSequenceDecorator(options.AccountKeeper),
evmante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper),
evmante.NewEthEmitEventDecorator(options.EvmKeeper), // emit eth tx hash and index at the very last ante handler.
)
}

// newCosmosAnteHandler creates the default ante handler for Cosmos transactions
func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler {
return sdk.ChainAnteDecorators(
ethante.RejectMessagesDecorator{}, // reject MsgEthereumTxs
cosmosante.RejectMessagesDecorator{}, // reject MsgEthereumTxs
NewAuthzLimiterDecorator( // disable the Msg types that cannot be included on an authz.MsgExec msgs field
sdk.MsgTypeURL(&evmtypes.MsgEthereumTx{}),
sdk.MsgTypeURL(&sdkvesting.MsgCreateVestingAccount{}),
Expand All @@ -92,44 +95,44 @@ func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler {
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(options.AccountKeeper),
ethante.NewMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper),
cosmosante.NewMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper),
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker),
cosmosante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.DistributionKeeper, options.FeegrantKeeper, options.StakingKeeper, options.TxFeeChecker),
// SetPubKeyDecorator must be called before all signature verification decorators
ante.NewSetPubKeyDecorator(options.AccountKeeper),
ante.NewValidateSigCountDecorator(options.AccountKeeper),
ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer),
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
ethante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper),
evmante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper),
)
}

// newCosmosAnteHandlerEip712 creates the ante handler for transactions signed with EIP712
func newLegacyCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler {
return sdk.ChainAnteDecorators(
ethante.RejectMessagesDecorator{}, // reject MsgEthereumTxs
cosmosante.RejectMessagesDecorator{}, // reject MsgEthereumTxs
NewAuthzLimiterDecorator( // blacklist the Msg types that cannot be included on an authz.MsgExec msgs field
sdk.MsgTypeURL(&evmtypes.MsgEthereumTx{}),
sdk.MsgTypeURL(&sdkvesting.MsgCreateVestingAccount{}),
),
ante.NewSetUpContextDecorator(),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
ethante.NewMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper),
cosmosante.NewMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper),
ante.NewValidateMemoDecorator(options.AccountKeeper),
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker),
cosmosante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.DistributionKeeper, options.FeegrantKeeper, options.StakingKeeper, options.TxFeeChecker),
// SetPubKeyDecorator must be called before all signature verification decorators
ante.NewSetPubKeyDecorator(options.AccountKeeper),
ante.NewValidateSigCountDecorator(options.AccountKeeper),
ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer),
// Note: signature verification uses EIP instead of the cosmos signature validator
//nolint: staticcheck
ethante.NewLegacyEip712SigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
cosmosante.NewLegacyEip712SigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
ethante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper),
evmante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper),
)
}
19 changes: 10 additions & 9 deletions app/ante/handler_options_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package ante_test

import (
evmante "github.com/evmos/ethermint/app/ante"
"github.com/evmos/ethermint/encoding"
"github.com/evmos/ethermint/types"
"github.com/realiotech/realio-network/app"
"github.com/realiotech/realio-network/app/ante"
evmante "github.com/evmos/evmos/v18/app/ante"
ethante "github.com/evmos/evmos/v18/app/ante/evm"
"github.com/evmos/evmos/v18/encoding"
"github.com/evmos/evmos/v18/types"
"github.com/realiotech/realio-network/v2/app"
"github.com/realiotech/realio-network/v2/app/ante"
)

func (suite *AnteTestSuite) TestValidateHandlerOptions() {
Expand Down Expand Up @@ -106,7 +107,7 @@ func (suite *AnteTestSuite) TestValidateHandlerOptions() {
IBCKeeper: suite.app.IBCKeeper,
FeeMarketKeeper: suite.app.FeeMarketKeeper,
EvmKeeper: suite.app.EvmKeeper,
SigGasConsumer: evmante.DefaultSigVerificationGasConsumer,
SigGasConsumer: evmante.SigVerificationGasConsumer,
SignModeHandler: nil,
},
false,
Expand All @@ -119,7 +120,7 @@ func (suite *AnteTestSuite) TestValidateHandlerOptions() {
IBCKeeper: suite.app.IBCKeeper,
FeeMarketKeeper: suite.app.FeeMarketKeeper,
EvmKeeper: suite.app.EvmKeeper,
SigGasConsumer: evmante.DefaultSigVerificationGasConsumer,
SigGasConsumer: evmante.SigVerificationGasConsumer,
SignModeHandler: suite.app.GetTxConfig().SignModeHandler(),
TxFeeChecker: nil,
},
Expand All @@ -136,9 +137,9 @@ func (suite *AnteTestSuite) TestValidateHandlerOptions() {
IBCKeeper: suite.app.IBCKeeper,
FeeMarketKeeper: suite.app.FeeMarketKeeper,
SignModeHandler: encoding.MakeConfig(app.ModuleBasics).TxConfig.SignModeHandler(),
SigGasConsumer: evmante.DefaultSigVerificationGasConsumer,
SigGasConsumer: evmante.SigVerificationGasConsumer,
MaxTxGasWanted: 40000000,
TxFeeChecker: evmante.NewDynamicFeeChecker(suite.app.EvmKeeper),
TxFeeChecker: ethante.NewDynamicFeeChecker(suite.app.EvmKeeper),
},
true,
},
Expand Down
Loading
Loading