Upgradeable contract and updating signing domain version for EIP712Upgradeable

I'm developing an upgradeable smart contract that inherits from Initializable. My contract also inherits from EIP712Upgradeable, and so my initializer function is as follows:

function initialize() public virtual initializer {
        __ERC1155Supply_init();
        __EIP712_init(SIGNING_DOMAIN, SIGNATURE_VERSION);
        __AccessControl_init();

        owner = msg.sender;
    }

Note that SIGNATURE_VERSION is defined as a private constant string outside of the initialize function.

When I deploy new versions of my contract, I would like to update SIGNATURE_VERSION to invalidate anything that's been signed with a previous contract implementation. How would I go about updating the signing domain version (SIGNATURE_VERSION)?

I've tried updating the SIGNATURE_VERSION variable, but it appears that the contract still thinks that the SIGNATURE_VERSION is '1', rather than a more recent version, such as '2' or '3'.

Thank you for the help!

Hi @Austin326,

The __EIP712_init function has a note: "These parameters cannot be changed except through a smart contract upgrade."

So to update the signing domain version during an upgrade, you can use a reinitializer to call __EIP712_init again with a different signing domain version argument.