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!