  Measuring the metallicity and carbon-to-oxygen (C/O) ratio in exoplanet
atmospheres is a fundamental step towards constraining the dominant chemical
processes at work and, if in equilibrium, revealing planet formation histories.
Transmission spectroscopy provides the necessary means by constraining the
abundances of oxygen- and carbon-bearing species; however, this requires broad
wavelength coverage, moderate spectral resolution, and high precision that,
together, are not achievable with previous observatories. Now that JWST has
commenced science operations, we are able to observe exoplanets at previously
uncharted wavelengths and spectral resolutions. Here we report time-series
observations of the transiting exoplanet WASP-39b using JWST's Near InfraRed
Camera (NIRCam). The long-wavelength spectroscopic and short-wavelength
photometric light curves span 2.0 - 4.0 $\mu$m, exhibit minimal systematics,
and reveal well-defined molecular absorption features in the planet's spectrum.
Specifically, we detect gaseous H$_2$O in the atmosphere and place an upper
limit on the abundance of CH$_4$. The otherwise prominent CO$_2$ feature at 2.8
$\mu$m is largely masked by H$_2$O. The best-fit chemical equilibrium models
favour an atmospheric metallicity of 1-100$\times$ solar (i.e., an enrichment
of elements heavier than helium relative to the Sun) and a sub-stellar
carbon-to-oxygen (C/O) ratio. The inferred high metallicity and low C/O ratio
may indicate significant accretion of solid materials during planet formation
or disequilibrium processes in the upper atmosphere.
