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

Add IAuthZone #76

Merged
merged 14 commits into from
Nov 9, 2023
Merged

Add IAuthZone #76

merged 14 commits into from
Nov 9, 2023

Conversation

anukul
Copy link
Contributor

@anukul anukul commented Nov 2, 2023

@anukul anukul changed the title Zone: add authorization filter Add IAuthZone Nov 2, 2023
RangeFilter nonce;
}

function setAuthorizationFilter(address actor, Filter calldata filter) external;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think can be left out of the interface, as one could want to write a zone where this is never set, just returned from authoriazionFilter

For example a Zone allowing everybody:

function authorizationFilter(address actor) external view returns (Filter memory) {
   return Filter({initialized: true, offerer: address(0)}) etc...

emit FilterUpdated(actor, filter);
}

function authorizationFilter(address actor) external view returns (Filter memory) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we could use the mapping directly by calling it authorizationFilter

RangeFilter amount;
}

struct Filter {
Copy link
Contributor

Choose a reason for hiding this comment

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

Question, can we "invert" the filter?
For example if we want orders from all tokens beside USDC, or all offerers besides one

@fulminmaxi fulminmaxi merged commit 7b955f3 into master Nov 9, 2023
0 of 5 checks passed
@fulminmaxi fulminmaxi deleted the auth branch November 9, 2023 08:08
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