0x4cC8F6d5B7cE150CCC0A9B7664532B1283b96AC4. Use createLaunch for a plain launch. Use createLaunchWithReferral to record a referral code on chain at creation time.
createLaunch
msg.value is the optional creator prebuy. Send 0 for no prebuy. Send any positive amount to prebuy that much ETH at the curve’s starting price in the same transaction.
Returns the new launchId. The launch’s token address is in the LaunchCreated event emitted by the same call.
createLaunchWithReferral
createLaunch, plus a Referral event recording the code:
referralCode is empty, this still works but does not emit the Referral event. Use the plain createLaunch when you do not have a referral code.
CreateLaunchParams
Prebuy
There is noprebuyEth field. To prebuy at launch, send the prebuy amount as msg.value on the createLaunch call. The creator’s prebuy executes in the same transaction as the launch, at the curve’s starting price, and bypasses the anti-snipe captcha gate.
Field constraints
What happens during the call
- The hook deploys a new ERC20 token with the supplied metadata
- It computes the sale supply and liquidity supply for the curve through
SaleSplitCalculator(targetRaise, gainBps) - It records the
LaunchConfigin storage at the newlaunchId - It emits
LaunchCreatedandLaunchMetadata - If
msg.value > 0, it executes the creator prebuy at the curve’s starting price - If called as
createLaunchWithReferralwith a non empty code, it emitsReferral
Events emitted
msg.value > 0, a Trade event also fires for the prebuy.