func TxDecoder(cdc *codec.Codec) sdk.TxDecoder {
	return func(txBytes []byte) (sdk.Tx, sdk.Error) {
		var tx sdk.Tx

		if len(txBytes) == 0 {
			return nil, sdk.ErrTxDecode("txBytes are empty")
		}

		err := cdc.UnmarshalBinaryLengthPrefixed(txBytes, &tx)
		if err != nil {
			return nil, sdk.ErrTxDecode("failed to decode tx").TraceSDK(err.Error())
		}

		return tx, nil
	}
}
// TxDecoder returns an sdk.TxDecoder that can decode both auth.StdTx and
// MsgEthereumTx transactions.
TxDecoder returns an sdk.TxDecoder that can decode both auth.StdTx and
MsgEthereumTx transactions.
// TxDecoder returns an sdk . TxDecoder that can decode both auth . StdTx and // MsgEthereumTx transactions .
func TxDecoder(cdc *codec.Codec) sdk.TxDecoder {
	return func(txBytes []byte) (sdk.Tx, sdk.Error) {
		var tx sdk.Tx
		if len(txBytes) == 0 {
			return nil, sdk.ErrTxDecode("txBytes are empty")
		}
		err := cdc.UnmarshalBinaryLengthPrefixed(txBytes, &tx)
		if err != nil {
			return nil, sdk.ErrTxDecode("failed to decode tx").TraceSDK(err.Error())
		}
		return tx, nil
	}
}
func TxDecoder ( cdc * codec . Codec ) sdk . TxDecoder { return func ( txBytes [ ] byte ) ( sdk . Tx , sdk . Error ) { var tx sdk . Tx if len ( txBytes ) == 0 { return nil , sdk . ErrTxDecode ( " " ) } err := cdc . UnmarshalBinaryLengthPrefixed ( txBytes , & tx ) if err != nil { return nil , sdk . ErrTxDecode ( " " ) . TraceSDK ( err . Error ( ) ) } return tx , nil } }
TxDecoder returns an sdk.TxDecoder that can decode both auth.StdTx and
MsgEthereumTx transactions.
TxDecoder returns an sdk . TxDecoder that can decode both auth . StdTx and MsgEthereumTx transactions .