0x4cC8F6d5B7cE150CCC0A9B7664532B1283b96AC4 on Ink mainnet.
Preview a buy from cast
Previews use theLaunchViewModule with local state. Read the launch state first, then call previewBuyLocal with the unpacked fields. See Quotes for the full pattern.
tokensOut, cost, refund, tokensRemaining.
Read launch state from cast
LaunchConfig struct. For a typed decode, use viem or ethers with the ABI.
Buy with viem
Sell with viem (requires approval first)
Listen for Trade events
Fetch recent V2 tokens from REST
Fetch a single token
launch_id field if it is a V2 token.