Last active
November 30, 2018 08:11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @dev - Get (domain name + top level) hash used for unique identifier | |
* @param domain | |
* @param topLevel | |
* @return domainHash | |
*/ | |
function getDomainHash(bytes memory domain, bytes12 topLevel) public pure returns(bytes32) { | |
// @dev - tightly pack parameters in struct for keccak256 | |
return keccak256(abi.encodePacked(domain, topLevel)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment