-
Notifications
You must be signed in to change notification settings - Fork 2
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
Hooks #8
base: main
Are you sure you want to change the base?
Conversation
I'm interested in reviewers perspectives on how the implementation effects other parts of the hats stack, such as the ancillary subgraph, main app, and claims app. Obviously adding hooks will require changes to other areas of the stack, but I want to make sure that those changes are sane and as simple as possible. I've endeavored to preserve all existing functionality, ie i've added new Also, the hook set event is singular, mainly because there will be times when an org wants to deploy a new MCH instance with claimable hats where some of those don't have hooks, and I didn't want to have to dynamically create/populate arrays to fit into batch hook set events. Do you think that would create difficulties or complications for the subgraph? |
I've deployed test contracts to sepolia as a demo for using a mint hook to claim a hat and HSG signer permissions in a single tx. You can see it in action here:
|
This PR creates a new version of MCH that adds an optional hook to be called when a hat is claimed.
For example, a hook could be set up to claim signing permissions in HatsSignerGate in the same transaction during which the signer hat is claimed.