eth_getLogs by block range, and always filter by address: a
fork of these contracts emits identical TokenLaunched events.
import { parseAbiItem } from "viem";
const launches = await client.getLogs({
address: factory,
event: parseAbiItem("event TokenLaunched(address indexed token, address indexed curve, address indexed deployer, address pairToken, uint256 launchConfigId, uint256 graduationThreshold)"),
fromBlock: 26_841_846n,
toBlock: 26_941_846n, // page by range
});
// A buy that finishes a curve can be filled in part, so read the amounts from
// the event. fee includes any snipe tax; tax is the creator tax.
const trades = await client.getLogs({
address: curve,
events: [
parseAbiItem("event CurveBuy(address indexed buyer, address indexed recipient, uint256 quoteIn, uint256 tokensOut, uint256 fee, uint256 tax)"),
parseAbiItem("event CurveSell(address indexed seller, address indexed recipient, uint256 tokensIn, uint256 quoteOut, uint256 fee, uint256 tax)"),
],
fromBlock: launchBlock,
toBlock: launchBlock + 100_000n,
});
Factory
| Event | topic0 | Means |
|---|---|---|
TokenLaunched(address indexed token, address indexed curve, address indexed deployer, address pairToken, uint256 launchConfigId, uint256 graduationThreshold) | 0x8d4aad4953d0ca700d468f3753aa14432d1b35b43ec6409f051fb6aa43a89607 | A new launch |
LaunchSwept(address indexed token, uint256 quoteOut, uint256 tokenOut) | 0xcdb72f157fd3666758a6ce201387ffb52038c7562e4fff352828da1096c4b6b4 | Curve closed; phase 1 |
PoolGraduated(address indexed token, uint256 positionId, uint256 tokenAmount, uint256 pairTokenAmount) | 0x0a44ef75df69c534f43cd6c1aa3ef8983065fe5fe79ef9e79f6494e6f258c259 | Pool created and locked; phase 2 |
GraduationTokensPermanentlyLocked(address indexed token, uint256 amount) | 0xa0a18f5bf205becee8b268d7cf69addab8548ae8ef361791464cf0e0e17c1361 | Reserved tokens not needed for the pool, locked for good. Every graduation |
CreatorFeeRecipientUpdated(address indexed token, address indexed previousRecipient, address indexed newRecipient) | 0x308c390ed1ab5873392818e036cabdf408bc8ad042fbaead3108954ff75ba980 | The fee recipient changed |
CreatorFeeRecipientChangeProposed(address indexed token, address indexed currentRecipient, address indexed proposedRecipient, uint256 effectiveAt, uint256 expiresAt) | 0x7f119e44c84a715429bee60d30ad2e14afdef6c60bb1a7eaa01290ecf6d1b2e5 | The owner proposed a new recipient |
BuybackEnabledUpdated(address indexed token, bool enabled, address indexed controller) | 0xbd886f85b7731f66269f57707414d435bf8df930d3357a10becc48a69377f6d5 | Buybacks turned on or off |
Curve
| Event | topic0 | Means |
|---|---|---|
CurveBuy(address indexed buyer, address indexed recipient, uint256 quoteIn, uint256 tokensOut, uint256 fee, uint256 tax) | 0xec36bf571f136799e8dc0b0b8bea4b04d8bd3d43de838aab0d5fc21d4cbfc455 | A buy |
CurveSell(address indexed seller, address indexed recipient, uint256 tokensIn, uint256 quoteOut, uint256 fee, uint256 tax) | 0x8113d738abdcb6b38357e9d53a54a7157861a09031b453651f0fe7fe151f59df | A sell |
CurveBuyRefunded(address indexed buyer, uint256 refund) | 0xa69e8258ccc7b9bbb70ab953fc2d1062b4ee28b8ca827534097e1732e87b0262 | A final buy was filled in part |
SnipeTaxCharged(address indexed recipient, uint256 amount) | 0x3bc39a5562b28f5fe8f36cecabfbaa12bb969acf05717994709225fc412a9934 | A buy paid snipe tax |
CurveCompleted(address recipient, uint256 quoteOut, uint256 tokenOut) | 0xf8d37a90738ae063b8b8058b66f5880cf3cf7ab0c5d4fa78219696591dfbfb67 | The curve handed over its reserves |
FeesSwept(uint256 protocolAmount, uint256 buybackAmount, uint256 creatorAmount) | 0x9f4cd7c4ed99d08a797804560c9c5d71d2cf7e101f2e3b5e7d1ca8a24c370e4f | Fees split and credited |
BuybackLocked(uint256 quoteSpent, uint256 tokensLocked) | 0x5feba9b0d52c92ada4b9c571c2bee52390c54f2947208ab250221e6ee32f12ff | A buyback ran and its tokens were locked |
AutoGraduationFailed(address indexed token, uint256 gasRemaining) | 0xe2cd2f31ebc05ec28640102987f4c8fc5f20e269e1b3aa82577f3f2f0e35c7c6 | The sweep inside the finishing buy failed. Treat as a work queue. Never emitted so far |
Hook
PoolId is bytes32 in these signatures.
| Event | topic0 | Means |
|---|---|---|
PoolRegistered(bytes32 indexed poolId, address memecoin, address quoteToken, address creator) | 0x01bf263a1db1652580721573296e1a1fa70b3d4c87f61d02a69c4e1109d2d573 | A graduated pool joined the hook |
HookFeeCollected(bytes32 indexed poolId, address currency, uint256 feeAmount, uint256 taxAmount) | 0xc532c43b3423e14ef72748f1c8291238829ca0af8ba9b67975ad1483485a4b4d | Fee and creator tax taken from a swap |
PoolFeesSwept(bytes32 indexed poolId, uint256 protocolAmount, uint256 buybackAmount, uint256 creatorAmount, uint256 tokensLocked) | 0x2f3c43579b9064b6f28edcf41608f3815792d274a56afe024359703cb4ea9b30 | Pool fees split and credited |
PoolConversionSkipped(bytes32 indexed poolId, uint256 retainedMemecoin) | 0xeed2d18eb96f3c2cb8c7b6993512a506c170e17d29355f2d7a0d5961f338de09 | A conversion was left pending. Never emitted so far |
PoolBuybackSkipped(bytes32 indexed poolId, uint256 foldedBackQuote) | 0xbdb9140e5a6bcb57cebdbf44a42f8c0f6c96af972d8f88cc3ae2b974f193bc0d | A buyback was skipped and paid to the creator. Never emitted so far |
BuybackEnabledUpdated(bytes32 indexed poolId, bool enabled) | 0xfebf5d5a892f779904618832d01bf549d0c159d7d0bf88067a8bffbf9ef6e7d4 | Buybacks turned on or off for a pool |
Escrow and vault
| Event | topic0 | Means |
|---|---|---|
Credited(address indexed recipient, address indexed depositor, uint256 amount) | 0x4e45da441832cf53bdaa69235704fc0575e68210f459ee1562911024b12967d5 | ETH credited |
CreditedToken(address indexed recipient, address indexed token, address indexed depositor, uint256 amount) | 0x5d104c62f50449fadfe6f4013c8f36588d32737f94b5ac9b83ddad33b3e1ffdf | An ERC-20 credited. Every ERC-20 launch payout and every vest release lands here |
Claimed(address indexed recipient, uint256 amount) | 0xd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a | ETH withdrawn |
ClaimedToken(address indexed recipient, address indexed token, uint256 amount) | 0xdbc1ea3a8459e4c7e11fb385b52bbb5cc8c8ab85eec5d883ac9aa78c171f5141 | An ERC-20 withdrawn |
Locked(address indexed token, address indexed depositor, uint256 amount, uint256 newVestingStart) | 0x967ad762aa9070ada8db64577288e214771e89667066ae38e8750cb8a86c5429 | Tokens entered the vest |
Released(address indexed token, uint256 creatorAmount, uint256 protocolAmount) | 0x82e416ba72d10e709b5de7ac16f5f49ff1d94f22d55bf582d353d3c313a1e8dd | Vested tokens paid out |