Is there method update original Domain Name and Version or add new Domain Name and Version in EIP712 when contract is upgraded

I'm trying to use uups pattern to upgrade smart contract right now.
my main problem is to update EIP712 domain version.
Of course in comment, it is impossible in upgrade contract, but is there any possibility to add new domain and version name?
When I check source code, __EIP721__init function has onlyInitializing modifier so looks it is possible to set value when deploy smart contract.
But just find interesting things, it has gap variables, its comment says it is for add new domain name and version.

Please let me know it is possible or not if someone has experienced this already.


I'm having this exact issue. Did you find an answer?

In update version of Openzeppelin, there are reInitializer.
This issue happen because initializer restrict reinitialize action in next version contract.
If you use reInitializer modifier, it is possible.
but My other problem, in hardhat upgrade proxy method, can't call initializer again.
it was possible manual method call after upgrade.
Hope to be helpful this to you.

Thank you so much for your reply! I didn't know there was a "reinitializer" function! I'll give it a try

1 Like