Repository navigation
fix(launchpad): pin the create-pool lookup table with MomoSwap's vault treasury keys - #10
Conversation
…t treasury keys MomoSwap moved both launchpad treasury fields to its Squads vault: treasury_payment to the vault's wCOOK account 5jP8CW... (proposal cookiechain#5) and treasury_lamports to the vault 85gdK5... (proposal cookiechain#7, via set_treasury_lamports from anchor-launchpad #91). The pinned table CawUNM... still lists the old keys at [3] and [4], so every create + dev-buy build is refused. Pin the new frozen table 9vExLr84CQaggCo2LbcM5uw8xJG1e6FxiKByoQFGBXKA (authority none): config, wCOOK, rent, 85gdK5..., 5jP8CW... Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fibanachos
left a comment
There was a problem hiding this comment.
Ran yarn test on 2a55c9f: it passes (49/49 files, 749 tests, smoke 57 tools). On chain, 9vExLr84… is frozen and active with exactly these five keys in order, and the live Config 8nj4iBHZ… has treasury_lamports = 85gdK5… and treasury_payment = 5jP8CW…, so the new pin matches what the program enforces today. One test ask inline.
| "SysvarRent111111111111111111111111111111111", // rent sysvar | ||
| "9rj5GEEypdCbJ1W9is4LHeQxg86h9vxSny6pmsxmakni", // config.treasuryLamports | ||
| "7PwH1Q65fAjTD9LjNWakD7iXMhZRF57W5F1Uj6ggYpuf", // config.treasuryPayment | ||
| "85gdK5eftWmbp5G2nJvhvb7fvzcFF5rcTqojf2a7t3Pr", // config.treasuryLamports (the MomoSwap Squads vault) |
There was a problem hiding this comment.
The altAccountMismatch test in src/core/launchpad/index.test.ts (the KEYS const around line 902) still holds the old 9rj5GEE… / 7PwH1Q… keys while its test claims to assert "the production values, asserted literally". Nothing ties it to LAUNCHPAD_ALT_KEYS, so it keeps passing and would never catch a wrong key here. Could you update the literals and pin them against this constant?
Prompt for an agent
First verify the finding yourself; do not trust it. In cookie-mcp, open src/core/launchpad/index.test.ts and find `describe("altAccountMismatch"` and its `KEYS` const. Compare KEYS to LAUNCHPAD_ALT_KEYS in src/core/config.ts. If KEYS already equals LAUNCHPAD_ALT_KEYS (85gdK5eftWmbp5G2nJvhvb7fvzcFF5rcTqojf2a7t3Pr at [3], 5jP8CWGPkfCAmuFe6P9n9ik4P4BFCjT3Bod17EKChsXT at [4]) or the test already asserts against LAUNCHPAD_ALT_KEYS, stop and report back instead of changing code.
Otherwise:
1. Replace KEYS[3] and KEYS[4] with 85gdK5eftWmbp5G2nJvhvb7fvzcFF5rcTqojf2a7t3Pr and 5jP8CWGPkfCAmuFe6P9n9ik4P4BFCjT3Bod17EKChsXT (keep [0]-[2] as they are, keep them as literals).
2. Add a golden test in that describe block: `expect(LAUNCHPAD_ALT_KEYS).toEqual(KEYS)`, adding LAUNCHPAD_ALT_KEYS to the existing `from "../config"` import at the top of the file, so a future table rotation must update the test too.
3. Run `yarn test` and confirm it passes.
Do not touch src/core/config.ts, the other altAccountMismatch cases, or positions.test.ts / verify-launchpad.ts (their 9rj5GEE… is a trader wallet, not the treasury key).
MomoSwap launches with a dev buy are refused through cookie-mcp, because the pinned create-pool lookup table no longer matches the token launchpad's live Config.
MomoSwap moved both treasury fields of the launchpad Config (
8nj4iBHZ…, programmomoL7wu…) to its Squads multisig vault:treasury_payment→5jP8CWGPkfCAmuFe6P9n9ik4P4BFCjT3Bod17EKChsXT, the vault's wCOOK account (Squads proposal Any pre-trade risk check in front of the trade/launch/LP tools? #5, 2026-10-21).treasury_lamports→85gdK5eftWmbp5G2nJvhvb7fvzcFF5rcTqojf2a7t3Pr, the vault (proposal fix(nft): make_offer fails with 3012 when the bidder has no token account #7, throughset_treasury_lamportsfrom develop-momo/anchor-launchpad-momoswap#91, live on momoL7wu since proposal Bundle for edge runtimes; per-domain library entries #6).The pinned table
CawUNMrsk6KwjXZ8kNPQgC1obMD4QM5oqvo3rF2bErX6still holds the old keys at [3] (9rj5GEE…) and [4] (7PwH1Q…).This PR pins the new table
9vExLr84CQaggCo2LbcM5uw8xJG1e6FxiKByoQFGBXKA, published and frozen on 2026-10-23 (authority none). Its keys, in order: config8nj4iBHZ…, wCOOK, rent sysvar,85gdK5…,5jP8CW…. It is the same table the MomoSwap frontend pins (develop-momo/momoswap-frontend#421) and the backend serves (LAUNCHPAD_ALT) once proposal #7 has executed.MOMOSWAP_LAUNCHPAD_ALTstill overrides the address for non-production deployments.Changes:
src/core/config.ts(address and keys [3], [4], plus a note in the doc comment), and a CHANGELOG entry under Unreleased.Checks run locally:
yarn typecheckandyarn lintpass.vitest: 48 of 49 files pass. The one failing file,imageFile.test.ts, fails on a Windows checkout with or without this change (Windows paths and symlinks), so it should pass on CI.🤖 Generated with Claude Code