diff --git a/app/app.go b/app/app.go index 385e16eae7..7b5f98d319 100644 --- a/app/app.go +++ b/app/app.go @@ -421,7 +421,7 @@ func NewEthermintApp( app.EvmKeeper = evmkeeper.NewKeeper( appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], authtypes.NewModuleAddress(govtypes.ModuleName), - app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.FeeMarketKeeper, nil, + app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.FeeMarketKeeper, nil, geth.NewEVM, tracer, evmSs, ) diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index c8722f0844..187d547274 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -63,8 +63,6 @@ type Keeper struct { // fetch EIP1559 base fee and parameters feeMarketKeeper types.FeeMarketKeeper - ibcTransferKeeper statedb.IBCTransferKeeper - // chain ID number obtained from the context's chain id eip155ChainID *big.Int @@ -93,7 +91,6 @@ func NewKeeper( bankKeeper types.BankKeeper, sk types.StakingKeeper, fmk types.FeeMarketKeeper, - ibcTransferKeeper statedb.IBCTransferKeeper, customPrecompiles evm.PrecompiledContracts, evmConstructor evm.Constructor, tracer string, @@ -121,7 +118,6 @@ func NewKeeper( bankKeeper: bankKeeper, stakingKeeper: sk, feeMarketKeeper: fmk, - ibcTransferKeeper: ibcTransferKeeper, storeKey: storeKey, transientKey: transientKey, customPrecompiles: customPrecompiles, @@ -404,7 +400,3 @@ func (k Keeper) AddTransientGasUsed(ctx sdk.Context, gasUsed uint64) (uint64, er k.SetTransientGasUsed(ctx, result) return result, nil } - -func (k Keeper) IBCTransferKeeper() statedb.IBCTransferKeeper { - return k.ibcTransferKeeper -} diff --git a/x/evm/statedb/interfaces.go b/x/evm/statedb/interfaces.go index 95dea4b020..6de9599406 100644 --- a/x/evm/statedb/interfaces.go +++ b/x/evm/statedb/interfaces.go @@ -16,11 +16,9 @@ package statedb import ( - "context" "math/big" sdk "github.com/cosmos/cosmos-sdk/types" - ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" ) @@ -35,10 +33,6 @@ type ExtStateDB interface { AppendJournalEntry(JournalEntry) } -type IBCTransferKeeper interface { - Transfer(goCtx context.Context, msg *ibctransfertypes.MsgTransfer) (*ibctransfertypes.MsgTransferResponse, error) -} - // Keeper provide underlying storage of StateDB type Keeper interface { // Read methods @@ -54,6 +48,4 @@ type Keeper interface { SetCode(ctx sdk.Context, codeHash []byte, code []byte) SetBalance(ctx sdk.Context, addr common.Address, amount *big.Int) error DeleteAccount(ctx sdk.Context, addr common.Address) error - - IBCTransferKeeper() IBCTransferKeeper } diff --git a/x/evm/statedb/statedb.go b/x/evm/statedb/statedb.go index ce1b91ed06..ef2f79b306 100644 --- a/x/evm/statedb/statedb.go +++ b/x/evm/statedb/statedb.go @@ -22,7 +22,6 @@ import ( "math/big" sdk "github.com/cosmos/cosmos-sdk/types" - ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" @@ -472,12 +471,3 @@ func (s *StateDB) SetError(err error) { s.sdkError = err } - -func (s *StateDB) IBCTransfer(goCtx context.Context, msg *ibctransfertypes.MsgTransfer) (*ibctransfertypes.MsgTransferResponse, error) { - resp, err := s.keeper.IBCTransferKeeper().Transfer(goCtx, msg) - if err != nil { - return nil, err - } - - return resp, nil -}