Implementation of EIP-2612 permit function for UBI, as consequence of issue #92.
Comments for the reviewers:
Two internal functions added _buildDomainSeparator and _getCurrentChainId. Looking at UBI code, looks like inline code is preferred instead of internal functions, preferring gas optimization over non-duplicated code. Maybe is a change to perform.
Verify if version number is correct. It was set as 2 because I thought this could be the second version of UBI contract, but could be wrong. Even being right, you could prefer to use 0 or 1.
Implementation of EIP-2612 permit function for UBI, as consequence of issue #92.
Comments for the reviewers:
_buildDomainSeparator
and_getCurrentChainId
. Looking at UBI code, looks like inline code is preferred instead of internal functions, preferring gas optimization over non-duplicated code. Maybe is a change to perform.^2.0.8
to^2.0.9
becauseeth_signTypedData_v4
was needed for testing and Hardhat added support for it at v2.0.9.