The EU is a union of states and citizens. The legal nature of this Union is disputable. However, most of the scholars admit that it works on federal bases; in the Brussels language called „the communitarian method”.
If the EU is a federation, it is a sui generis federation of sovereign states. Those states have transferred to the European transnational institutions, they have established by their joint will, the power to exercise on their behalf, to their benefit and in their common interests some of their national competences. By doing this the respective states did not give up their sovereignty, but simply decided to exercise parts of it in common, for the sake of their common security. Likewise, they did not abrogate their Constitutions, but it was precisely because those Constitutions allowed them to enter such international agreements that they have signed the Treaty of the European Union (TEU) and the Treaty on the Functioning of the European Union (TFEU).
That explains why the above-mentioned founding legal instruments of the EU were adopted and later modified by and within intergovernmental conferences, as well as why they had to be ratified by all national parliaments of the signatory states.
Those treaties include the principle of „attribution”, which means that the European institutions could not have, accept or enforce any power which has been not explicitly attributed to them by every and all member states. This „attribution” is achieved and could only be achieved in full respect and in complete observance of the respective national Constitutions of the member states.