Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
e05d978e
Commit
e05d978e
authored
Sep 17, 2021
by
github-actions
Browse files
Options
Browse Files
Download
Plain Diff
Merge upstream master into patched/master
parents
6bd19512
01f2ff1b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
Governor.sol
contracts/governance/Governor.sol
+7
-0
GovernorTimelockCompound.sol
contracts/governance/extensions/GovernorTimelockCompound.sol
+2
-1
GovernorCompMock.sol
contracts/mocks/GovernorCompMock.sol
+0
-2
GovernorMock.sol
contracts/mocks/GovernorMock.sol
+0
-2
No files found.
contracts/governance/Governor.sol
View file @
e05d978e
...
...
@@ -56,6 +56,13 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
}
/**
* @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract)
*/
receive() external payable virtual {
require(_executor() == address(this));
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {
...
...
contracts/governance/extensions/GovernorTimelockCompound.sol
View file @
e05d978e
...
...
@@ -177,8 +177,9 @@ abstract contract GovernorTimelockCompound is IGovernorTimelock, Governor {
) internal virtual override {
uint256 eta = proposalEta(proposalId);
require(eta > 0, "GovernorTimelockCompound: proposal not yet queued");
Address.sendValue(payable(_timelock), msg.value);
for (uint256 i = 0; i < targets.length; ++i) {
_timelock.executeTransaction
{value: values[i]}
(targets[i], values[i], "", calldatas[i], eta);
_timelock.executeTransaction(targets[i], values[i], "", calldatas[i], eta);
}
}
...
...
contracts/mocks/GovernorCompMock.sol
View file @
e05d978e
...
...
@@ -20,8 +20,6 @@ contract GovernorCompMock is Governor, GovernorVotesComp, GovernorCountingSimple
_votingPeriod = votingPeriod_;
}
receive() external payable {}
function votingDelay() public view override returns (uint256) {
return _votingDelay;
}
...
...
contracts/mocks/GovernorMock.sol
View file @
e05d978e
...
...
@@ -21,8 +21,6 @@ contract GovernorMock is Governor, GovernorVotesQuorumFraction, GovernorCounting
_votingPeriod = votingPeriod_;
}
receive() external payable {}
function votingDelay() public view override returns (uint256) {
return _votingDelay;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment