We formulate and prove a log-algebraicity theorem for arbitrary rank Drinfeld modules dened over the polynomial ring Fq[\theta]. This generalizes results of Anderson for the
rank one case. As an application we show that certain special values of Goss L-functions are linear forms in Drinfeld logarithms and are transcendental.
We define the Heegner--Drinfeld cycle on the moduli stack of Drinfeld Shtukas of rank two with r-modifications for an even integer r. We prove an identity between (1) The r-th central derivative of the quadratic base change L-function associated to an everywhere unramified cuspidal automorphic representation π of PGL2; (2) The self-intersection number of the π-isotypic component of the Heegner--Drinfeld cycle. This identity can be viewed as a function-field analog of the Waldspurger and Gross--Zagier formula for higher derivatives of L-functions.