fix(cct-sdk): Refactor solana token-admin-registry ops - #309
Conversation
…10498-deploy-token
…10498-deploy-token
…10498-deploy-token
…-create-token-account
…10498-deploy-token
…-create-token-account
…-10498-deploy-token
…-create-token-account
…-create-token-account
…-create-token-account
|
You must have Developer access to commit code to Chainlink Labs on Vercel. If you contact an administrator and receive Developer access, commit again to see your changes. Learn more: https://vercel.com/docs/accounts/team-members-and-roles/access-roles#team-level-roles |
|
Ran this branch live on Solana devnet before reviewing, and the refactored ops work exactly as advertised end-to-end: Two non-blocking notes:
"files": [
...
- "!dist/cct/**",
- "!src/cct/**"
]
|
Fixed this. Will do a follow up for the others. |
aelmanaa
left a comment
There was a problem hiding this comment.
✅ Approve — M1 fixed and live-proven at cbdb519.
Re-reviewed at cbdb519 (was d0b2786). All 4 inline comments are resolved:
- M1 (Object.hasOwn → value semantics) ✅ —
validate.ts:101-102andappend-to-lookup-table.ts:77-78both changed fromObject.hasOwnto!== undefined. TheappendToLookupTable.validate()now delegates toresolvePoolProgram(single source of truth). Live-proven on devnet:{ poolProgramAddress, poolType: undefined }passesvalidate()andbuildUnsigned()cleanly, and executes on-chain (ALT filled to 10 canonical addresses). - N-clt (createLookupTable pool ref validation) ✅ —
create-lookup-table.ts:76:resolvePoolProgram(this.name, params)added tovalidate(), matching the sibling append op. - M1-t (regression test) ✅ —
validate.test.ts: new test'resolves pool references with the other key explicitly undefined'(both directions). Alsoappend-to-lookup-table.test.ts: new test'ignores an undefined unused pool reference'. - TSDoc polish ✅ —
programIddoc added ("resolved pool program address"), lock-release-fields caveat added,const cct = SolanaTokenManager.fromChain(chain)added to examples.
One non-blocking nit stands: files vs exports in package.json — !dist/cct/** and !src/cct/** still exclude the files the public exports resolve to. Already raised by mervin-link; the fix is dropping the two negations.
Gates: npm ci works clean, npm run check green (prettier + eslint + tsc), 26/26 touched tests pass.
What
poolTypeor custompoolProgramAddressWhy
Note