You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR Review: fix(S1): use dedicated blocklist zero-address error
Summary: This is a correct, minimal fix for a copy-paste bug where batchAddToBlocklist() was reverting with the allowlist-specific CannotAllowlistZeroAddress error instead of a blocklist-appropriate one.
Correctness
The bug is real and the fix is right. batchAddToBlocklist() was clearly scaffolded from batchAddToAllowlist() and the error wasn't updated, causing misleading revert messages for operators/admins. The one-line change at solidity/src/FlowYieldVaultsRequests.sol:595 is exactly the right fix.
Code Quality
The new CannotBlocklistZeroAddress error follows the same NatSpec and naming conventions as the existing CannotAllowlistZeroAddress error.
Placement in the error block (immediately after its allowlist counterpart) is logical.
No unrelated changes — the diff is appropriately scoped.
Test Coverage
The new test test_BatchAddToBlocklist_RevertZeroAddress is correct:
Uses vm.prank(c.owner()) appropriately, matching the onlyOwner modifier on batchAddToBlocklist.
Verifies the exact error selector (.selector), which locks the ABI-level interface against future regressions — consistent with how similar tests in this file are written (e.g., test_CreateYieldVault_RevertZeroAmount).
One minor observation: there is no equivalent test_BatchAddToAllowlist_RevertZeroAddress test in the suite — the pre-existing CannotAllowlistZeroAddress path is untested at the unit level. That said, this is out of scope for this PR and should be tracked separately.
Security / Performance
No security or performance impact. This is purely a diagnostic fix — error naming only, no behavior change.
Verdict: Looks good to merge. Clean fix, appropriate test, no concerns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #32
Aligns blocklist batch-add validation with operation intent by using a dedicated blocklist zero-address error instead of the allowlist-specific error.
Key points:
batchAddToBlocklist()no longer reverts with allowlist-specific error namingCannotBlocklistZeroAddresserror for clearer admin/operator diagnosticsChanges:
CannotBlocklistZeroAddresscustom errorbatchAddToBlocklist()to revert withCannotBlocklistZeroAddress()onaddress(0)test_BatchAddToBlocklist_RevertZeroAddress()Test plan
env FOUNDRY_OFFLINE=true forge test --match-contract FlowYieldVaultsRequestsTest --threads 1