// AddContract adds a Contract payload into a batch.
AddContract adds a Contract payload into a batch.
// AddContract adds a Contract payload into a batch .
func (b *Batch) AddContract(c Contract) error {
	if b.Size == 255 {
		return fmt.Errorf("batch cannot have more than 255 transactions")
	}
	b.Size++
	b.Tags = append(b.Tags, uint8(sys.TagContract))
	payload, err := c.Marshal()
	if err != nil {
		return errors.Wrap(err, "error marshaling contract")
	}
	b.Payloads = append(b.Payloads, payload)
	return nil
}
func ( b * Batch ) AddContract ( c Contract ) error { if b . Size == 255 { return fmt . Errorf ( " " ) } b . Size ++ b . Tags = append ( b . Tags , uint8 ( sys . TagContract ) ) payload , err := c . Marshal ( ) if err != nil { return errors . Wrap ( err , " " ) } b . Payloads = append ( b . Payloads , payload ) return nil }
AddContract adds a Contract payload into a batch.
AddContract adds a Contract payload into a batch .