Skip to content

margin v5: register mainnet package 0x124bb3d8#1018

Merged
tonylee08 merged 1 commit into
mainfrom
tlee/margin-v5-mainnet
May 19, 2026
Merged

margin v5: register mainnet package 0x124bb3d8#1018
tonylee08 merged 1 commit into
mainfrom
tlee/margin-v5-mainnet

Conversation

@tonylee08

Copy link
Copy Markdown
Collaborator

Summary

  • Add v5 mainnet margin package 0x124bb3d8105d6d301c0d40feaa54d65df6b301e4d8ddd5eb8475b0f8a18cff2e to MAINNET_MARGIN_PACKAGES as the new Latest.
  • Backfill v4 (0x7767428727629a08dfd196bd4fc00d8a060e30da33aa63f4087fb3271e615a98) which was missed when it was published — without it, the indexer would not recognize v4 events.
  • Bump packages/deepbook_margin/Published.toml mainnet to published-at = v5, version = 5 so future upgrades resolve from v5.
  • Point scripts/transactions/adminInjectCapital.ts MARGIN_PACKAGE at v5.

Key decisions

  • Kept the older v1–v4 entries in MAINNET_MARGIN_PACKAGES rather than replacing them. The indexer matches any of them, and existing manager objects on v3/v4 still need their wind-down (repay/withdraw/reduce-only) events captured per the MARGIN_VERSION bump in 434a5085a.
  • original-id and upgrade-capability in Published.toml are unchanged (upgrade cap is an owned object, not regenerated per upgrade).

Test plan

  • cargo fmt -p deepbook-indexer
  • cargo build -p deepbook-indexer
  • sui move build in packages/deepbook_margin
  • After merge + deploy: confirm indexer ingests an event from the v5 package address

- Indexer: backfill v4 (0x7767…5a98) which was never added, and
  append v5 (0x124b…cff2e) as the new Latest in
  MAINNET_MARGIN_PACKAGES.
- Published.toml mainnet: bump published-at to v5 and version = 5.
- adminInjectCapital.ts: point MARGIN_PACKAGE at v5.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@tonylee08 tonylee08 merged commit 8b024db into main May 19, 2026
9 checks passed
@tonylee08 tonylee08 deleted the tlee/margin-v5-mainnet branch May 19, 2026 19:50
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