Files
proxmox/docs/00-meta/SAFE_PACKAGES_MIGRATION_PLAN.md
defiQUG bea1903ac9
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
Sync all local changes: docs, config, scripts, submodule refs, verification evidence
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-21 15:46:06 -08:00

2.6 KiB

Safe (Gnosis) Packages Migration Plan

Last Updated: 2026-02-16
Status: Complete — migrated to @safe-global/protocol-kit v1 (ethers v5)


Current State

Package: smom-dbis-138/frontend-dapp (bridge-dapp)

Package Status Replacement
@safe-global/safe-core-sdk Deprecated @safe-global/protocol-kit
@safe-global/safe-ethers-lib Deprecated (bundled in protocol-kit) @safe-global/protocol-kit
@safe-global/safe-service-client Deprecated @safe-global/api-kit
@safe-global/api-kit In use Already v4 — keep

Migration Path

Step 1: Protocol Kit (replaces safe-core-sdk + safe-ethers-lib)

  1. Docs: https://docs.safe.global/sdk/protocol-kit/guides/migrate-to-v1
  2. Install: pnpm add @safe-global/protocol-kit
  3. Remove: @safe-global/safe-core-sdk, @safe-global/safe-ethers-lib
  4. Code changes:
    • Replace SafeFactory, SafeAccountConfig imports from safe-core-sdk with protocol-kit equivalents
    • Replace ethers adapters — protocol-kit uses ethers v6; bridge-dapp currently uses ethers v5 — may need adapter layer or upgrade ethers
  5. Vite config: Update vite.config.ts exclude/include lists (remove old, add protocol-kit if needed)

Step 2: API Kit (replaces safe-service-client)

  1. Docs: https://docs.safe.global/sdk/api-kit/guides/migrate-to-v1
  2. Already have: @safe-global/api-kit@^4.0.1
  3. Remove: @safe-global/safe-service-client
  4. Code changes: Replace SafeServiceClient usage with ApiKit equivalents (see migration guide)

Step 3: Verification

  • Run pnpm run build in smom-dbis-138/frontend-dapp
  • Test multisig / Safe deployment flows in admin panel
  • Ensure WalletDeploymentEnhanced and any Safe-related components work

Affected Files

  • smom-dbis-138/frontend-dapp/package.json
  • smom-dbis-138/frontend-dapp/vite.config.ts
  • smom-dbis-138/frontend-dapp/src/components/admin/WalletDeploymentEnhanced.tsx (SafeFactory import commented out)
  • Any component using SafeServiceClient or Safe SDK

Blockers / Notes

  • ethers v5 vs v6: bridge-dapp uses ethers v5; protocol-kit prefers ethers v6. Check protocol-kit compatibility or use adapter.
  • supertest migrated: token-aggregation report tests now use native fetch + http server (no deprecated supertest).

References