Commit 219d0cb5 by Francisco Giordano

Merge remote-tracking branch 'vanilla/release-v3.4-solc-0.7' into patched/release-v3.4-solc-0.7

parents 4a0438aa 6753d012
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
# Changelog # Changelog
## 3.4.2-solc-0.7
* `TimelockController`: Add additional isOperationReady check.
## 3.4.1-solc-0.7 (2021-03-03) ## 3.4.1-solc-0.7 (2021-03-03)
* `ERC721`: made `_approve` an internal function (was private). * `ERC721`: made `_approve` an internal function (was private).
......
...@@ -227,7 +227,7 @@ contract TimelockController is AccessControl { ...@@ -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) { 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); bytes32 id = hashOperation(target, value, data, predecessor, salt);
_beforeCall(predecessor); _beforeCall(id, predecessor);
_call(id, 0, target, value, data); _call(id, 0, target, value, data);
_afterCall(id); _afterCall(id);
} }
...@@ -246,7 +246,7 @@ contract TimelockController is AccessControl { ...@@ -246,7 +246,7 @@ contract TimelockController is AccessControl {
require(targets.length == datas.length, "TimelockController: length mismatch"); require(targets.length == datas.length, "TimelockController: length mismatch");
bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt); bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt);
_beforeCall(predecessor); _beforeCall(id, predecessor);
for (uint256 i = 0; i < targets.length; ++i) { for (uint256 i = 0; i < targets.length; ++i) {
_call(id, i, targets[i], values[i], datas[i]); _call(id, i, targets[i], values[i], datas[i]);
} }
...@@ -256,7 +256,8 @@ contract TimelockController is AccessControl { ...@@ -256,7 +256,8 @@ contract TimelockController is AccessControl {
/** /**
* @dev Checks before execution of an operation's calls. * @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"); require(predecessor == bytes32(0) || isOperationDone(predecessor), "TimelockController: missing dependency");
} }
......
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