func SerializeTransactionWithArguments(fnName string, args ...[]byte) ([]byte, error) {
	buf := bytes.NewBuffer([]byte{})
	if len(fnName) > 255 {
		return nil, errors.New("function name too long")
	}

	buf.Write([]byte{byte(len(fnName))})
	buf.Write([]byte(fnName))

	argsLenBuf := make([]byte, binary.MaxVarintLen16)
	n := binary.PutUvarint(argsLenBuf, uint64(len(args)))
	buf.Write(argsLenBuf[:n])

	for i := range args {
		argLenBuf := make([]byte, binary.MaxVarintLen16)
		n := binary.PutUvarint(argLenBuf, uint64(len(args[i])))
		buf.Write(argLenBuf[:n])

		buf.Write(args[i])
	}

	return buf.Bytes(), nil
}
// SerializeTransactionWithArguments serializes a transaction with the given arguments.
SerializeTransactionWithArguments serializes a transaction with the given arguments.
// SerializeTransactionWithArguments serializes a transaction with the given arguments .
func SerializeTransactionWithArguments(fnName string, args ...[]byte) ([]byte, error) {
	buf := bytes.NewBuffer([]byte{})
	if len(fnName) > 255 {
		return nil, errors.New("function name too long")
	}
	buf.Write([]byte{byte(len(fnName))})
	buf.Write([]byte(fnName))
	argsLenBuf := make([]byte, binary.MaxVarintLen16)
	n := binary.PutUvarint(argsLenBuf, uint64(len(args)))
	buf.Write(argsLenBuf[:n])
	for i := range args {
		argLenBuf := make([]byte, binary.MaxVarintLen16)
		n := binary.PutUvarint(argLenBuf, uint64(len(args[i])))
		buf.Write(argLenBuf[:n])
		buf.Write(args[i])
	}
	return buf.Bytes(), nil
}
func SerializeTransactionWithArguments ( fnName string , args ... [ ] byte ) ( [ ] byte , error ) { buf := bytes . NewBuffer ( [ ] byte { } ) if len ( fnName ) > 255 { return nil , errors . New ( " " ) } buf . Write ( [ ] byte { byte ( len ( fnName ) ) } ) buf . Write ( [ ] byte ( fnName ) ) argsLenBuf := make ( [ ] byte , binary . MaxVarintLen16 ) n := binary . PutUvarint ( argsLenBuf , uint64 ( len ( args ) ) ) buf . Write ( argsLenBuf [ : n ] ) for i := range args { argLenBuf := make ( [ ] byte , binary . MaxVarintLen16 ) n := binary . PutUvarint ( argLenBuf , uint64 ( len ( args [ i ] ) ) ) buf . Write ( argLenBuf [ : n ] ) buf . Write ( args [ i ] ) } return buf . Bytes ( ) , nil }
SerializeTransactionWithArguments serializes a transaction with the given arguments.
SerializeTransactionWithArguments serializes a transaction with the given arguments .