California will be the first state to end oil extraction, phasing it out by 2045.