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

Derive proposal ids to prevent stack to deep errors in tests #81

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Changes from all commits
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
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
Loading