ECO-144: Create AI-augmented v4 hook guide - #1146
Draft
wkoutre wants to merge 2 commits into
Draft
Conversation
Adds a guide that walks through the full v4 hook lifecycle (scaffold, implement, test, audit, deploy) using an AI coding agent alongside the v4-template, backed by the existing v4-security-foundations and viem-integration skills. Prompts are agent-agnostic plain text, not Claude-specific. Closes ECO-144.
- Deploy prompt now mines a CREATE2 salt through the deployer proxy instead of a plain CREATE deploy, which would produce a hook address that doesn't encode the enabled permission flags. - Clarify that neither sender nor hookData is trustworthy for user identity without router allowlisting, and link the existing accessing-msg.sender guide. - Move the OpenZeppelin base-contract customization tip to Step 1 (scaffold), where base-contract choice actually happens.
|
Thanks for contributing to Uniswap Docs! 🦄 Quick heads up on how this repo works: the docs you see on developers.uniswap.org are built from a separate source repo. When we accept a change here, we port it over there, so your fix might show up on the live site before it lands in this repo. Updates to this repo come in batches on a regular cadence. When yours is included, you'll be credited as a co-author on the commit, so the contribution counts on your GitHub profile and in Uniswap/docs. We review every PR but can't merge everything. Either way, someone from the docs team will follow up here once we've taken a look. One legal bit: by submitting a PR you agree your contribution is licensed under the repo's MIT license. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new guide,
content/protocols/v4/guides/hooks/ai-augmented-hook-development.mdx, that walks a developer through the full v4 hook lifecycle — scaffold, implement, test, audit, deploy — using an AI coding agent alongside the official v4-template.v4-security-foundationsfor the scaffold/audit steps,viem-integrationfor the deploy step.Hooks Overviewguide and registered in the Hooks section'smeta.jsonnav.hook-deployment.mdxguide — required because v4 hook addresses must encode their permission flags.Linear: https://linear.app/uniswap/issue/ECO-144/create-ai-augmented-v4-hook-guide-v4-template-uniswap-ai
Autonomously generated by the Linear Task Worker. Reviewed by an independent code-reviewer pass before this PR was opened (findings addressed in the second commit).
Test plan
/docs/...) resolve to existing pages incontent/.title/description) andmeta.jsonconventions match sibling pages.relatedTo, not a blocker.