Skip to content

Commit

Permalink
Derive proposal ids to prevent stack to deep errors in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
apbendi committed Oct 11, 2023
1 parent f9b269a commit e469857
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/optimized/WormholeL2GovernorMetadataOptimized.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,15 @@ contract _AddProposal is WormholeL2GovernorMetadataOptimizedTest {
uint256 firstL1VoteStart,
uint256 firstL1VoteEnd,
bool firstIsCanceled,
uint256 secondProposalId,
uint256 secondL1VoteStart,
uint256 secondL1VoteEnd,
bool secondIsCanceled,
uint256 thirdProposalId,
uint256 thirdL1VoteStart,
uint256 thirdL1VoteEnd,
bool thirdIsCanceled
) public {
vm.assume(firstProposalId != secondProposalId);
vm.assume(thirdProposalId != secondProposalId);
vm.assume(thirdProposalId != firstProposalId);
uint256 secondProposalId = uint256(keccak256(abi.encodePacked(firstProposalId)));
uint256 thirdProposalId = uint256(keccak256(abi.encodePacked(secondProposalId)));

l2GovernorMetadata.exposed_addProposal(
firstProposalId, firstL1VoteStart, firstL1VoteEnd, firstIsCanceled
Expand Down

0 comments on commit e469857

Please sign in to comment.