Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e02960964 | |||
| c8188c0bbd | |||
| cec0800c54 | |||
| b079293e37 | |||
| a686a906bc |
@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## 3.4.2 (2021-08-26)
|
||||
|
||||
* `TimelockController`: Add additional isOperationReady check.
|
||||
|
||||
## 3.4.1 (2021-03-03)
|
||||
|
||||
* `ERC721`: made `_approve` an internal function (was private).
|
||||
|
||||
## 3.4.0 (2021-02-02)
|
||||
|
||||
* `BeaconProxy`: added new kind of proxy that allows simultaneous atomic upgrades. ([#2411](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2411))
|
||||
|
||||
@ -227,7 +227,7 @@ contract TimelockController is AccessControl {
|
||||
*/
|
||||
function execute(address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt) public payable virtual onlyRole(EXECUTOR_ROLE) {
|
||||
bytes32 id = hashOperation(target, value, data, predecessor, salt);
|
||||
_beforeCall(predecessor);
|
||||
_beforeCall(id, predecessor);
|
||||
_call(id, 0, target, value, data);
|
||||
_afterCall(id);
|
||||
}
|
||||
@ -246,7 +246,7 @@ contract TimelockController is AccessControl {
|
||||
require(targets.length == datas.length, "TimelockController: length mismatch");
|
||||
|
||||
bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt);
|
||||
_beforeCall(predecessor);
|
||||
_beforeCall(id, predecessor);
|
||||
for (uint256 i = 0; i < targets.length; ++i) {
|
||||
_call(id, i, targets[i], values[i], datas[i]);
|
||||
}
|
||||
@ -256,7 +256,8 @@ contract TimelockController is AccessControl {
|
||||
/**
|
||||
* @dev Checks before execution of an operation's calls.
|
||||
*/
|
||||
function _beforeCall(bytes32 predecessor) private view {
|
||||
function _beforeCall(bytes32 id, bytes32 predecessor) private view {
|
||||
require(isOperationReady(id), "TimelockController: operation is not ready");
|
||||
require(predecessor == bytes32(0) || isOperationDone(predecessor), "TimelockController: missing dependency");
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openzeppelin/contracts",
|
||||
"description": "Secure Smart Contract library for Solidity",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.2",
|
||||
"files": [
|
||||
"**/*.sol",
|
||||
"/build/contracts/*.json",
|
||||
|
||||
@ -449,7 +449,12 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable
|
||||
return (retval == _ERC721_RECEIVED);
|
||||
}
|
||||
|
||||
function _approve(address to, uint256 tokenId) private {
|
||||
/**
|
||||
* @dev Approve `to` to operate on `tokenId`
|
||||
*
|
||||
* Emits an {Approval} event.
|
||||
*/
|
||||
function _approve(address to, uint256 tokenId) internal virtual {
|
||||
_tokenApprovals[tokenId] = to;
|
||||
emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner
|
||||
}
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "openzeppelin-solidity",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "openzeppelin-solidity",
|
||||
"description": "Secure Smart Contract library for Solidity",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.2",
|
||||
"files": [
|
||||
"/contracts/**/*.sol",
|
||||
"/build/contracts/*.json",
|
||||
|
||||
Reference in New Issue
Block a user