neoneo-go/pkg/wire/payload/transaction/version/version.go

25 lines
419 B
Go
Raw Normal View History

2019-02-25 22:44:14 +00:00
package version
import (
"github.com/CityOfZion/neo-go/pkg/wire/util"
)
// TX represents a tx version
2019-02-25 22:44:14 +00:00
type TX uint8
// List of latest tx version
2019-02-25 22:44:14 +00:00
const (
Contract TX = 0
Invocation TX = 1
2019-02-25 22:44:14 +00:00
)
// Encode encodes the tx version into the binary writer
2019-02-25 22:44:14 +00:00
func (v *TX) Encode(bw *util.BinWriter) {
bw.Write(v)
}
// Decode decodes the binary reader into a tx type
2019-02-25 22:44:14 +00:00
func (v *TX) Decode(br *util.BinReader) {
br.Read(v)
}