diff --git a/app/ante/ante_options.go b/app/ante/ante_options.go index 84bf48b64..02728e053 100644 --- a/app/ante/ante_options.go +++ b/app/ante/ante_options.go @@ -1,6 +1,7 @@ package ante import ( + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/ante" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" @@ -16,11 +17,17 @@ import ( txfeeskeeper "github.com/osmosis-labs/osmosis/v15/x/txfees/keeper" ) +// FeeMarketKeeper defines the expected keeper interface used on the AnteHandler +type FeeMarketKeeper interface { + ethante.FeeMarketKeeper + GetMinGasPrice(ctx sdk.Context) (minGasPrice sdk.Dec) +} + type HandlerOptions struct { AccountKeeper *authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper IBCKeeper *ibckeeper.Keeper - FeeMarketKeeper ethante.FeeMarketKeeper + FeeMarketKeeper FeeMarketKeeper EvmKeeper ethante.EVMKeeper FeegrantKeeper ante.FeegrantKeeper TxFeesKeeper *txfeeskeeper.Keeper diff --git a/app/ante/handlers.go b/app/ante/handlers.go index 26ae1dd87..f07485696 100644 --- a/app/ante/handlers.go +++ b/app/ante/handlers.go @@ -37,7 +37,7 @@ func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler { // newLegacyCosmosAnteHandlerEip712 creates an AnteHandler to process legacy EIP-712 // transactions, as defined by the presence of an ExtensionOptionsWeb3Tx extension. func newLegacyCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler { - mempoolFeeDecorator := txfeesante.NewMempoolFeeDecorator(*options.TxFeesKeeper) + mempoolFeeDecorator := txfeesante.NewMempoolFeeDecorator(*options.TxFeesKeeper, options.FeeMarketKeeper) deductFeeDecorator := txfeesante.NewDeductFeeDecorator(*options.TxFeesKeeper, options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper) return sdk.ChainAnteDecorators( @@ -86,7 +86,7 @@ func newLegacyCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler { } func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler { - mempoolFeeDecorator := txfeesante.NewMempoolFeeDecorator(*options.TxFeesKeeper) + mempoolFeeDecorator := txfeesante.NewMempoolFeeDecorator(*options.TxFeesKeeper, options.FeeMarketKeeper) deductFeeDecorator := txfeesante.NewDeductFeeDecorator(*options.TxFeesKeeper, options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper) return sdk.ChainAnteDecorators( diff --git a/go.mod b/go.mod index c39ca8847..2544e58ee 100644 --- a/go.mod +++ b/go.mod @@ -239,10 +239,10 @@ replace ( cosmossdk.io/api => cosmossdk.io/api v0.3.1 // use dymension forks - github.com/evmos/ethermint => github.com/dymensionxyz/ethermint v0.22.0-dymension-v1.0.0 + github.com/evmos/ethermint => github.com/dymensionxyz/ethermint v0.22.0-dymension-v1.0.0.0.20241202124813-c7838a77b8f6 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/osmosis-labs/osmosis/osmomath => github.com/dymensionxyz/osmosis/osmomath v0.0.6-dymension-v0.1.0.20240820121212-c0e21fa21e43 - github.com/osmosis-labs/osmosis/v15 => github.com/dymensionxyz/osmosis/v15 v15.2.1-0.20241121091134-5930c0d433a8 + github.com/osmosis-labs/osmosis/v15 => github.com/dymensionxyz/osmosis/v15 v15.2.1-0.20241202152541-b4fc63e3fe20 // broken goleveldb github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 diff --git a/go.sum b/go.sum index 5ada6ab18..53b4269fb 100644 --- a/go.sum +++ b/go.sum @@ -500,14 +500,14 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/dymensionxyz/ethermint v0.22.0-dymension-v1.0.0 h1:pND0fMCE5xv2A5eyXdSCI8+a+XaxvCNvC0+4Ac7TsTg= -github.com/dymensionxyz/ethermint v0.22.0-dymension-v1.0.0/go.mod h1:aokD0im7cUMMtR/khzNsmcGtINtxCpBfcgRvJdmLymA= +github.com/dymensionxyz/ethermint v0.22.0-dymension-v1.0.0.0.20241202124813-c7838a77b8f6 h1:YHircCv0aQSIz0T8N/C8upYHfAlsY8y80hAsxqkWtfA= +github.com/dymensionxyz/ethermint v0.22.0-dymension-v1.0.0.0.20241202124813-c7838a77b8f6/go.mod h1:aokD0im7cUMMtR/khzNsmcGtINtxCpBfcgRvJdmLymA= github.com/dymensionxyz/gerr-cosmos v1.1.0 h1:IW/P7HCB/iP9kgk3VXaWUoMoyx3vD76YO6p1fnubHVc= github.com/dymensionxyz/gerr-cosmos v1.1.0/go.mod h1:n+0olxPogzWqFKba45mCpvrHLGmeS8W9UZjggHnWk6c= github.com/dymensionxyz/osmosis/osmomath v0.0.6-dymension-v0.1.0.20240820121212-c0e21fa21e43 h1:EskhZ6ILN3vwJ6l8gPWPZ49RFSB52WghT5v+pmzrNCI= github.com/dymensionxyz/osmosis/osmomath v0.0.6-dymension-v0.1.0.20240820121212-c0e21fa21e43/go.mod h1:SdGCL9CZb14twRAJUSzb7bRE0OoopRpF2Hnd1UhJpFU= -github.com/dymensionxyz/osmosis/v15 v15.2.1-0.20241121091134-5930c0d433a8 h1:AwKgKV4uBZcylJarkT+W8K5FFjH/0tu3q4pzGRJsv+A= -github.com/dymensionxyz/osmosis/v15 v15.2.1-0.20241121091134-5930c0d433a8/go.mod h1:sXttKj99Ke160CvjID+5hvOG3TEF/K1k/Eqa37EhRCc= +github.com/dymensionxyz/osmosis/v15 v15.2.1-0.20241202152541-b4fc63e3fe20 h1:HQitz73Icw+YHPg56m284yYQVwf1XhKqfbbduX5SGes= +github.com/dymensionxyz/osmosis/v15 v15.2.1-0.20241202152541-b4fc63e3fe20/go.mod h1:sXttKj99Ke160CvjID+5hvOG3TEF/K1k/Eqa37EhRCc= github.com/dymensionxyz/sdk-utils v0.2.12 h1:wrcof+IP0AJQ7vvMRVpSekNNwa6B7ghAspHRjp/k+Lk= github.com/dymensionxyz/sdk-utils v0.2.12/go.mod h1:it9owYOpnIe17+ftTATQNDN4z+mBQx20/2Jm8SK15Rk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=