def append_pushdata(data, opcode: nil)
      raise ArgumentError, "No data provided" if !data
      encoded_pushdata = self.class.encode_pushdata(data, opcode: opcode)
      if !encoded_pushdata
        raise ArgumentError, "Cannot encode pushdata with opcode #{opcode}"
      end
      @chunks << ScriptChunk.new(encoded_pushdata)
      return self
    end
def append_pushdata(data, opcode: nil)
      raise ArgumentError, "No data provided" if !data
      encoded_pushdata = self.class.encode_pushdata(data, opcode: opcode)
      if !encoded_pushdata
        raise ArgumentError, "Cannot encode pushdata with opcode #{opcode}"
      end
      @chunks << ScriptChunk.new(encoded_pushdata)
      return self
    end
Appends a pushdata opcode with the most compact encoding.
 Optional opcode may be equal to OP_PUSHDATA1, OP_PUSHDATA2, or OP_PUSHDATA4.
 ArgumentError is raised if opcode does not represent a given data length.