Recommended architecture
Choose the creation path
xStocks do not run on the native creation hook. Each wrapper has a separate hook.
Creation state machine
Use explicit states in your UI:draft merely because an RPC wait timed out.
Verify LaunchCreated
The receipt decoder must use:
Route an existing token
hook_address and launch_id. An active deployment is only for a new launch; it must not overwrite an existing token’s execution context.
Before bond, read getLaunchState and use the hook previews. After bond, resolve the exact pool by ABI family: call getLaunchPoolKey on corrected/current hooks, or use complete indexed pool fields for ink-legacy. Validate the key and computed pool ID. Never construct the pool from WETH or another guessed quote token.
Approvals
Show spender, token, and amount before requesting approval.
Referrals
An on-chainReferral event and a permanent fee-earning referral binding are not the same thing. The fee-earning system uses a wallet challenge, signature, and chain-specific accept route.
Do not add createLaunchWithReferral as a universal selector. The older Ink hook rejects it. Use plain creation unless you have selected and simulated a deployment that supports it.
Captcha window
Direct creation needs no captcha. A pre-bond trade duringantiSnipeDuration needs a valid InkyPump signer authorization. That signer API is protected by Turnstile and first-party origin policy.
For a partner’s first release, set antiSnipeDuration to zero or coordinate an approved captcha flow with InkyPump.
Read API boundary
- Always pass
chainId. - Call the API from your backend.
- Treat
404after a confirmed receipt as indexing delay. - Preserve exact strings and null values.
- Handle
429with backoff. - Ignore new response fields you do not use.