Skip to content
This repository was archived by the owner on Aug 9, 2024. It is now read-only.

fix(audit): check if authority hash already exists #149

Closed
wants to merge 1 commit into from
Closed
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: 7 additions & 0 deletions contracts/src/VectorX.sol
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,13 @@ contract VectorX is IVectorX, TimelockedUpgradeable {
revert AuthoritySetNotFound();
}

bytes32 nextAuthoritySetHash = authoritySetIdToHash[
_currentAuthoritySetId + 1
];
if (nextAuthoritySetHash != bytes32(0)) {
revert NextAuthoritySetExists();
}

bytes memory input = abi.encodePacked(
_currentAuthoritySetId,
currentAuthoritySetHash
Expand Down
Loading