cosmos-sdk/cmd/basecli/commands/query.go

21 lines
484 B
Go

package commands
import (
wire "github.com/tendermint/go-wire"
"github.com/tendermint/light-client/proofs"
"github.com/tendermint/basecoin"
)
// BaseTxPresenter this decodes all basecoin tx
type BaseTxPresenter struct {
proofs.RawPresenter // this handles MakeKey as hex bytes
}
// ParseData - unmarshal raw bytes to a basecoin tx
func (BaseTxPresenter) ParseData(raw []byte) (interface{}, error) {
var tx basecoin.Tx
err := wire.ReadBinaryBytes(raw, &tx)
return tx, err
}