Skip to content

Commit

Permalink
Use block.chainid instead of opening an assembley block
Browse files Browse the repository at this point in the history
  • Loading branch information
cristovaoth committed Sep 28, 2023
1 parent 9aee51a commit 5f60895
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions contracts/signature/Eip712Signature.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,8 @@ abstract contract EIP712Signature {
bytes calldata data,
uint256 _nonce
) private view returns (bytes32) {
uint256 chainId;
assembly {
chainId := chainid()
}

bytes32 domainSeparator = keccak256(
abi.encode(DOMAIN_SEPARATOR_TYPEHASH, chainId, this)
abi.encode(DOMAIN_SEPARATOR_TYPEHASH, block.chainid, this)
);
return
keccak256(
Expand Down

0 comments on commit 5f60895

Please sign in to comment.