Commit 4b61a744 by github-actions

Transpile fdc9cc04

parent 3a51d255
......@@ -10,6 +10,7 @@
* `ERC20FlashMint`: support infinite allowance when paying back a flash loan. ([#3226](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3226))
* `Governor`: Add a way to parameterize votes. This can be used to implement voting systems such as fractionalized voting, ERC721 based voting, or any number of other systems. The `params` argument added to `_countVote` method, and included in the newly added `_getVotes` method, can be used by counting and voting modules respectively for such purposes.
* `TimelockController`: Add a separate canceller role for the ability to cancel. ([#3165](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3165))
* `draft-ERC20Permit`: replace `immutable` with `constant` for `_PERMIT_TYPEHASH` since the `keccak256` of string literals is treated specially and the hash is evaluated at compile time. ([#3196](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3196))
### Breaking changes
......
......@@ -147,5 +147,5 @@ contract VestingWalletUpgradeable is Initializable, ContextUpgradeable {
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[48] private __gap;
uint256[46] private __gap;
}
......@@ -39,5 +39,5 @@ abstract contract GovernorVotesCompUpgradeable is Initializable, GovernorUpgrade
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
uint256[49] private __gap;
}
......@@ -39,5 +39,5 @@ abstract contract GovernorVotesUpgradeable is Initializable, GovernorUpgradeable
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
uint256[49] private __gap;
}
......@@ -34,5 +34,5 @@ contract ERC20DecimalsMockUpgradeable is Initializable, ERC20Upgradeable {
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
uint256[49] private __gap;
}
......@@ -61,5 +61,5 @@ contract ERC3156FlashBorrowerMockUpgradeable is Initializable, IERC3156FlashBorr
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
uint256[49] private __gap;
}
......@@ -50,5 +50,5 @@ contract ERC721ReceiverMockUpgradeable is Initializable, IERC721ReceiverUpgradea
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
uint256[49] private __gap;
}
......@@ -79,5 +79,5 @@ abstract contract PullPaymentUpgradeable is Initializable {
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
uint256[49] private __gap;
}
......@@ -45,5 +45,5 @@ abstract contract ERC20CappedUpgradeable is Initializable, ERC20Upgradeable {
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
uint256[49] private __gap;
}
......@@ -60,5 +60,5 @@ abstract contract ERC20WrapperUpgradeable is Initializable, ERC20Upgradeable {
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
uint256[49] private __gap;
}
......@@ -26,7 +26,16 @@ abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IER
mapping(address => CountersUpgradeable.Counter) private _nonces;
// solhint-disable-next-line var-name-mixedcase
bytes32 private _PERMIT_TYPEHASH;
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
*/
// solhint-disable-next-line var-name-mixedcase
bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;
/**
* @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
......@@ -35,11 +44,9 @@ abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IER
*/
function __ERC20Permit_init(string memory name) internal onlyInitializing {
__EIP712_init_unchained(name, "1");
__ERC20Permit_init_unchained(name);
}
function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {
_PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");}
function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}
/**
* @dev See {IERC20Permit-permit}.
......@@ -96,5 +103,5 @@ abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IER
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
uint256[48] private __gap;
}
......@@ -88,5 +88,5 @@ contract TokenTimelockUpgradeable is Initializable {
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
uint256[47] private __gap;
}
......@@ -115,5 +115,5 @@ abstract contract EIP712Upgradeable is Initializable {
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
uint256[48] private __gap;
}
......@@ -136,7 +136,7 @@ In order for our contract to receive ERC1155 tokens we can inherit from the conv
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC1155/ERC1155Holder.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
contract MyContract is ERC1155Holder {
}
......
......@@ -52,7 +52,7 @@
},
"homepage": "https://openzeppelin.com/contracts/",
"devDependencies": {
"@nomiclabs/hardhat-truffle5": "^2.0.0",
"@nomiclabs/hardhat-truffle5": "^2.0.5",
"@nomiclabs/hardhat-web3": "^2.0.0",
"@openzeppelin/docs-utils": "^0.1.0",
"@openzeppelin/test-helpers": "^0.5.13",
......@@ -67,7 +67,7 @@
"ethereumjs-util": "^7.0.7",
"ethereumjs-wallet": "^1.0.1",
"graphlib": "^2.1.8",
"hardhat": "^2.0.6",
"hardhat": "^2.9.1",
"hardhat-gas-reporter": "^1.0.4",
"keccak256": "^1.0.2",
"lodash.startcase": "^4.4.0",
......
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