2018-03-14 09:36:59 +00:00
|
|
|
package transaction
|
|
|
|
|
|
|
|
import (
|
2020-04-10 10:41:49 +00:00
|
|
|
"math/rand"
|
|
|
|
|
2020-03-03 14:21:42 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/io"
|
2018-03-14 09:36:59 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// ContractTX represents a contract transaction.
|
|
|
|
// This TX has not special attributes.
|
|
|
|
type ContractTX struct{}
|
|
|
|
|
2019-09-03 14:51:37 +00:00
|
|
|
// NewContractTX creates Transaction of ContractType type.
|
2018-12-21 09:32:18 +00:00
|
|
|
func NewContractTX() *Transaction {
|
|
|
|
return &Transaction{
|
2020-04-10 10:41:49 +00:00
|
|
|
Type: ContractType,
|
|
|
|
Version: 0,
|
|
|
|
Nonce: rand.Uint32(),
|
|
|
|
Data: &ContractTX{},
|
|
|
|
Attributes: []Attribute{},
|
2020-04-30 13:00:33 +00:00
|
|
|
Cosigners: []Cosigner{},
|
2020-04-10 10:41:49 +00:00
|
|
|
Inputs: []Input{},
|
|
|
|
Outputs: []Output{},
|
|
|
|
Scripts: []Witness{},
|
|
|
|
Trimmed: false,
|
2018-12-21 09:32:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-16 16:31:49 +00:00
|
|
|
// DecodeBinary implements Serializable interface.
|
|
|
|
func (tx *ContractTX) DecodeBinary(r *io.BinReader) {
|
2018-03-14 09:36:59 +00:00
|
|
|
}
|
|
|
|
|
2019-09-16 16:31:49 +00:00
|
|
|
// EncodeBinary implements Serializable interface.
|
|
|
|
func (tx *ContractTX) EncodeBinary(w *io.BinWriter) {
|
2018-03-14 09:36:59 +00:00
|
|
|
}
|