It’s a federal law. And yes the supreme court repealed it, but then congress basically said “oh, yes we can”, slightly rewrote it and passed it again.
If memory serves, the fed law also states something to the effect "unless authorized iaw state law..."
I thought the Senate tried and the House shot it down?