Skip to main content
Reads sui client publish --json output, extracts the new package id + all shared object ids, and writes them into .env. Skips already-set values unless --force.

Usage

What it reads

  • digest. The publish tx digest.
  • objectChanges. Looks for published with packageId, and created with objectType matching our shared objects.

What it writes

Republish recipe (for future Move-source changes)

  1. Reset Published.toml. Newer Sui CLI gates re-publish on this.
  2. sui client publish --json --gas-budget 200000000 > /tmp/dp-publish.json.
  3. pnpm env:from-publish /tmp/dp-publish.json --force.
  4. Re-register markets, re-create the AccessPolicy, re-create dark-pool vault (since the package id changed):
  5. Restart indexer (so its package-scoped event streams attach to the new package).

Fallback for CLI 1.65.x

CLI 1.65.x sometimes emits gRPC-style JSON that this parser can’t read. Recover ids via: