Skip to content

feat(cct-sdk): Add deploy token pool solana op - #296

Merged
mervin-link merged 21 commits into
cct-sdkfrom
feat/DAPP-10507-deploy-token-pool
Jul 21, 2026
Merged

mervin-link merged 21 commits into
cct-sdkfrom
feat/DAPP-10507-deploy-token-pool

Conversation

@mervin-link

@mervin-link mervin-link commented Jul 14, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • DAPP-10507
  • Add Solana CCT SDK support for deploying/initializing token pools
  • Expose generateUnsignedDeployTokenPool and deployTokenPool methods on SolanaTokenManager
  • Support optional allowlist configuration during token pool initialization

Why

  • Solana CCT users need an SDK operation to initialize token pools after deploying a mint and before registering the pool with the TokenAdminRegistry

@mervin-link
mervin-link requested a review from apedrob July 14, 2026 06:31
@mervin-link
mervin-link requested review from a team, PabloMansanet and aelmanaa as code owners July 14, 2026 06:31
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

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

@aelmanaa aelmanaa 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.

Detailed review feedback on the Solana CCT deployTokenPool PR.

Comment thread ccip-sdk/src/cct/solana/token-pool/operations/deploy-token-pool.ts Outdated
Comment thread ccip-sdk/src/cct/solana/index.ts
Comment thread ccip-sdk/src/cct/solana/token-pool/operations/deploy-token-pool.ts Outdated
Comment thread ccip-sdk/src/cct/solana/token-pool/operations/deploy-token-pool.ts Outdated
Comment thread ccip-sdk/src/cct/solana/token-pool/operations/deploy-token-pool.ts
@mervin-link
mervin-link requested a review from aelmanaa July 16, 2026 11:13
Base automatically changed from feat/DAPP-10498-deploy-token to cct-sdk July 20, 2026 15:21
Comment on lines +45 to +55
export type GenerateDeployTokenPoolResult = UnsignedSolanaTx & {
poolAddress: string
}

/** Parameters for executing Solana token pool deploy. */
export type ExecuteDeployTokenPoolParams = SolanaExecuteParams<DeployTokenPoolParams>

/** Result of executing Solana token pool deploy plus the derived pool state PDA. */
export type ExecuteDeployTokenPoolResult = TransactionHash & {
poolAddress: string
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't know if it make sense for Solana, but I've defined in evm/operation.ts this type can will reuse across different deployments

export type DeployResult = TransactionResult & { contractAddress: string }

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Currently, deploys in Solana are different. Deploy token returns two additonal params which are tokenAddress and metadataAddress while deploy token pool returns poolAddress only.

Comment thread ccip-sdk/src/cct/solana/token-pool/operations/deploy-token-pool.ts
Comment on lines +127 to +131
if (!isWallet(wallet)) throw new CCIPWalletInvalidError(wallet)

const payer = wallet.publicKey.toBase58()
const generateParams: GenerateDeployTokenPoolParams = { ...rest, payer }
this.validate(generateParams)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Confirm if you can call this.generate function from SolanaOperation instead of buildUnsigned to inherit its inner this.validate

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That’s what I tried before, but I need to verify that params.authority exists and is a valid PublicKey before checking it against wallet. Using this.generate would repeat that validation, so I used buildUnsigned instead.

@mervin-link
mervin-link requested a review from apedrob July 21, 2026 13:03

/** Parameters for initializing a Solana token pool, optionally with an allowlist. */
type DeployTokenPoolParams = {
/** Token mint address this pool manages. */

@aelmanaa aelmanaa Jul 21, 2026 •

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.

Suggest making the poolType-only scoping explicit in the doc so the boundary is intentional-on-the-record, not an accidental omission.

@remarks Targets only the canonical CCIP pool programs selected by poolType (burn-mint, lock-release). Deploying/initializing a custom pool program is intentionally not supported here: this op initializes the pool through the SDK's bundled program IDL, and a custom program may declare a different initialize instruction or pool-state PDA layout. This is a deploy-op scoping choice, not a protocol limit. CCIP-Solana accepts custom pool programs, and the registry/lookup-table ops stay program-agnostic. We can revisit if there is concrete demand for custom-pool deployment.

@aelmanaa
aelmanaa self-requested a review July 21, 2026 15:56
@mervin-link
mervin-link merged commit d4c6ae3 into cct-sdk Jul 21, 2026
1 of 4 checks passed
@mervin-link
mervin-link deleted the feat/DAPP-10507-deploy-token-pool branch July 21, 2026 16:10
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.

3 participants