It sounds great but I'm not so sure that it would work. State law doesn't trump federal law...does it?
Congress cannot pass a law that violates a state law or a state constitution (Article Six, Section Two). Of course we all know they do this all the time, and the Constitution doesn't stop them.
The Federal Government can only enact limited legislation, and any restriction on firearms is not permitted by the US Constitution. Sadly the US Supreme Court has trampled our Constitution into a meaningless piece of parchment.
In such a situation, state law would trump federal law. The states and the people are the supreme power in the United States, not the Federal Government which so many people believe.
The states can enact legislation that prohibits the enforcement of an illegal or unconstitutional federal law in that state, and they have every right to do so. The states can do much more than the Federal Government.
Read over Article One and Article Two of the US Constitution to see what powers the Federal Government and Congress truly have, and you will be amazed at how unconstitutional our current Federal Government is.