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

feat(contracts): revert on unknown operator #29

Merged
merged 1 commit into from
Jan 24, 2025
Merged

feat(contracts): revert on unknown operator #29

merged 1 commit into from
Jan 24, 2025

Conversation

mempirate
Copy link
Contributor

No description provided.

@mempirate mempirate requested a review from merklefruit January 23, 2025 19:45
@merklefruit
Copy link
Contributor

by looking at the implementation of pause() in PauseableEnumerableSet, this doesn't seem necessary as it's covered by the library. However if we want to provide custom errors and be more explicit, I am not too much against a double check...

sauce:

function pause(Uint160Set storage self, uint48 timestamp, uint160 value) internal {
        if (self.positions[value] == 0) revert NotRegistered(); // <--- covered here
        self.array[self.positions[value] - 1].status.disable(timestamp);
    }

@mempirate
Copy link
Contributor Author

Yeah this was because stuff was reverting in the CLI without a clear error, so it's about being explicit

@merklefruit
Copy link
Contributor

all good, that works!

@mempirate mempirate merged commit 561fae0 into main Jan 24, 2025
2 of 4 checks passed
@mempirate mempirate deleted the jonas/smols branch January 24, 2025 09:12
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.

2 participants