misc clean up
This commit is contained in:
parent
b1f755db7b
commit
2c9d18fd93
@ -17,20 +17,11 @@ import (
|
|||||||
"github.com/tharsis/ethermint/ethereum/eip712"
|
"github.com/tharsis/ethermint/ethereum/eip712"
|
||||||
ethermint "github.com/tharsis/ethermint/types"
|
ethermint "github.com/tharsis/ethermint/types"
|
||||||
|
|
||||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
evmtypes "github.com/tharsis/ethermint/x/evm/types"
|
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,
|
// 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.
|
// the Eip712SigVerificationMiddleware middleware will not get executed on ReCheck.
|
||||||
//
|
//
|
||||||
|
@ -5,22 +5,17 @@ import (
|
|||||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||||
"github.com/cosmos/cosmos-sdk/std"
|
"github.com/cosmos/cosmos-sdk/std"
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
||||||
|
|
||||||
cryptocodec "github.com/tharsis/ethermint/crypto/codec"
|
cryptocodec "github.com/tharsis/ethermint/crypto/codec"
|
||||||
ethermint "github.com/tharsis/ethermint/types"
|
ethermint "github.com/tharsis/ethermint/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RegisterLegacyAminoCodec registers Interfaces from types, crypto, and SDK std.
|
// RegisterLegacyAminoCodec registers Interfaces from types, crypto, and SDK std.
|
||||||
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
|
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
|
||||||
sdk.RegisterLegacyAminoCodec(cdc)
|
std.RegisterLegacyAminoCodec(cdc)
|
||||||
cryptocodec.RegisterCrypto(cdc)
|
|
||||||
codec.RegisterEvidences(cdc)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterInterfaces registers Interfaces from types, crypto, and SDK std.
|
// RegisterInterfaces registers Interfaces from types, crypto, and SDK std.
|
||||||
func RegisterInterfaces(interfaceRegistry codectypes.InterfaceRegistry) {
|
func RegisterInterfaces(interfaceRegistry codectypes.InterfaceRegistry) {
|
||||||
sdk.RegisterInterfaces(interfaceRegistry)
|
|
||||||
std.RegisterInterfaces(interfaceRegistry)
|
std.RegisterInterfaces(interfaceRegistry)
|
||||||
cryptocodec.RegisterInterfaces(interfaceRegistry)
|
cryptocodec.RegisterInterfaces(interfaceRegistry)
|
||||||
ethermint.RegisterInterfaces(interfaceRegistry)
|
ethermint.RegisterInterfaces(interfaceRegistry)
|
||||||
|
@ -19,8 +19,7 @@ var _ types.MsgServer = &Keeper{}
|
|||||||
|
|
||||||
// EthereumTx implements the gRPC MsgServer interface. It receives a transaction which is then
|
// 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
|
// 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
|
// so that it can call the StateDB methods without receiving it as a function parameter.
|
||||||
// parameter.
|
|
||||||
func (k *Keeper) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*types.MsgEthereumTxResponse, error) {
|
func (k *Keeper) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*types.MsgEthereumTxResponse, error) {
|
||||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user