Skip to content

Commit

Permalink
chore!: change ethermint dependency to evmos repo (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsitrin authored Feb 11, 2024
1 parent 3b75e27 commit 9c157f2
Show file tree
Hide file tree
Showing 14 changed files with 226 additions and 458 deletions.
2 changes: 1 addition & 1 deletion app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
switch typeURL := opts[0].GetTypeUrl(); typeURL {
case "/ethermint.evm.v1.ExtensionOptionsEthereumTx":
// handle as *evmtypes.MsgEthereumTx
anteHandler = newEthAnteHandler(options)
anteHandler = newEVMAnteHandler(options)
case "/ethermint.types.v1.ExtensionOptionsWeb3Tx":
// handle as normal Cosmos SDK tx, except signature is checked for EIP712 representation
anteHandler = newLegacyCosmosAnteHandlerEip712(options)
Expand Down
20 changes: 17 additions & 3 deletions app/ante/ante_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,34 @@ import (
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
ethante "github.com/evmos/ethermint/app/ante"
evmante "github.com/evmos/evmos/v12/app/ante/evm"
anteutils "github.com/evmos/evmos/v12/app/ante/utils"

vestingtypes "github.com/evmos/evmos/v12/x/vesting/types"

errorsmod "cosmossdk.io/errors"
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
txfeeskeeper "github.com/osmosis-labs/osmosis/v15/x/txfees/keeper"

"github.com/cosmos/cosmos-sdk/types/tx/signing"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

sdk "github.com/cosmos/cosmos-sdk/types"
)

type HandlerOptions struct {
AccountKeeper *authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
IBCKeeper *ibckeeper.Keeper
FeeMarketKeeper ethante.FeeMarketKeeper
EvmKeeper ethante.EVMKeeper
FeeMarketKeeper evmante.FeeMarketKeeper
StakingKeeper vestingtypes.StakingKeeper
DistributionKeeper anteutils.DistributionKeeper
EvmKeeper evmante.EVMKeeper
FeegrantKeeper ante.FeegrantKeeper
TxFeesKeeper *txfeeskeeper.Keeper
SignModeHandler authsigning.SignModeHandler
MaxTxGasWanted uint64
SigGasConsumer func(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
ExtensionOptionChecker ante.ExtensionOptionChecker
}

Expand All @@ -45,5 +56,8 @@ func (options HandlerOptions) validate() error {
if options.TxFeesKeeper == nil {
return errorsmod.Wrap(errortypes.ErrLogic, "tx fees keeper is required for AnteHandler")
}
if options.SigGasConsumer == nil {
return errorsmod.Wrap(errortypes.ErrLogic, "sig gas consumer is required for AnteHandler")
}
return nil
}
295 changes: 0 additions & 295 deletions app/ante/eip712.go

This file was deleted.

Loading

0 comments on commit 9c157f2

Please sign in to comment.