Skip to content

Commit 0c9ec6e

Browse files
Rename validVerifierType modifier to respect good practices
1 parent 23919e2 commit 0c9ec6e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contracts/src/core/AlignedProofAggregationService.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ contract AlignedProofAggregationService is
153153
}
154154

155155
/// @notice Modifier to ensure the provided verifier type is one of the valid enum values.
156-
modifier validVerifierType(IAlignedProofAggregationService.VerifierType verifierType) {
156+
modifier onValidVerifierType(IAlignedProofAggregationService.VerifierType verifierType) {
157157
uint8 v = uint8(verifierType);
158158
if (v != uint8(IAlignedProofAggregationService.VerifierType.SP1) &&
159159
v != uint8(IAlignedProofAggregationService.VerifierType.RISC0)){
@@ -183,15 +183,15 @@ contract AlignedProofAggregationService is
183183
function addProgramId(bytes32 programId, IAlignedProofAggregationService.VerifierType verifierType)
184184
external
185185
onlyOwner
186-
validVerifierType(verifierType)
186+
onValidVerifierType(verifierType)
187187
{
188188
programIds[programId] = uint8(verifierType);
189189
emit ProgramIdAdded(programId, verifierType);
190190
}
191191

192192
/// @notice Deletes a program ID from the list of valid program IDs.
193193
/// @param programId The program ID to delete (image ID for RISC0 or vk hash for SP1).
194-
function deleteProgramId(bytes32 programId, IAlignedProofAggregationService.VerifierType verifierType) external onlyOwner validVerifierType(verifierType) {
194+
function deleteProgramId(bytes32 programId, IAlignedProofAggregationService.VerifierType verifierType) external onlyOwner onValidVerifierType(verifierType) {
195195
// Preserve the verifier type so we can emit it with the event
196196
uint8 verifierTypeRaw = programIds[programId];
197197
uint8 rawReceivedVerifierType = uint8(verifierType);

0 commit comments

Comments
 (0)