2018-03-14 10:36:59 +01:00
|
|
|
package transaction
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
)
|
|
|
|
|
|
|
|
// ContractTX represents a contract transaction.
|
|
|
|
// This TX has not special attributes.
|
|
|
|
type ContractTX struct{}
|
|
|
|
|
2019-09-03 17:51:37 +03:00
|
|
|
// NewContractTX creates Transaction of ContractType type.
|
2018-12-21 12:32:18 +03:00
|
|
|
func NewContractTX() *Transaction {
|
|
|
|
return &Transaction{
|
2019-01-25 14:20:35 +03:00
|
|
|
Type: ContractType,
|
2018-12-21 12:32:18 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-14 10:36:59 +01:00
|
|
|
// DecodeBinary implements the Payload interface.
|
|
|
|
func (tx *ContractTX) DecodeBinary(r io.Reader) error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeBinary implements the Payload interface.
|
|
|
|
func (tx *ContractTX) EncodeBinary(w io.Writer) error {
|
|
|
|
return nil
|
|
|
|
}
|
2019-08-30 11:28:30 +03:00
|
|
|
|
2019-09-03 17:51:37 +03:00
|
|
|
// Size returns serialized binary size for this transaction.
|
2019-08-30 11:28:30 +03:00
|
|
|
func (tx *ContractTX) Size() int {
|
|
|
|
return 0
|
|
|
|
}
|