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 2 remediation #84

Merged
merged 8 commits into from
Jul 26, 2024
Merged

Audit 2 remediation #84

merged 8 commits into from
Jul 26, 2024

Conversation

packages/contracts/src/token/CBL.sol Show resolved Hide resolved
@@ -25,11 +26,16 @@ contract CBLTest is Test {
cbl = deployCBLToken.runTest();
}

function test__CBL__ShouldRevertOnZeroAddress() public {
vm.expectRevert(CBL.CBL__ZeroAddress.selector);
new CBL(address(0), address(0), type(uint32).max);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. This single test case does not prove that ZeroAddress happens when both parameters are address(0). It only proves it for the first one checked.
  2. We changed our approach to have specific errors for zero address errors.

@lucasia lucasia merged commit 72f4ba1 into main Jul 26, 2024
2 checks passed
@lucasia lucasia deleted the audit-2-remidiation branch July 26, 2024 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants