Skip to main content
When the Move source changes, the deployed package id changes. Every TS, frontend, and registry reference to the old package id needs to follow.

When to republish

  • New Move module or function.
  • Breaking type change (struct field added/removed).
  • New event you want indexed.

Pre-flight

cd packages/move
sui move build           # must be clean
sui move test            # all green
cd ../..

Republish recipe

1

Reset Published.toml

Newer Sui CLI gates re-publish on this. Either delete or clear the entry under [published].
2

Publish

cd packages/move
sui client publish --json --gas-budget 200000000 > /tmp/dp-publish.json
cd ../..
pnpm env:from-publish /tmp/dp-publish.json --force
--force overwrites existing .env keys.
3

Re-register markets

The old MarketRegistry is gone; register again:
pnpm market:register --kind price --question --oracle-svi 0x… --execute
pnpm market:register --kind oo --question --execute
4

Re-create AccessPolicy

pnpm tsx scripts/create-seal-policy.ts --execute
Paste id into .env and frontend lib/env.ts.
5

Re-create dark-pool vault

pnpm tsx scripts/create-darkpool-vault.ts --market wc26_euro_champion --execute
6

Re-register agent

pnpm agent:register --name --execute
7

Restart indexer

Indexer event streams are scoped to the new package id. Restart the container or the dev process.
docker compose restart indexer
8

Smoke-test

pnpm smoke:mint --oracle-svi 0x… --execute

What does NOT need re-bootstrap

  • PredictManager. Belongs to Predict, not DarkPool.
  • DeepBook V3 BalanceManagers + TradeCaps. Belong to V3, not DarkPool.
  • Per-market binary packages. Each one is its own independent package.
  • V3 YES/NO pools. Same.

Fallback for CLI flakiness

CLI 1.65.x sometimes emits gRPC-style JSON that parse-publish-output can’t read. Recover ids manually:
sui client tx-block <digest> --json | jq '.objectChanges'
# pull out packageId + shared object ids by hand
pnpm env:from-publish /tmp/dp-publish.json --force
For binary markets specifically: scripts/finish-create-market.ts --digest … recovers from a half-completed publish + create_market.

Republish history

  • 2026-06-10. Published all 7 modules incl. dark_pool, deleted position.move and outcome_market.move. The current live deployment.