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 and the fee allocation example 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, 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.
Was this helpful?