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

Audit fix: Incorrect Encoding of Sealable Resume Proposal #158

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion contracts/committees/TiebreakerSubCommittee.sol
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ contract TiebreakerSubCommittee is HashConsensus, ProposalsList {
returns (bytes memory data, bytes32 key, uint256 nonce)
{
nonce = ITiebreakerCoreCommittee(TIEBREAKER_CORE_COMMITTEE).getSealableResumeNonce(sealable);
data = abi.encode(sealable, nonce);
data = abi.encode(ProposalType.ResumeSealable, sealable, nonce);
key = keccak256(data);
}
}
3 changes: 2 additions & 1 deletion test/unit/committees/TiebreakerSubCommittee.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ contract TiebreakerSubCommitteeUnitTest is UnitTest {
vm.prank(committeeMembers[2]);
vm.expectRevert(
abi.encodeWithSelector(
HashConsensus.HashIsNotScheduled.selector, keccak256(abi.encode(sealable, /*nonce */ 0))
HashConsensus.HashIsNotScheduled.selector,
keccak256(abi.encode(ProposalType.ResumeSealable, sealable, /*nonce */ 0))
)
);
tiebreakerSubCommittee.executeSealableResume(sealable);
Expand Down