mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-03 13:58:37 +00:00
ddd1d92ff1
The idea here is to preserve the history of `dev` branch development and its code when merging with the `master`. Later this code could be moved into the masters code where appropriate.
33 lines
820 B
Go
33 lines
820 B
Go
package transaction
|
|
|
|
import (
|
|
"github.com/CityOfZion/neo-go/pkg/wire/payload/transaction/types"
|
|
"github.com/CityOfZion/neo-go/pkg/wire/payload/transaction/version"
|
|
"github.com/CityOfZion/neo-go/pkg/wire/util"
|
|
)
|
|
|
|
//Enrollment represents an Enrollment transaction on the neo network
|
|
type Enrollment struct {
|
|
*Base
|
|
Key PublicKey
|
|
}
|
|
|
|
//NewEnrollment returns an Enrollment transaction
|
|
func NewEnrollment(ver version.TX) *Enrollment {
|
|
basicTrans := createBaseTransaction(types.Enrollment, ver)
|
|
|
|
enrollment := &Enrollment{
|
|
Base: basicTrans,
|
|
}
|
|
enrollment.encodeExclusive = enrollment.encodeExcl
|
|
enrollment.decodeExclusive = enrollment.decodeExcl
|
|
return enrollment
|
|
}
|
|
|
|
func (e *Enrollment) encodeExcl(bw *util.BinWriter) {
|
|
e.Key.Encode(bw)
|
|
}
|
|
|
|
func (e *Enrollment) decodeExcl(br *util.BinReader) {
|
|
e.Key.Decode(br)
|
|
}
|