code: func (pub *Impl) SubmitToSingleCTWithResult(ctx context.Context, req *pubpb.Request) (*pubpb.Result, error) {
  	cert, err := x509.ParseCertificate(req.Der)
  	if err != nil {
  		pub.log.AuditErrf("Failed to parse certificate: %s", err)
  		return nil, err
  	}
  
  	chain := append([]ct.ASN1Cert{ct.ASN1Cert{Data: req.Der}}, pub.issuerBundle...)
  
  	// Add a log URL/pubkey to the cache, if already present the
  	// existing *Log will be returned, otherwise one will be constructed, added
  	// and returned.
  	ctLog, err := pub.ctLogsCache.AddLog(*req.LogURL, *req.LogPublicKey, pub.log)
  	if err != nil {
  		pub.log.AuditErrf("Making Log: %s", err)
  		return nil, err
  	}
  
  	isPrecert := false
  	if req.Precert != nil {
  		isPrecert = *req.Precert
  	}
  
  	sct, err := pub.singleLogSubmit(
  		ctx,
  		chain,
  		isPrecert,
  		core.SerialToString(cert.SerialNumber),
  		ctLog)
  	if err != nil {
  		if canceled.Is(err) {
  			return nil, err
  		}
  		var body string
  		if respErr, ok := err.(jsonclient.RspError); ok && respErr.StatusCode < 500 {
  			body = string(respErr.Body)
  		}
  		pub.log.AuditErrf("Failed to submit certificate to CT log at %s: %s Body=%q",
  			ctLog.uri, err, body)
  		return nil, err
  	}
  
  	sctBytes, err := tls.Marshal(*sct)
  	if err != nil {
  		return nil, err
  	}
  	return &pubpb.Result{Sct: sctBytes}, nil
  }
docs: // SubmitToSingleCTWithResult will submit the certificate represented by certDER to the CT
  // log specified by log URL and public key (base64) and return the SCT to the caller