diff --git a/app/middleware/eip792.go b/app/middleware/eip792.go index 9dcd92cd..d140a3f4 100644 --- a/app/middleware/eip792.go +++ b/app/middleware/eip792.go @@ -17,20 +17,11 @@ import ( "github.com/tharsis/ethermint/ethereum/eip712" ethermint "github.com/tharsis/ethermint/types" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" evmtypes "github.com/tharsis/ethermint/x/evm/types" ) -var ethermintCodec codec.ProtoCodecMarshaler - -func init() { - registry := codectypes.NewInterfaceRegistry() - ethermint.RegisterInterfaces(registry) - ethermintCodec = codec.NewProtoCodec(registry) -} - // Eip712SigVerificationMiddleware Verify all signatures for a tx and return an error if any are invalid. Note, // the Eip712SigVerificationMiddleware middleware will not get executed on ReCheck. // diff --git a/encoding/codec/codec.go b/encoding/codec/codec.go index 591f0318..6a6a9bdd 100644 --- a/encoding/codec/codec.go +++ b/encoding/codec/codec.go @@ -5,22 +5,17 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/std" - sdk "github.com/cosmos/cosmos-sdk/types" - cryptocodec "github.com/tharsis/ethermint/crypto/codec" ethermint "github.com/tharsis/ethermint/types" ) // RegisterLegacyAminoCodec registers Interfaces from types, crypto, and SDK std. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - sdk.RegisterLegacyAminoCodec(cdc) - cryptocodec.RegisterCrypto(cdc) - codec.RegisterEvidences(cdc) + std.RegisterLegacyAminoCodec(cdc) } // RegisterInterfaces registers Interfaces from types, crypto, and SDK std. func RegisterInterfaces(interfaceRegistry codectypes.InterfaceRegistry) { - sdk.RegisterInterfaces(interfaceRegistry) std.RegisterInterfaces(interfaceRegistry) cryptocodec.RegisterInterfaces(interfaceRegistry) ethermint.RegisterInterfaces(interfaceRegistry) diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index 50c49afc..54ebb762 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -19,8 +19,7 @@ var _ types.MsgServer = &Keeper{} // EthereumTx implements the gRPC MsgServer interface. It receives a transaction which is then // executed (i.e applied) against the go-ethereum EVM. The provided SDK Context is set to the Keeper -// so that it can implements and call the StateDB methods without receiving it as a function -// parameter. +// so that it can call the StateDB methods without receiving it as a function parameter. func (k *Keeper) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*types.MsgEthereumTxResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx)