Add Prettier for linting and fix Solhint config (#2697)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
@ -33,6 +33,7 @@ abstract contract EIP712 {
|
||||
bytes32 private immutable _HASHED_NAME;
|
||||
bytes32 private immutable _HASHED_VERSION;
|
||||
bytes32 private immutable _TYPE_HASH;
|
||||
|
||||
/* solhint-enable var-name-mixedcase */
|
||||
|
||||
/**
|
||||
@ -50,7 +51,9 @@ abstract contract EIP712 {
|
||||
constructor(string memory name, string memory version) {
|
||||
bytes32 hashedName = keccak256(bytes(name));
|
||||
bytes32 hashedVersion = keccak256(bytes(version));
|
||||
bytes32 typeHash = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
|
||||
bytes32 typeHash = keccak256(
|
||||
"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
|
||||
);
|
||||
_HASHED_NAME = hashedName;
|
||||
_HASHED_VERSION = hashedVersion;
|
||||
_CACHED_CHAIN_ID = block.chainid;
|
||||
@ -69,16 +72,12 @@ abstract contract EIP712 {
|
||||
}
|
||||
}
|
||||
|
||||
function _buildDomainSeparator(bytes32 typeHash, bytes32 name, bytes32 version) private view returns (bytes32) {
|
||||
return keccak256(
|
||||
abi.encode(
|
||||
typeHash,
|
||||
name,
|
||||
version,
|
||||
block.chainid,
|
||||
address(this)
|
||||
)
|
||||
);
|
||||
function _buildDomainSeparator(
|
||||
bytes32 typeHash,
|
||||
bytes32 name,
|
||||
bytes32 version
|
||||
) private view returns (bytes32) {
|
||||
return keccak256(abi.encode(typeHash, name, version, block.chainid, address(this)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user