cairo-contracts
cairo-contracts copied to clipboard
Ownable: split assertion checks in two statements
Fixes #421
This PR splits two checks about address in Ownable contracts in two separate with_attr statements. Currently, the error message only corresponds to the second check.
PR Checklist
- [x] Tests
- [ ] Documentation
- [ ] Changelog entry
Thanks for this improvement, it is now clear that we're not properly testing for the non owner case, just the zero address special case. We do have a test on ERC721SafeMintableMock, not on the library tests.
Could you add the missing tests?
Hi there, thanks for the review! I've just added a small test to check that it reverts if the function protected_function is called by an account different from the owner.