Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Governor + CompoundTimelock to manage native tokens (eth) in and out of the timelock contract. #2849

Merged
merged 3 commits into from
Sep 17, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor compound timelock module
Amxx committed Sep 13, 2021
commit 3c29f6b7ff34ce9f0c1400a2b86bfe75a576bd3d
3 changes: 2 additions & 1 deletion contracts/governance/extensions/GovernorTimelockCompound.sol
Original file line number Diff line number Diff line change
@@ -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: i == 0 ? msg.value : 0}(targets[i], values[i], "", calldatas[i], eta);
_timelock.executeTransaction(targets[i], values[i], "", calldatas[i], eta);
}
}