Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace immutable with constant for _PERMIT_TYPEHASH #3196

Merged
merged 6 commits into from
Mar 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: ensure transpiler compatibility
  • Loading branch information
pcaversaccio authored Mar 9, 2022
commit 201d3bff07c9fa67b3898fcc5a7eb89d0ea85592
7 changes: 7 additions & 0 deletions contracts/token/ERC20/extensions/draft-ERC20Permit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {
// solhint-disable-next-line var-name-mixedcase
bytes32 private constant _PERMIT_TYPEHASH =
keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
/**
* @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.
* However, to ensure consistency with the upgradeable transpiler, we will continue
* to reserve a slot.
* @custom:oz-renamed-from _PERMIT_TYPEHASH
*/
bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;

/**
* @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
Expand Down