From 987fd457dd570c40277cd72aaf8e73f0df1b976e Mon Sep 17 00:00:00 2001 From: Shahul Hameed <10547529+shahthepro@users.noreply.github.com> Date: Tue, 28 May 2024 19:12:06 +0530 Subject: [PATCH] Fix timelock warping (#431) --- contracts/utils/GovProposalHelper.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contracts/utils/GovProposalHelper.sol b/contracts/utils/GovProposalHelper.sol index 13ba78aa..d7a877cd 100644 --- a/contracts/utils/GovProposalHelper.sol +++ b/contracts/utils/GovProposalHelper.sol @@ -169,8 +169,9 @@ library GovProposalHelper { if (state == IGovernor.ProposalState.Queued) { console.log("Executing proposal"); // Wait for timelock - vm.roll(governance.proposalEta(proposalId) + 20); - vm.warp(block.timestamp + 2 days); + uint256 propEta = governance.proposalEta(proposalId); + vm.roll(block.number + 10); + vm.warp(propEta + 20); governance.execute(proposalId);