Integration
Onchain events
What the factory emits.
Launched
Emitted once per coin, in the launch transaction.
event Launched(
address indexed token,
address indexed creator,
address pool,
uint256 tokenId,
string name,
string symbol,
string persona,
string imageCid
);
The picture and the character description are on chain, which is why they survive independently of any database.
FeesCollected
Emitted whenever anyone collects a coin's fees.
event FeesCollected(
address indexed token,
uint256 wethAmount,
uint256 tokenAmount
);
Swaps
Trades are ordinary Uniswap V3 Swap events on the coin's pool:
Swap(address indexed sender, address indexed recipient,
int256 amount0, int256 amount1,
uint160 sqrtPriceX96, uint128 liquidity, int24 tick)
Use recipient, not sender, to attribute a trade. A launch dev buy is sent by the factory on the creator's behalf, so sender names the factory every time.