Commit b29ef5e1 by github-actions

Transpile e05d978e

parent 6521c5c0
...@@ -65,6 +65,13 @@ abstract contract GovernorUpgradeable is Initializable, ContextUpgradeable, ERC1 ...@@ -65,6 +65,13 @@ abstract contract GovernorUpgradeable is Initializable, ContextUpgradeable, ERC1
} }
/** /**
* @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}. * @dev See {IERC165-supportsInterface}.
*/ */
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) { function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) {
......
...@@ -186,8 +186,9 @@ abstract contract GovernorTimelockCompoundUpgradeable is Initializable, IGoverno ...@@ -186,8 +186,9 @@ abstract contract GovernorTimelockCompoundUpgradeable is Initializable, IGoverno
) internal virtual override { ) internal virtual override {
uint256 eta = proposalEta(proposalId); uint256 eta = proposalEta(proposalId);
require(eta > 0, "GovernorTimelockCompound: proposal not yet queued"); require(eta > 0, "GovernorTimelockCompound: proposal not yet queued");
AddressUpgradeable.sendValue(payable(_timelock), msg.value);
for (uint256 i = 0; i < targets.length; ++i) { 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);
} }
} }
......
...@@ -37,8 +37,6 @@ contract GovernorCompMockUpgradeable is Initializable, GovernorUpgradeable, Gove ...@@ -37,8 +37,6 @@ contract GovernorCompMockUpgradeable is Initializable, GovernorUpgradeable, Gove
_votingPeriod = votingPeriod_; _votingPeriod = votingPeriod_;
} }
receive() external payable {}
function votingDelay() public view override returns (uint256) { function votingDelay() public view override returns (uint256) {
return _votingDelay; return _votingDelay;
} }
......
...@@ -40,8 +40,6 @@ contract GovernorMockUpgradeable is Initializable, GovernorUpgradeable, Governor ...@@ -40,8 +40,6 @@ contract GovernorMockUpgradeable is Initializable, GovernorUpgradeable, Governor
_votingPeriod = votingPeriod_; _votingPeriod = votingPeriod_;
} }
receive() external payable {}
function votingDelay() public view override returns (uint256) { function votingDelay() public view override returns (uint256) {
return _votingDelay; return _votingDelay;
} }
......
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