Commit 289964c6 by github-actions

Merge upstream openzeppelin-contracts into upstream-patched

parents 5f72ae71 a6a4c042
...@@ -83,7 +83,8 @@ abstract contract EIP712 { ...@@ -83,7 +83,8 @@ abstract contract EIP712 {
return keccak256(abi.encodePacked("\x19\x01", _domainSeparatorV4(), structHash)); return keccak256(abi.encodePacked("\x19\x01", _domainSeparatorV4(), structHash));
} }
function _getChainId() private pure returns (uint256 chainId) { function _getChainId() private view returns (uint256 chainId) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
// solhint-disable-next-line no-inline-assembly // solhint-disable-next-line no-inline-assembly
assembly { assembly {
chainId := chainid() chainId := chainid()
......
...@@ -22,7 +22,8 @@ contract EIP712External is EIP712 { ...@@ -22,7 +22,8 @@ contract EIP712External is EIP712 {
require(recoveredSigner == signer); require(recoveredSigner == signer);
} }
function getChainId() external pure returns (uint256 chainId) { function getChainId() external view returns (uint256 chainId) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
// solhint-disable-next-line no-inline-assembly // solhint-disable-next-line no-inline-assembly
assembly { assembly {
chainId := chainid() chainId := chainid()
......
...@@ -14,7 +14,8 @@ contract ERC20PermitMock is ERC20Permit { ...@@ -14,7 +14,8 @@ contract ERC20PermitMock is ERC20Permit {
_mint(initialAccount, initialBalance); _mint(initialAccount, initialBalance);
} }
function getChainId() external pure returns (uint256 chainId) { function getChainId() external view returns (uint256 chainId) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
// solhint-disable-next-line no-inline-assembly // solhint-disable-next-line no-inline-assembly
assembly { assembly {
chainId := chainid() chainId := chainid()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment