Register a partner

Register partner terms for your frontend, and use them in launches.

A frontend registers a partner to set the LP fee of its launches and to take a share of their fees. See Partners.

Choose the terms

TermRangeExample
feeRecipientAny address except zeroYour treasury
shareBps0 to 100002000 (20% of fees)
lpFee0 to 50000 pips10000 (1% per swap)

The share and LP fee never change. To use other terms later, register a new partner.

With an LP fee of 0, pools charge no fees, and DropHook does not collect them.

Register

const { result: partnerId, request } = await publicClient.simulateContract({
  account,
  address: LAUNCHPAD,
  abi: launchpadAbi,
  functionName: "registerPartner",
  args: [treasury, 20_00, 1_0000], // 20% share, 1% LP fee
});
await walletClient.writeContract(request);

The launchpad emits PartnerRegistered with the ID. IDs go up from 0, in order of registration.

Use the partner in launches

Set partnerId in the launch parameters. The launch keeps this partner forever.

With a 20% share, a collection of 10 USDC credits 2 USDC to the partner fee recipient and 8 USDC to the creator fee recipient.

Change the fee recipient

Send this from the current partner fee recipient:

await walletClient.writeContract({
  address: LAUNCHPAD,
  abi: launchpadAbi,
  functionName: "setPartnerFeeRecipient",
  args: [partnerId, newRecipient],
});

Credits that are already collected stay with the old recipient. Claim them with claimFees at any time.

Read the terms

const [feeRecipient, shareBps, lpFee] = await publicClient.readContract({
  address: LAUNCHPAD,
  abi: launchpadAbi,
  functionName: "partners",
  args: [partnerId],
});

An unregistered ID returns a zero feeRecipient.

On this page