Skip to content

Commit

Permalink
fix: fix goverannce helper
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Jun 29, 2022
1 parent 37884c8 commit 38d6284
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/GovHelpers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,13 @@ library GovHelpers {
* Alter storage slots so the proposal passes
*/
function passVoteAndExecute(Vm vm, uint256 proposalId) internal {
IAaveGov.ProposalWithoutVotes memory proposal = getProposalById(proposalId);
uint256 power = 5000000 ether;
vm.roll(block.number + 1);
vm.store(address(GOV), _getProposalSlot(proposalId), bytes32(power));
uint256 endBlock = proposal.endBlock;
uint256 endBlock = GOV.getProposalById(proposalId).endBlock;
vm.roll(endBlock + 1);
GOV.queue(proposalId);
uint256 executionTime = proposal.executionTime;
uint256 executionTime = GOV.getProposalById(proposalId).executionTime;
vm.warp(executionTime + 1);
GOV.execute(proposalId);
}
Expand Down

0 comments on commit 38d6284

Please sign in to comment.