feat(cct-sdk): Add set rebalancer op solana - #370
Conversation
|
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 |
|
✅ APPROVE — 0 blockers, 0 majors. Doc-polish nits only. This op is a faithful structural twin of the already-approved Verification: Green + On-Chain Grounded + Live Devnet ProvenTypeScript: tsc 0 diagnostics (net-new/changed files) On-Chain/bs58 Grounded — CORRECT:
@throws Attribution: Correct (no early state reads; not-owner surfaces as CCTTxFailedError at simulation) ✅ LIVE Devnet — Full lifecycle proven (real lock-release pool; rebalancer gating verified):
The only variable between blocked and successful withdraw is the rebalancer field — proving both that the op writes it and the field gates who may move liquidity. Cross-Family Note: EVM has |
|
Comment 1 — Nit 1 (DX): Add @example for the disable path Both facade Suggested fix: Add an * @example Disable rebalancing
* ```ts
* const cct = SolanaTokenManager.fromChain(chain)
* await cct.setRebalancer({
* tokenAddress: mint,
* poolType: 'lock-release',
* rebalancer: PublicKey.default.toBase58(), // disable
* wallet,
* })
* ```Comment 2 — Nit 2 (DX): Add @see cross-link to setCanAcceptLiquidity The two ops jointly gate lock-release liquidity:
The Suggested fix: Add reciprocal
|
|
Comment 3 — Nit 3 (DX): Spell out the consequence in @remarks Current doc: "disables rebalancing" (states how — zero address). Sibling ops spell such consequences out in Suggested fix: Add a * @remarks
* ⚠️ **Consequence:** Rebalancer is the address allowed to provide or withdraw liquidity.
* Setting the zero address (`11111111111111111111111111111111`) removes the rebalancer; until a new one
* is set, **no account can provide or withdraw liquidity**, even liquidity already in the pool.
* This does not affect whether the pool accepts liquidity — see {@link setCanAcceptLiquidity}.Comment 4 — Nit 4 (DX): Disambiguate authority vs rebalancer roles
Suggested fix: Add a half-clause to the * @param rebalancer Address authorized to provide or withdraw pool liquidity (stored on the pool; not a transaction signer).Comment 5 — Nit 5 (Arch): Cosmetic parse field order
|
Summary: ✅ APPROVEStatus: 0 blockers, 0 majors. Five optional doc polish nits (Comments 1–5 above). This is a structural twin of
Non-Issues (verified):
Recommendation: The op is correct, on-chain/bs58 grounded, and live-proven. The five nits are optional doc polish:
Ready to ship after optional nits are applied. |
@aelmanaa Addressed all your comments. |
63a1b53
into
feat/DAPP-11258-can-accept-liquidity
* feat: add transfer pool ownership op solana * feat: add accept pool ownership op solana * feat: add transfer authority op solana * fix: update export barrel * feat: add mint tokens op solana * fix: address comments * fix: address comments * feat: add set can accept liquidity op solana * fix: add lock release token pool idl * fix: update tsdoc * fix: address comments * feat(cct-sdk): Add set rebalancer op solana (#370) * feat: add set rebalancer op solana * fix: update tsdoc * fix: address comments
What
setRebalancerunsigned and signed CCT operations11111111111111111111111111111111as the default/zero rebalancer address that disables rebalancingWhy