Permissioned Pools Configurator
Interactive bulk-form configurator for a Uniswap v4 Permissioned Pool. Collects every
parameter the setup journey needs, validates each one, and displays a single JSON
configuration object that the permissioned-pools-deployer skill consumes to run the
on-chain sequence. For the contract mechanics behind any of these parameters, see
permissioned-pools-issuer.
Runtime Compatibility: This skill uses AskUserQuestion to collect parameters in
batches. If AskUserQuestion is not available in your runtime, collect the same
parameters through natural language conversation instead, in the same batch groupings
and with the same validation after each group.
Scope and Disclaimer
This is a configuration tool, not deployment guidance and not a compliance review.
- ✅ It collects and validates the inputs a permissioned-pool setup needs and produces a
JSON document. It does not call any contract, does not broadcast anything, and holds
no signing keys.
- ✅ Treat this as contract mechanics only. This skill does not constitute legal, financial, investment, or tax advice, and it is not a compliance review of your token, your allowlist, your KYC or AML program, or your configuration. It covers what each parameter means and what breaks if it is wrong.
- ✅ It never invents a contract address. Addresses you supply are recorded as given;
addresses you do not yet have — whether because they still need to be looked up
against the deploy guide's table or because the issuer has not decided on them yet —
are stored as the literal string
"RESOLVE", never guessed or recalled from memory.
- ✅ Review the emitted configuration yourself, and re-resolve every address it marks for
resolution, before handing it to a deployment flow.
- ✅ Read the repo's usage guidelines. The repo root
DISCLAIMER.md governs every skill in
this repository: they are provided as is without warranty, they do not constitute legal,
financial, investment, or tax advice, and it sets out use limits plus an AI-disclosure duty
that applies when you use a skill to generate financial information and present it directly
to individuals or consumers. Point the user to it.
State this framing inline (quoted or in your own words) and continue with the
configuration flow in the same response — this is reference and data-collection
content, not an action-oriented deployment step, so no acknowledgment gate is needed
here. The deployer skill gates on acknowledgment before anything gas-spending.
What This Config Is (and Isn't)
The output is a pre-deployment plan, not a record of what already exists on-chain.
- The
PermissionsAdapter address does not appear in this config. It does not exist
until the deployer's Step 2 (createPermissionsAdapter) creates it. If the issuer
already has a deployed adapter for this token, that is a re-run/import scenario this
skill does not currently handle — collect its address as a note and confirm with the
deployer skill's preflight checks instead of adding it here. This declines only the
adapter address itself — it does not block the rest of the request. Continue
validating and including every other field the user supplied (or marked "RESOLVE")
in the emitted configuration exactly as the flow below describes.
- The underlying permissioned token is the only token address this config records.
See the two-addresses distinction in
permissioned-pools-issuer — the pool currency
the deployer builds later is the adapter, derived at deploy time, not configured here.
- Wrapper and hook addresses are chain-specific and change over time. This skill asks
whether you already have them resolved for your target chain; if not, it marks them
for resolution rather than filling in a value.
Configuration Flow
Collect parameters in four batches of at most four questions each. After each batch,
validate every answer against config-schema.md before
moving on, and show a running summary of what has been collected and what remains.
Field-by-field meaning, how to choose each value, and what breaks if it is wrong are all
in parameter-reference.md.
Front-loaded or skip-ahead answers
A user may answer several batches' worth of questions in one free-form message, or ask
to skip the remaining questions and finish immediately. Do not withhold the whole
configuration while asking whether to proceed. Instead: validate everything the user did
supply against config-schema.md, apply the literal string "RESOLVE" (or null for
allowlistChecker.address when the checker is to-be-deployed) to every address-type
field left open, and produce that partial configuration in the same response. Fields with
no "RESOLVE" sentinel — the verification deposit amount, pool currency, fee tier, tick
spacing, starting price, and seeding — have no safe default; flag each one explicitly as
still needing an answer rather than guessing at it, and ask only about those. This
includes the verification deposit amount even though Batch 2 lists "1 wei" as the
recommended option: a menu option a user has not actually picked is not a value the
skill may silently apply on their behalf — treat an unanswered verification deposit
amount exactly like the other sentinel-less fields, never as an already-resolved "1".
Skipping the batch-by-batch confirmation step never means skipping validation — every
rule above still applies to whatever the user did supply.
Batch 1: Network, Token & Ownership (4 questions)
Question 1 — Network
- Prompt: "Which network is this permissioned pool for?"
- Options: "Ethereum Mainnet (chain ID 1)", "Unichain (chain ID 130)", "Sepolia (chain ID
11155111)", Custom chain ID (via "Other")
- Note in the prompt: availability of the permissioned-pools contracts on a given chain is
not something this skill asserts — confirm the chain has a row in the deploy guide's
#deployment-addresses table before proceeding.
- Store:
chainId
Question 2 — Underlying permissioned token
- Prompt: "What is the address of the permissioned ERC-20 being listed?"
- Options: "Not deployed yet" (stores the literal string
"RESOLVE"), custom address
(via "Other")
- Validation:
^0x[a-fA-F0-9]{40}$, or the literal string "RESOLVE" if not yet deployed
- Store:
permissionedToken
Question 3 — Allowlist checker
- Prompt: "Do you already have an allowlist checker deployed for this token?"
- Options, each mapped to the exact
allowlistChecker value it produces:
- "Yes, use an existing address" (then ask for the address via "Other") →
mode: "existing", address set to that address.
- "No, I still need to deploy one" →
mode: "to-be-deployed", address set to null.
- Validation: address form above when "existing" is chosen
- Store:
allowlistChecker.mode (existing | to-be-deployed), allowlistChecker.address
Question 4 — Adapter owner
- Prompt: "What address should own the
PermissionsAdapter (initialOwner)?"
- Options: "Not yet decided — mark for resolution" (stores the literal string
"RESOLVE"), custom address (via "Other")
- Note in the prompt: this key can change the allowlist checker, add or remove wrappers,
pause and resume swapping, and force-exit any LP position — the published guide
recommends a multisig. Do not pick this in a hurry just to finish the flow; use the
resolution marker instead if the multisig or key is not decided yet.
- Validation:
^0x[a-fA-F0-9]{40}$ and not the zero address, or the literal string
"RESOLVE"
- Store:
adapterOwner
Validate: confirm chain ID is a positive integer, the token address is either a
valid address or the literal string "RESOLVE", the checker address (if "existing" was
chosen) matches the address regex, and the adapter owner is either a valid non-zero
address or the literal string "RESOLVE". Show a summary of the four collected values,
flagging any field still marked "RESOLVE".
Batch 2: Verification & Core Wrappers (4 questions)
Question 1 — Verification deposit amount
- Prompt: "How much of the underlying token should be deposited for verification?"
- Options: "1 wei (recommended)", Custom amount (via "Other")
- Note in the prompt: this deposit becomes the adapter's mintable headroom, there is no
withdraw function, and 1 wei is sufficient — see
Parameter Reference
before choosing anything larger.
- "Recommended" describes the value if asked and picked — it is never a license to fill
in
"1" on the user's behalf when this question was skipped. See
Front-loaded or skip-ahead answers above.
- Store:
verificationDepositAmount
Question 2 — PermissionedPositionManager address
- Prompt: "Do you have the
PermissionedPositionManager address resolved for this
chain?"
- Options: "Not yet resolved — mark for resolution" (stores the literal string
"RESOLVE"), custom address (via "Other")
- Validation: address form, or the literal string
"RESOLVE"
- Store:
allowedWrappers.permissionedPositionManager
Question 3 — Universal Router (v2.2+) address
- Prompt: "Do you have the Universal Router
#v2.2 (or higher) address resolved for
this chain?"
- Options: "Not yet resolved — mark for resolution" (stores the literal string
"RESOLVE"), custom address (via "Other")
- Note in the prompt: the plain
UniversalRouter deployments key is a different,
non-permissioned router — only the #v2.2 deployment works here.
- Validation: address form, or the literal string
"RESOLVE"
- Store:
allowedWrappers.universalRouterV2_2
Question 4 — PermissionedHooks address
- Prompt: "Do you have the
PermissionedHooks address resolved for this chain, for
setAllowedHook?"
- Options: "Not yet resolved — mark for resolution" (stores the literal string
"RESOLVE"), custom address (via "Other")
- Note in the prompt: this is the shared hook address, registered with
setAllowedHook on the position manager — it is never registered as a wrapper.
- Validation: address form, or the literal string
"RESOLVE"
- Store:
hook
Validate: confirm the deposit amount is a positive integer (not zero) expressed in
the token's smallest unit, and that every address field is either a valid address or the
literal string "RESOLVE" — never a guessed or invented value. Show a summary.
Batch 3: Remaining Wrappers & Pool Currency (4 questions)
Question 1 — V4Quoter address
- Prompt: "Do you have the
V4Quoter address resolved for this chain?"
- Options: "Not yet resolved — mark for resolution" (stores the literal string
"RESOLVE"), custom address (via "Other")
- Validation: address form, or the literal string
"RESOLVE"
- Store:
allowedWrappers.v4Quoter
Question 2 — MixedRouteQuoterV2 address
- Prompt: "Do you have the
MixedRouteQuoterV2 address resolved for this chain?"
- Options: "Not yet resolved — mark for resolution" (stores the literal string
"RESOLVE"), custom address (via "Other")
- Validation: address form, or the literal string
"RESOLVE"
- Store:
allowedWrappers.mixedRouteQuoterV2
Question 3 — Paired currency
- Prompt: "What currency should the pool pair against the permissioned token?"
- Options: "Native ETH", custom ERC-20 address (via "Other")
- Note in the prompt: the permissioned token's side of the pool is always the adapter,
never the underlying token — this question is only about the other currency.
- Validation: address form for an ERC-20 and not the zero address, or the literal string
"native" (the native-currency sentinel; see Address Validation
for the full semantics). A user who supplies the zero address here means "native" —
record "native", never the zero address.
- Store:
pool.pairedCurrency
Question 4 — Fee tier
- Prompt: "What fee tier should the pool use?"
- Options: "0.05% (500)", "0.30% (3000)", "1.00% (10000)", Custom (via "Other")
- Validation: positive integer, hundredths of a basis point
- Store:
pool.feeTier
Validate: confirm both remaining wrapper fields are a valid address or the literal
string "RESOLVE", the paired currency is a valid non-zero address or the literal string
"native", and the fee tier is a positive integer. When the paired currency is a resolved
address and permissionedToken is also a resolved address, confirm the two differ —
pairing the permissioned token against itself builds a PoolKey that either fails at the
PoolManager level or creates a pool nobody intended (see
Parameter Reference). Show a
summary of all four wrappers,
the hook, and the pool currency collected so far, and flag every field still marked
"RESOLVE".
Batch 4: Pricing & Seeding (3 questions)
Question 1 — Tick spacing
- Prompt: "What tick spacing should the pool use?"
- Options: "10 (stable-like pairs)", "60 (standard)", "200 (wide-range pairs)", Custom
(via "Other")
- Validation: positive integer
- Store:
pool.tickSpacing
Question 2 — Starting price
- Prompt: "What should the pool's starting price be, expressed as paired-currency per
permissioned-token?"
- Options: "1:1 (equal value ratio)", Custom ratio (via "Other")
- Validation: positive number
- Store:
pool.startingPriceRatio (a human-readable ratio; the deployer skill converts
this to sqrtPriceX96 at initialization time, since that conversion depends on the
decimals of both currencies, which are not yet resolved at configuration time)
Question 3 — Seeding intent
- Prompt: "Do you plan to seed liquidity as part of this same setup?"
- Options, each mapped to the exact
seeding.intent value it produces:
- "Yes, from the adapter owner's wallet" →
intent: "seed-now", wallet set to the
same address already collected as adapterOwner in Batch 1. Offer this option
only when adapterOwner is a real address — not when it is the literal string
"RESOLVE". seeding.wallet must always be a real address (see Validation
below), so this option cannot copy forward an unresolved owner.
- "Yes, from a different wallet" (then ask for the address via "Other") →
intent: "seed-now", wallet set to that address
- "Not yet — pool creation only" →
intent: "none", wallet: null
- If
adapterOwner is "RESOLVE", present only the second and third options — drop the
first option from the list entirely rather than showing it disabled.
- Note in the prompt: whichever wallet seeds liquidity, and the wallet that will receive
the position, both need
LIQUIDITY_ALLOWED on the issuer's own allowlist before the
first mint — being the adapter owner grants nothing on the liquidity path.
- Validation: when
intent is "seed-now", wallet is required and must match the
address regex — never the literal string "RESOLVE" or any other sentinel; when
intent is "none", wallet must be null. This flow never produces "seed-later"
— that enum value exists in the schema for a config edited or extended outside this
flow, not for output from these three options.
- Store:
seeding.intent, seeding.wallet
Validate: confirm tick spacing is a positive integer, the starting price ratio is a
positive number, and — per the branch taken above — either seeding.wallet is a valid,
non-"RESOLVE" address (when intent is "seed-now") or it is null (when intent is
"none"). seeding.wallet never accepts the literal string "RESOLVE", even when it
was going to be copied from adapterOwner — see the option restriction above. Show the
full configuration collected across all four batches.
Generate and Display the Configuration
Assemble everything collected into the JSON shape defined in
config-schema.md, keyed by chainId at the top
level:
{
"<chainId>": {
"permissionedToken": "...",
"allowlistChecker": { "mode": "...", "address": "..." },
"adapterOwner": "...",
"verificationDepositAmount": "...",
"allowedWrappers": {
"permissionedPositionManager": "...",
"universalRouterV2_2": "...",
"v4Quoter": "...",
"mixedRouteQuoterV2": "..."
},
"hook": "...",
"pool": {
"pairedCurrency": "native",
"feeTier": 3000,
"tickSpacing": 60,
"startingPriceRatio": 1
},
"seeding": { "intent": "seed-now", "wallet": "..." }
}
}
Display this JSON directly in the transcript. Do not automatically create a file.
Let the user copy it or choose a filepath in the next-steps question below.
Display Summary
Immediately after the JSON, show a human-readable summary:
- Network and chain ID.
- Underlying token and allowlist-checker mode.
- Adapter owner.
- Verification deposit amount, with a one-line reminder that it is not recoverable.
- Every wrapper and the hook, each flagged resolved or needs resolution.
- Pool currency, fee tier, tick spacing, starting price ratio.
- Seeding intent and wallet, with a reminder that the wallet needs
LIQUIDITY_ALLOWED.
- A validation checklist: which rules from
config-schema.md passed, and which fields
still need a real address before this config can be used to deploy anything.
Next Steps
Ask the user what they want to do:
- "Save to file" — ask for a filepath, default
permissioned-pool-config.json. Require
a relative path ending in .json; reject an absolute path (leading /), reject a
leading ~ (a runtime that expands it can write outside the working directory —
including over Claude Code's own config store), and reject any path containing a ..
segment. Resolve the path and confirm it still stays within the current working
directory before writing. If the resolved path already exists, ask for confirmation
before overwriting it — including a file that looks unrelated to this skill, such as
package.json or tsconfig.json. Re-prompt once on a rejected path rather than
silently substituting the default. Then write exactly the JSON object shown above.
(This validation is intentionally stricter than other skills' "save to file" steps in
this repo — the ~ and .. rejections were added in response to a security audit
finding that a leading ~ could target ~/.claude.json, so keep them here rather
than trimming to match a lighter-weight equivalent elsewhere.)
- "View the setup walkthrough" — point at
permissioned-pools-deployer.
- "Modify configuration" — re-run the relevant batch above.
- "Exit" — end here; the user can copy the JSON from the transcript.
Notes for Implementers of This Flow
- Never fill in a token, wrapper, hook, or adapter-owner address from memory. If the
user does not supply one, store the exact literal string
"RESOLVE" in that field —
full stop. This includes not "helpfully" completing a partially-typed address.
- Batch, validate, summarize — every time. Do not run all four batches back to back
without the validation and summary steps in between; that is what keeps a bad input
from propagating into the next batch's defaults.
- This skill does not read chain state, fetch an RPC, or consult a deployments JSON
file. It has no
Bash or WebFetch in its tool list, on purpose — resolving
addresses against Uniswap/contracts deployments/json/<chainId>.json and the deploy
guide's table is the user's job, or a later step in the deployer skill's preflight.
1---
2name: permissioned-pools-configurator
3description: Interactively collect and validate the parameters for a Uniswap v4 Permissioned Pool setup - chain, underlying token, allowlist checker, adapter owner, verification deposit, the four wrapper registrations, hook, and pool pricing - and emit the JSON config the deployer skill consumes. Use when the user says "configure a permissioned pool", "permissioned pool config", "adapter parameters", "permissioned pool setup parameters", "PermissionsAdapter configuration", or asks to set up parameters for a permissioned pool before deploying. Covers contract mechanics only - does not constitute legal, financial, investment, tax, or compliance advice, and is not a compliance review.
4allowed-tools: Read, Write, Edit, Glob, Grep, AskUserQuestion
5model: opus
6license: MIT
7metadata:
8 source: https://skillmd.com/skills/uniswap/permissioned-pools-configurator
9 author: uniswap
10 version: '0.1.0'
11---
12
13# Permissioned Pools Configurator
14
15Interactive bulk-form configurator for a Uniswap v4 Permissioned Pool. Collects every
16parameter the setup journey needs, validates each one, and displays a single JSON
17configuration object that the `permissioned-pools-deployer` skill consumes to run the
18on-chain sequence. For the contract mechanics behind any of these parameters, see
19[`permissioned-pools-issuer`](../permissioned-pools-issuer/SKILL.md).
20
21> **Runtime Compatibility:** This skill uses `AskUserQuestion` to collect parameters in
22> batches. If `AskUserQuestion` is not available in your runtime, collect the same
23> parameters through natural language conversation instead, in the same batch groupings
24> and with the same validation after each group.
25
26## Scope and Disclaimer
27
28**This is a configuration tool, not deployment guidance and not a compliance review.**
29
30- ✅ It collects and validates the inputs a permissioned-pool setup needs and produces a
31 JSON document. It does not call any contract, does not broadcast anything, and holds
32 no signing keys.
33- ✅ **Treat this as contract mechanics only.** This skill does not constitute legal, financial, investment, or tax advice, and it is **not** a compliance review of your token, your allowlist, your KYC or AML program, or your configuration. It covers what each parameter means and what breaks if it is wrong.
34- ✅ It never invents a contract address. Addresses you supply are recorded as given;
35 addresses you do not yet have — whether because they still need to be looked up
36 against the deploy guide's table or because the issuer has not decided on them yet —
37 are stored as the literal string `"RESOLVE"`, never guessed or recalled from memory.
38- ✅ Review the emitted configuration yourself, and re-resolve every address it marks for
39 resolution, before handing it to a deployment flow.
40- ✅ **Read the repo's usage guidelines.** The repo root `DISCLAIMER.md` governs every skill in
41 this repository: they are provided as is without warranty, they do not constitute legal,
42 financial, investment, or tax advice, and it sets out use limits plus an AI-disclosure duty
43 that applies when you use a skill to generate financial information and present it directly
44 to individuals or consumers. Point the user to it.
45
46State this framing inline (quoted or in your own words) and continue with the
47configuration flow in the same response — this is reference and data-collection
48content, not an action-oriented deployment step, so no acknowledgment gate is needed
49here. The deployer skill gates on acknowledgment before anything gas-spending.
50
51## What This Config Is (and Isn't)
52
53The output is a **pre-deployment plan**, not a record of what already exists on-chain.
54
55- The **`PermissionsAdapter` address does not appear in this config.** It does not exist
56 until the deployer's Step 2 (`createPermissionsAdapter`) creates it. If the issuer
57 already has a deployed adapter for this token, that is a re-run/import scenario this
58 skill does not currently handle — collect its address as a note and confirm with the
59 deployer skill's preflight checks instead of adding it here. **This declines only the
60 adapter address itself — it does not block the rest of the request.** Continue
61 validating and including every other field the user supplied (or marked `"RESOLVE"`)
62 in the emitted configuration exactly as the flow below describes.
63- The **underlying permissioned token is the only token address this config records.**
64 See the two-addresses distinction in `permissioned-pools-issuer` — the pool currency
65 the deployer builds later is the adapter, derived at deploy time, not configured here.
66- Wrapper and hook addresses are **chain-specific and change over time.** This skill asks
67 whether you already have them resolved for your target chain; if not, it marks them
68 for resolution rather than filling in a value.
69
70## Configuration Flow
71
72Collect parameters in four batches of at most four questions each. After each batch,
73validate every answer against [`config-schema.md`](./references/config-schema.md) before
74moving on, and show a running summary of what has been collected and what remains.
75Field-by-field meaning, how to choose each value, and what breaks if it is wrong are all
76in [`parameter-reference.md`](./references/parameter-reference.md).
77
78### Front-loaded or skip-ahead answers
79
80A user may answer several batches' worth of questions in one free-form message, or ask
81to skip the remaining questions and finish immediately. Do not withhold the whole
82configuration while asking whether to proceed. Instead: validate everything the user did
83supply against `config-schema.md`, apply the literal string `"RESOLVE"` (or `null` for
84`allowlistChecker.address` when the checker is `to-be-deployed`) to every address-type
85field left open, and produce that partial configuration in the same response. Fields with
86no `"RESOLVE"` sentinel — the verification deposit amount, pool currency, fee tier, tick
87spacing, starting price, and seeding — have no safe default; flag each one explicitly as
88still needing an answer rather than guessing at it, and ask only about those. **This
89includes the verification deposit amount even though Batch 2 lists "1 wei" as the
90recommended option:** a menu option a user has not actually picked is not a value the
91skill may silently apply on their behalf — treat an unanswered verification deposit
92amount exactly like the other sentinel-less fields, never as an already-resolved `"1"`.
93Skipping the batch-by-batch confirmation step never means skipping validation — every
94rule above still applies to whatever the user did supply.
95
96### Batch 1: Network, Token & Ownership (4 questions)
97
98**Question 1 — Network**
99
100- Prompt: "Which network is this permissioned pool for?"
101- Options: "Ethereum Mainnet (chain ID 1)", "Unichain (chain ID 130)", "Sepolia (chain ID
102 11155111)", Custom chain ID (via "Other")
103- Note in the prompt: availability of the permissioned-pools contracts on a given chain is
104 not something this skill asserts — confirm the chain has a row in the deploy guide's
105 `#deployment-addresses` table before proceeding.
106- Store: `chainId`
107
108**Question 2 — Underlying permissioned token**
109
110- Prompt: "What is the address of the permissioned ERC-20 being listed?"
111- Options: "Not deployed yet" (stores the literal string `"RESOLVE"`), custom address
112 (via "Other")
113- Validation: `^0x[a-fA-F0-9]{40}$`, or the literal string `"RESOLVE"` if not yet deployed
114- Store: `permissionedToken`
115
116**Question 3 — Allowlist checker**
117
118- Prompt: "Do you already have an allowlist checker deployed for this token?"
119- Options, each mapped to the exact `allowlistChecker` value it produces:
120 - "Yes, use an existing address" (then ask for the address via "Other") →
121 `mode: "existing"`, `address` set to that address.
122 - "No, I still need to deploy one" → `mode: "to-be-deployed"`, `address` set to `null`.
123- Validation: address form above when "existing" is chosen
124- Store: `allowlistChecker.mode` (`existing` | `to-be-deployed`), `allowlistChecker.address`
125
126**Question 4 — Adapter owner**
127
128- Prompt: "What address should own the `PermissionsAdapter` (`initialOwner`)?"
129- Options: "Not yet decided — mark for resolution" (stores the literal string
130 `"RESOLVE"`), custom address (via "Other")
131- Note in the prompt: this key can change the allowlist checker, add or remove wrappers,
132 pause and resume swapping, and force-exit any LP position — the published guide
133 recommends a multisig. Do not pick this in a hurry just to finish the flow; use the
134 resolution marker instead if the multisig or key is not decided yet.
135- Validation: `^0x[a-fA-F0-9]{40}$` and not the zero address, or the literal string
136 `"RESOLVE"`
137- Store: `adapterOwner`
138
139**Validate:** confirm chain ID is a positive integer, the token address is either a
140valid address or the literal string `"RESOLVE"`, the checker address (if "existing" was
141chosen) matches the address regex, and the adapter owner is either a valid non-zero
142address or the literal string `"RESOLVE"`. Show a summary of the four collected values,
143flagging any field still marked `"RESOLVE"`.
144
145---
146
147### Batch 2: Verification & Core Wrappers (4 questions)
148
149**Question 1 — Verification deposit amount**
150
151- Prompt: "How much of the underlying token should be deposited for verification?"
152- Options: "1 wei (recommended)", Custom amount (via "Other")
153- Note in the prompt: this deposit becomes the adapter's mintable headroom, there is no
154 withdraw function, and 1 wei is sufficient — see
155 [Parameter Reference](./references/parameter-reference.md#verificationdepositamount)
156 before choosing anything larger.
157- "Recommended" describes the value if asked and picked — it is never a license to fill
158 in `"1"` on the user's behalf when this question was skipped. See
159 [Front-loaded or skip-ahead answers](#front-loaded-or-skip-ahead-answers) above.
160- Store: `verificationDepositAmount`
161
162**Question 2 — `PermissionedPositionManager` address**
163
164- Prompt: "Do you have the `PermissionedPositionManager` address resolved for this
165 chain?"
166- Options: "Not yet resolved — mark for resolution" (stores the literal string
167 `"RESOLVE"`), custom address (via "Other")
168- Validation: address form, or the literal string `"RESOLVE"`
169- Store: `allowedWrappers.permissionedPositionManager`
170
171**Question 3 — Universal Router (v2.2+) address**
172
173- Prompt: "Do you have the Universal Router `#v2.2` (or higher) address resolved for
174 this chain?"
175- Options: "Not yet resolved — mark for resolution" (stores the literal string
176 `"RESOLVE"`), custom address (via "Other")
177- Note in the prompt: the plain `UniversalRouter` deployments key is a different,
178 non-permissioned router — only the `#v2.2` deployment works here.
179- Validation: address form, or the literal string `"RESOLVE"`
180- Store: `allowedWrappers.universalRouterV2_2`
181
182**Question 4 — `PermissionedHooks` address**
183
184- Prompt: "Do you have the `PermissionedHooks` address resolved for this chain, for
185 `setAllowedHook`?"
186- Options: "Not yet resolved — mark for resolution" (stores the literal string
187 `"RESOLVE"`), custom address (via "Other")
188- Note in the prompt: this is the shared hook address, registered with
189 `setAllowedHook` on the position manager — it is never registered as a wrapper.
190- Validation: address form, or the literal string `"RESOLVE"`
191- Store: `hook`
192
193**Validate:** confirm the deposit amount is a positive integer (not zero) expressed in
194the token's smallest unit, and that every address field is either a valid address or the
195literal string `"RESOLVE"` — never a guessed or invented value. Show a summary.
196
197---
198
199### Batch 3: Remaining Wrappers & Pool Currency (4 questions)
200
201**Question 1 — `V4Quoter` address**
202
203- Prompt: "Do you have the `V4Quoter` address resolved for this chain?"
204- Options: "Not yet resolved — mark for resolution" (stores the literal string
205 `"RESOLVE"`), custom address (via "Other")
206- Validation: address form, or the literal string `"RESOLVE"`
207- Store: `allowedWrappers.v4Quoter`
208
209**Question 2 — `MixedRouteQuoterV2` address**
210
211- Prompt: "Do you have the `MixedRouteQuoterV2` address resolved for this chain?"
212- Options: "Not yet resolved — mark for resolution" (stores the literal string
213 `"RESOLVE"`), custom address (via "Other")
214- Validation: address form, or the literal string `"RESOLVE"`
215- Store: `allowedWrappers.mixedRouteQuoterV2`
216
217**Question 3 — Paired currency**
218
219- Prompt: "What currency should the pool pair against the permissioned token?"
220- Options: "Native ETH", custom ERC-20 address (via "Other")
221- Note in the prompt: the permissioned token's side of the pool is always the adapter,
222 never the underlying token — this question is only about the _other_ currency.
223- Validation: address form for an ERC-20 and not the zero address, or the literal string
224 `"native"` (the native-currency sentinel; see [Address Validation](./references/config-schema.md#address-validation)
225 for the full semantics). A user who supplies the zero address here means `"native"` —
226 record `"native"`, never the zero address.
227- Store: `pool.pairedCurrency`
228
229**Question 4 — Fee tier**
230
231- Prompt: "What fee tier should the pool use?"
232- Options: "0.05% (500)", "0.30% (3000)", "1.00% (10000)", Custom (via "Other")
233- Validation: positive integer, hundredths of a basis point
234- Store: `pool.feeTier`
235
236**Validate:** confirm both remaining wrapper fields are a valid address or the literal
237string `"RESOLVE"`, the paired currency is a valid non-zero address or the literal string
238`"native"`, and the fee tier is a positive integer. When the paired currency is a resolved
239address and `permissionedToken` is also a resolved address, confirm the two differ —
240pairing the permissioned token against itself builds a `PoolKey` that either fails at the
241PoolManager level or creates a pool nobody intended (see
242[Parameter Reference](./references/parameter-reference.md#poolpairedcurrency)). Show a
243summary of all four wrappers,
244the hook, and the pool currency collected so far, and flag every field still marked
245`"RESOLVE"`.
246
247---
248
249### Batch 4: Pricing & Seeding (3 questions)
250
251**Question 1 — Tick spacing**
252
253- Prompt: "What tick spacing should the pool use?"
254- Options: "10 (stable-like pairs)", "60 (standard)", "200 (wide-range pairs)", Custom
255 (via "Other")
256- Validation: positive integer
257- Store: `pool.tickSpacing`
258
259**Question 2 — Starting price**
260
261- Prompt: "What should the pool's starting price be, expressed as paired-currency per
262 permissioned-token?"
263- Options: "1:1 (equal value ratio)", Custom ratio (via "Other")
264- Validation: positive number
265- Store: `pool.startingPriceRatio` (a human-readable ratio; the deployer skill converts
266 this to `sqrtPriceX96` at initialization time, since that conversion depends on the
267 decimals of both currencies, which are not yet resolved at configuration time)
268
269**Question 3 — Seeding intent**
270
271- Prompt: "Do you plan to seed liquidity as part of this same setup?"
272- Options, each mapped to the exact `seeding.intent` value it produces:
273 - "Yes, from the adapter owner's wallet" → `intent: "seed-now"`, `wallet` set to the
274 same address already collected as `adapterOwner` in Batch 1. **Offer this option
275 only when `adapterOwner` is a real address — not when it is the literal string
276 `"RESOLVE"`.** `seeding.wallet` must always be a real address (see Validation
277 below), so this option cannot copy forward an unresolved owner.
278 - "Yes, from a different wallet" (then ask for the address via "Other") →
279 `intent: "seed-now"`, `wallet` set to that address
280 - "Not yet — pool creation only" → `intent: "none"`, `wallet: null`
281- If `adapterOwner` is `"RESOLVE"`, present only the second and third options — drop the
282 first option from the list entirely rather than showing it disabled.
283- Note in the prompt: whichever wallet seeds liquidity, and the wallet that will receive
284 the position, both need `LIQUIDITY_ALLOWED` on the issuer's own allowlist before the
285 first mint — being the adapter owner grants nothing on the liquidity path.
286- Validation: when `intent` is `"seed-now"`, `wallet` is required and must match the
287 address regex — never the literal string `"RESOLVE"` or any other sentinel; when
288 `intent` is `"none"`, `wallet` must be `null`. This flow never produces `"seed-later"`
289 — that enum value exists in the schema for a config edited or extended outside this
290 flow, not for output from these three options.
291- Store: `seeding.intent`, `seeding.wallet`
292
293**Validate:** confirm tick spacing is a positive integer, the starting price ratio is a
294positive number, and — per the branch taken above — either `seeding.wallet` is a valid,
295non-`"RESOLVE"` address (when `intent` is `"seed-now"`) or it is `null` (when `intent` is
296`"none"`). `seeding.wallet` never accepts the literal string `"RESOLVE"`, even when it
297was going to be copied from `adapterOwner` — see the option restriction above. Show the
298full configuration collected across all four batches.
299
300---
301
302## Generate and Display the Configuration
303
304Assemble everything collected into the JSON shape defined in
305[`config-schema.md`](./references/config-schema.md), keyed by `chainId` at the top
306level:
307
308```json
309{
310 "<chainId>": {
311 "permissionedToken": "...",
312 "allowlistChecker": { "mode": "...", "address": "..." },
313 "adapterOwner": "...",
314 "verificationDepositAmount": "...",
315 "allowedWrappers": {
316 "permissionedPositionManager": "...",
317 "universalRouterV2_2": "...",
318 "v4Quoter": "...",
319 "mixedRouteQuoterV2": "..."
320 },
321 "hook": "...",
322 "pool": {
323 "pairedCurrency": "native",
324 "feeTier": 3000,
325 "tickSpacing": 60,
326 "startingPriceRatio": 1
327 },
328 "seeding": { "intent": "seed-now", "wallet": "..." }
329 }
330}
331```
332
333**Display this JSON directly in the transcript. Do not automatically create a file.**
334Let the user copy it or choose a filepath in the next-steps question below.
335
336## Display Summary
337
338Immediately after the JSON, show a human-readable summary:
339
340- Network and chain ID.
341- Underlying token and allowlist-checker mode.
342- Adapter owner.
343- Verification deposit amount, with a one-line reminder that it is not recoverable.
344- Every wrapper and the hook, each flagged **resolved** or **needs resolution**.
345- Pool currency, fee tier, tick spacing, starting price ratio.
346- Seeding intent and wallet, with a reminder that the wallet needs `LIQUIDITY_ALLOWED`.
347- A validation checklist: which rules from `config-schema.md` passed, and which fields
348 still need a real address before this config can be used to deploy anything.
349
350## Next Steps
351
352Ask the user what they want to do:
353
354- "Save to file" — ask for a filepath, default `permissioned-pool-config.json`. Require
355 a relative path ending in `.json`; reject an absolute path (leading `/`), reject a
356 leading `~` (a runtime that expands it can write outside the working directory —
357 including over Claude Code's own config store), and reject any path containing a `..`
358 segment. Resolve the path and confirm it still stays within the current working
359 directory before writing. If the resolved path already exists, ask for confirmation
360 before overwriting it — including a file that looks unrelated to this skill, such as
361 `package.json` or `tsconfig.json`. Re-prompt once on a rejected path rather than
362 silently substituting the default. Then write exactly the JSON object shown above.
363 (This validation is intentionally stricter than other skills' "save to file" steps in
364 this repo — the `~` and `..` rejections were added in response to a security audit
365 finding that a leading `~` could target `~/.claude.json`, so keep them here rather
366 than trimming to match a lighter-weight equivalent elsewhere.)
367- "View the setup walkthrough" — point at `permissioned-pools-deployer`.
368- "Modify configuration" — re-run the relevant batch above.
369- "Exit" — end here; the user can copy the JSON from the transcript.
370
371## Notes for Implementers of This Flow
372
373- **Never fill in a token, wrapper, hook, or adapter-owner address from memory.** If the
374 user does not supply one, store the exact literal string `"RESOLVE"` in that field —
375 full stop. This includes not "helpfully" completing a partially-typed address.
376- **Batch, validate, summarize — every time.** Do not run all four batches back to back
377 without the validation and summary steps in between; that is what keeps a bad input
378 from propagating into the next batch's defaults.
379- **This skill does not read chain state, fetch an RPC, or consult a deployments JSON
380 file.** It has no `Bash` or `WebFetch` in its tool list, on purpose — resolving
381 addresses against `Uniswap/contracts` `deployments/json/<chainId>.json` and the deploy
382 guide's table is the user's job, or a later step in the deployer skill's preflight.