-
Couldn't load subscription status.
- Fork 12.3k
Open
Description
Since EIP-5267 got merged I wanted to raise a question. In EIP-712's definition of the domainSeparator a so-called salt is also listed:
bytes32 saltan disambiguating salt for the protocol. This can be used as a domain separator of last resort.
EIP-5267 also supports the salt parameters for retrieval via the fields parameter. Now, my question: shouldn't we adjust the EIP712 to incorporate this salt parameter?
I.e.:
- bytes32 private constant _TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
+ bytes32 private constant _TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)");and
function _buildDomainSeparator(bytes32 salt) private view returns (bytes32) {
return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this), salt));
}The above are illustrations and not final code suggestions.
goncaloMagalhaes
Metadata
Metadata
Assignees
Labels
No labels