Repository navigation
feat(cct-sdk): Add deploy token pool solana op - #296
Conversation
…10498-deploy-token
|
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 |
…10498-deploy-token
…10498-deploy-token
aelmanaa
left a comment
There was a problem hiding this comment.
Detailed review feedback on the Solana CCT deployTokenPool PR.
| 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 | ||
| } |
There was a problem hiding this comment.
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 }
There was a problem hiding this comment.
Currently, deploys in Solana are different. Deploy token returns two additonal params which are tokenAddress and metadataAddress while deploy token pool returns poolAddress only.
| if (!isWallet(wallet)) throw new CCIPWalletInvalidError(wallet) | ||
|
|
||
| const payer = wallet.publicKey.toBase58() | ||
| const generateParams: GenerateDeployTokenPoolParams = { ...rest, payer } | ||
| this.validate(generateParams) |
There was a problem hiding this comment.
Confirm if you can call this.generate function from SolanaOperation instead of buildUnsigned to inherit its inner this.validate
There was a problem hiding this comment.
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.
|
|
||
| /** Parameters for initializing a Solana token pool, optionally with an allowlist. */ | ||
| type DeployTokenPoolParams = { | ||
| /** Token mint address this pool manages. */ |
There was a problem hiding this comment.
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.
What
generateUnsignedDeployTokenPoolanddeployTokenPoolmethods onSolanaTokenManagerWhy