Skip to content

Commit

Permalink
Merge pull request #158 from lidofinance/fix/encode-sealable-missing-…
Browse files Browse the repository at this point in the history
…type

Audit fix: Incorrect Encoding of Sealable Resume Proposal
  • Loading branch information
bulbozaur authored Nov 6, 2024
2 parents 071f033 + 17b5510 commit 9fecfff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

0 comments on commit 9fecfff

Please sign in to comment.