func EthTxParser(b block.Block) (node.Node, error) {
	return eth.DecodeEthTx(b.Cid(), b.RawData())
}
EthTxParser takes care of the eth-tx IPLD objects (ethereum transactions)
package main
import (
	"io"
	block "github.com/ipfs/go-block-format"
	"github.com/ipfs/go-ipfs/core/coredag"
	plugin "github.com/ipfs/go-ipfs/plugin"
	eth "github.com/ipfs/go-ipld-eth"
	node "github.com/ipfs/go-ipld-format"
)
var Plugins = []plugin.Plugin{
	&EthereumPlugin{},
}
type EthereumPlugin struct{}
var _ plugin.PluginIPLD = (*EthereumPlugin)(nil)
func (ep *EthereumPlugin) Init() error {
	return nil
}
func (ep *EthereumPlugin) Name() string {
	return "ipld-ethereum"
}
func (ep *EthereumPlugin) Version() string {
	return "0.0.3"
}
func (ep *EthereumPlugin) RegisterInputEncParsers(iec coredag.InputEncParsers) error {
	iec.AddParser("raw", "eth-block", EthBlockRawInputParser)
	iec.AddParser("json", "eth-block", EthBlockJSONInputParser)
	iec.AddParser("raw", "eth-state-trie", EthStateTrieRawInputParser)
	iec.AddParser("raw", "eth-storage-trie", EthStorageTrieRawInputParser)
	return nil
}
func EthBlockRawInputParser(r io.Reader, mhtype uint64, mhLen int) ([]node.Node, error) {
	blockHeader, txs, txTrieNodes, err := eth.FromBlockRLP(r)
	if err != nil {
		return nil, err
	}
	var out []node.Node
	out = append(out, blockHeader)
	for _, tx := range txs {
		out = append(out, tx)
	}
	for _, ttn := range txTrieNodes {
		out = append(out, ttn)
	}
	return out, nil
}
func EthBlockJSONInputParser(r io.Reader, mhtype uint64, mhLen int) ([]node.Node, error) {
	blockHeader, txs, txTrieNodes, err := eth.FromBlockJSON(r)
	if err != nil {
		return nil, err
	}
	var out []node.Node
	out = append(out, blockHeader)
	for _, tx := range txs {
		out = append(out, tx)
	}
	for _, ttn := range txTrieNodes {
		out = append(out, ttn)
	}
	return out, nil
}
func EthStateTrieRawInputParser(r io.Reader, mhtype uint64, mhLen int) ([]node.Node, error) {
	stateTrieNode, err := eth.FromStateTrieRLP(r)
	if err != nil {
		return nil, err
	}
	return []node.Node{stateTrieNode}, nil
}
func EthStorageTrieRawInputParser(r io.Reader, mhtype uint64, mhLen int) ([]node.Node, error) {
	storageTrieNode, err := eth.FromStorageTrieRLP(r)
	if err != nil {
		return nil, err
	}
	return []node.Node{storageTrieNode}, nil
}
func (ep *EthereumPlugin) RegisterBlockDecoders(dec node.BlockDecoder) error {
	dec.Register(eth.MEthBlock, EthBlockParser)              
	dec.Register(eth.MEthTx, EthTxParser)                    
	dec.Register(eth.MEthTxTrie, EthTxTrieParser)            
	dec.Register(eth.MEthStateTrie, EthStateTrieParser)      
	dec.Register(eth.MEthStorageTrie, EthStorageTrieParser)  
	return nil
}
func EthBlockParser(b block.Block) (node.Node, error) {
	return eth.DecodeEthBlock(b.Cid(), b.RawData())
}