-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add IAuthZone
#76
Conversation
$ forge bind --overwrite -b bindings/rust $ git clean -f
src/zone/extensions/IAuthZone.sol
Outdated
RangeFilter nonce; | ||
} | ||
|
||
function setAuthorizationFilter(address actor, Filter calldata filter) external; |
There was a problem hiding this comment.
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...
src/zone/extensions/MainZone.sol
Outdated
emit FilterUpdated(actor, filter); | ||
} | ||
|
||
function authorizationFilter(address actor) external view returns (Filter memory) { |
There was a problem hiding this comment.
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
src/zone/extensions/IAuthZone.sol
Outdated
RangeFilter amount; | ||
} | ||
|
||
struct Filter { |
There was a problem hiding this comment.
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
Related - https://linear.app/fulmin/issue/FLOOD-501/add-auth-to-frontend-and-trades-db