Skip to content

docs: describe the migrate_adapter branch in the testnet adapter-swap section - #666

Open
funmilayo-ui wants to merge 1 commit into
drydocs:mainfrom
funmilayo-ui:docs/662-migrate-adapter
Open

docs: describe the migrate_adapter branch in the testnet adapter-swap section#666
funmilayo-ui wants to merge 1 commit into
drydocs:mainfrom
funmilayo-ui:docs/662-migrate-adapter

Conversation

@funmilayo-ui

Copy link
Copy Markdown

Summary

apps/docs/operations/testnet-deployment.md's "Pushing new adapter code to a live vault" section described the pre-#514 behaviour of scripts/redeploy-blend-adapter.sh: a single printed set_adapter command plus a manual "withdraw everything first" step. The script has branched on get_total_shares for a while and prints migrate_adapter for a vault that has depositors, reserving set_adapter for a vault with none.

closes #662

Changes

  • Rewrote the section to cover both branches the script actually prints, with a get_total_shares check up front to pick between them.
  • Documented migrate_adapter --new-adapter ... --max-slippage-bps 100: atomic move of the vault's whole position, slippage bound in basis points (max 10000), per-depositor bookkeeping denominated in vault shares so nobody has to withdraw first, and the SameAdapter / NoAdapterPosition failure cases.
  • Kept set_adapter documented as the zero-depositor path, with the ADPT_SH-reset caveat that explains why it is wrong for a vault holding a position.
  • Fixed the auth note: the script prints both commands with --source \$DEPLOYER, and that key must be the vault admin (admin.require_auth()); the old text said to use ADMIN "not DEPLOYER", which does not match what the script emits.

Verification

  • Cross-checked against scripts/redeploy-blend-adapter.sh (lines 11-19 and 70-91) and packages/contracts/vault/src/lib.rs migrate_adapter (slippage bound, SameAdapter, NoAdapterPosition, share bookkeeping preserved).
  • prettier --check apps/docs/operations/testnet-deployment.md → "All matched files use Prettier code style!"
  • Docs-only change; no code paths touched.

The redeploy-blend-adapter.sh script branches on get_total_shares and
prints migrate_adapter for a vault with depositors, set_adapter only for
a vault with none. The doc still described the pre-drydocs#514 set_adapter-only
flow with a manual withdraw-everything step.
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@funmilayo-ui Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@funmilayo-ui is attempting to deploy a commit to the Collins' projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

[Docs] testnet-deployment.md's adapter-swap section is stale, doesn't mention migrate_adapter

1 participant