Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

fix unreachable code: revert OperatorNotAllowed(operator); #79

Closed
wants to merge 1 commit into from

Conversation

felipelincoln
Copy link
Contributor

The following line /src/OperatorFilterer.sol#L56 is unreachable because isOperatorAllowed/2 can only return true or throw the errors AddressFiltered/1 and CodeHashFiltered/2.

To fix it and also make it compatible with documentation:

isOperatorAllowed will return true. Otherwise, isOperatorAllowed will return false

-- /README.md#updatecodehash

This PR refactors isOperatorAllowed/2 removing the reverts and returning false instead.

@felipelincoln
Copy link
Contributor Author

TODO: fix tests

@haowang1013
Copy link

I'm also bothered by the problem "fixed" in this PR but as I understand it the registry contract is not upradable so it's likely that it'll never get fixed on-chain...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants