Skip to content

fix(launchpad): pin the create-pool lookup table with MomoSwap's vault treasury keys - #10

Merged
fibanachos merged 1 commit into
cookiechain:mainfrom
rugruts:fix/launchpad-alt-vault
Oct 26, 2026
Merged

fibanachos merged 1 commit into
cookiechain:mainfrom
rugruts:fix/launchpad-alt-vault

Conversation

@rugruts

@rugruts rugruts commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

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…, program momoL7wu…) to its Squads multisig vault:

The pinned table CawUNMrsk6KwjXZ8kNPQgC1obMD4QM5oqvo3rF2bErX6 still 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: config 8nj4iBHZ…, 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_ALT still 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 typecheck and yarn lint pass. 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

…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 fibanachos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/core/config.ts
"SysvarRent111111111111111111111111111111111", // rent sysvar
"9rj5GEEypdCbJ1W9is4LHeQxg86h9vxSny6pmsxmakni", // config.treasuryLamports
"7PwH1Q65fAjTD9LjNWakD7iXMhZRF57W5F1Uj6ggYpuf", // config.treasuryPayment
"85gdK5eftWmbp5G2nJvhvb7fvzcFF5rcTqojf2a7t3Pr", // config.treasuryLamports (the MomoSwap Squads vault)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@fibanachos
fibanachos merged commit 97bf1f2 into cookiechain:main Oct 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants