-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor and advance core framework capabilities #9
base: dev
Are you sure you want to change the base?
Conversation
…es in one gatekeeper x gate
/// based on the specified check type. | ||
abstract contract AdvancedChecker is IAdvancedChecker { | ||
/// @notice Flag to determine if pre-condition checks should be skipped. | ||
bool public skipPre; |
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.
if these don't change they could be set as immutable
BaseChecker public immutable BASE_CHECKER; | ||
|
||
/// @dev Tracks whether the check has been enforced for a subject. | ||
mapping(address => mapping(address => bool)) public enforced; |
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.
what's the reasoning behind storing addresses as a base? imagine a ERC721 policy, they could transfer the token id to another wallet and pass again? wouldn't the type of data to be stored need to be custom for each policy?
This PR extends the core framework's functionality based on #5 conversations and more.
Base
andAdvanced
gatekeeper division with reusableChecker
contracts. This is a huge breaking change compared to previous prototype implementation on zk-kit.mapping(address => mapping(address => bool))
can make us able to simulate different deployed instances of Excubiae Gatekeeper and maintain a reference like 1 contract <> N independent states (who already passed the gatekeeper). This will allow us to get rid of the non-determinism in deployments and maintain a structure where navigating and managing the different gatekeepers smoothly.The change will allow for other changes, as:
Checker
independent contract instead ofcheck()
methodBase
andAdvanced
separation of concerns forExcubia
andChecker
contractsAlreadyPassed
checks & logicbool
Excubia
extensions (FreeForAllExcubia
)_internal
vsexternal
methods