> For the complete documentation index, see [llms.txt](https://docs.peach.ag/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/uniswap-v4-hooks/partner-and-hookdata.md).

# Partner and hookData

A V4 router passes optional Partner attribution to MemeHookV2 through `hookData`. The Partner ID belongs to the Registry bound to the current Pro deployment.

## Encode attribution

| Intent              | `hookData`                                         |
| ------------------- | -------------------------------------------------- |
| No Partner          | Empty bytes: `0x`                                  |
| Partner             | `abi.encode(bytes32 partnerId)` — exactly 32 bytes |
| Explicit no Partner | ABI-encoded zero `bytes32`                         |

Other lengths revert. Use the Registry-issued ID rather than a Recipient address or Partner name.

With viem, `encodeAbiParameters([{ type: 'bytes32' }], [partnerId])` encodes a validated ID. The chosen router must pass these bytes to this pool's Hook.

## Eligibility and commission

A nonzero Partner ID must exist. New commission is earned only when `commissionEnabled=true` and `frozen=false`. Known disabled or frozen Partners earn no new commission; historical balances remain tracked.

Commission comes from the platform's base Hook-fee share. It is included in the existing swap fee and does not share Creator Tax. Read [Partners](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/partners) and the [fee allocation example](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/fees-and-claims#illustrative-100-quote-buy) for the calculation.

## From attribution to payout

The Hook records commission by pool ID, settlement epoch, Partner ID and actual fee currency. Preserve that asset identity in trade records: launch-token commission may need conversion before a Quote credit is available.

After the relevant [Hook settlement](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/uniswap-v4-hooks/fee-settlement-and-state), read `FeeEscrow.partnerBalance(partnerId, asset)`. The current Partner Recipient calls `claimPartner(partnerId, asset)` while unfrozen. The Recipient may be a wallet or contract; running settlement does not give its caller the Partner's claim rights.

Disabling new commission preserves historical claims. Freezing additionally blocks claims and Partner-controlled management until the Partner is unfrozen.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/uniswap-v4-hooks/partner-and-hookdata.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
