Does there exist a smooth ($\mathcal C^\infty$) function $f \colon \mathbb R \to \mathbb R$ such that
$$\int_{-\infty}^\infty t^n f(t) \,\mathrm{d}t = \begin{cases} 1 & n = 0 \\ 0 & n \ge 1\end{cases}?$$
It certainly looks like an application of the Fourier transform and the following formula: if $$\hat f (\xi) = \int_{\mathbb R} f(x) \exp(-2\pi i x \xi) \,\mathrm{d}x,$$ then the Fourier transform of $x^n f(x)$ equals $$\frac{i^n}{2^n \pi^n} \frac{\mathrm{d}^n \hat f(\xi)}{\mathrm{d} \xi^n}.$$
How to proceed?
Yes, a function like that exists. You can also take it to be in the Schwartz space $\mathcal{S}$, using the Fourier transform.
Consider a smooth cutoff $g$, which is supported in $[-1,1]$, with $g(0)=1$ and $g^{(n)}(0)=0$ for all $n\geq 1$. Then $g$ belongs to $\mathcal{S}$, therefore there exists $f\in\mathcal{S}$ such that $\hat{f}=g$. Then, $$\int_{\mathbb R}f(t)\,dt=\int_{\mathbb R}f(t)e^{-2\pi it\cdot 0}\,dt=\hat{f}(0)=g(0)=1,$$ and also, for $n\geq 1$, $$\int_{\mathbb R}t^nf(t)\,dt=\int_{\mathbb R}t^nf(t)e^{-2\pi i\cdot 0}\,dt=\widehat{(t^nf(t))}(0)=\frac{i^n}{2^n\pi^n}(\hat{f})^{(n)}(0)=\frac{i^n}{2^n\pi^n}g^{(n)}(0)=0.$$