Skip to content

chore(deploy): mainnet fresh-deploy path + repoint to new mainnet contracts#71

Merged
colinisme merged 1 commit into
mainfrom
deploy/mainnet-gate
Jun 5, 2026
Merged

chore(deploy): mainnet fresh-deploy path + repoint to new mainnet contracts#71
colinisme merged 1 commit into
mainfrom
deploy/mainnet-gate

Conversation

@colinisme

Copy link
Copy Markdown
Contributor

What

Enables a safe mainnet fresh deploy and repoints the whole stack at the newly deployed mainnet contracts. The fresh deploy described below has already been executed and verified on-chain (chain 127001); this PR lands the script change + address repoint that the deploy depended on.

1. Deploy.s.sol — mainnet path

  • Gates createAgent("MarketSeed") + bootstrapMarket behind non-mainnet. bootstrapMarket faucet-mints 500 unbacked G — fatal on a full-backed mainnet (creates withdrawable G with no native backing).
  • On Gravity mainnet (block.chainid == 127001) it instead switches the treasury to withdraw mode: setFaucetEnabled(false)setWithdrawEnabled(true) (order matters — setWithdrawEnabled requires !faucetEnabled).
  • Testnet/anvil behaviour unchanged (faucet on, seeded market).

2. Repoint default Router → new mainnet proxy

0x4c2F…De03a (old) → 0x13860c81003e1d11E8C8576F995a68b02c750A59 (new) across:

  • frontend/config/gravity.json + gravity-mainnet.example.json
  • mcp-server/src/index.ts + http.ts defaults, and the rebuilt zero-install bundle mcp-server/bin/gravity-town-mcp.mjs
  • README.md, skills/gravity-town/references/connect.md

3. Frontend wei display

New mainnet runs the wei economy (1 G = 1e18). useArenaEngine now formatUnits(gBalance, 18) so the leaderboard G column shows whole-G instead of 5000000000000000000.

Deployed mainnet addresses (chain 127001)

Contract Address
Router 0x13860c81003e1d11E8C8576F995a68b02c750A59
AgentRegistry 0xC9B0EdA92A2164040f4b37fa011d5C1088232f5f
AgentLedger 0x859AcF859718515f0Ad39dF1C023150076856463
LocationLedger 0x10c5bE2706c6f575a21602Cdc5382c7a968c0601
InboxLedger 0x789add516de4363BDB29103D63d7f3018Dd7F421
EvaluationLedger 0x795bCAAC036F91282D5b6CC3c9Cf0fA87C9dcC8b
GameEngine 0x2975e834018971b0230CCaB7EaB1C51A9da636B0
ArenaEngine 0x396DE3685A279213Bc7e8293331cf57165475E6f
GTreasury 0xde9CcBB78eF024f9EBD32D6908A460e67Eee6DA5
CardLedger 0x37E66499168f797B8E3D5C13A589474D3d2D1361

On-chain verification (post-deploy)

  • GTreasury.faucetEnabled() == false, withdrawEnabled() == true, owner == deployer, totalOutstandingG == 0, native balance 0 ✅
  • ArenaEngine.WEI_PER_G() == 1e18
  • Router resolves all 5 services to the new proxies ✅
  • Dry-run proved the deploy makes exactly two treasury calls (setFaucetEnabled, setWithdrawEnabled) and no createAgent/bootstrapMarket.

Follow-ups (not in this PR)

  • Recover 200 G stranded in the old mainnet treasury 0xF45F…DA91 (UUPS proxy owned by deployer → withdrawSurplus/upgrade-sweep).
  • Republish the npx MCP package so the new default ships (npm publish from mcp-server/).
  • Redeploy the frontend (Vercel) to pick up the new router + wei display.
  • The old 61-agent mainnet world (incl. ~21 external wallets) is intentionally orphaned per the #69 fresh-deploy decision.

…tracts

- Deploy.s.sol: gate MarketSeed/bootstrapMarket behind non-mainnet. On
  Gravity mainnet (chain 127001) switch GTreasury to withdraw mode
  (faucet OFF -> withdraw ON) so no unbacked G can be minted on the
  full-backed mainnet economy.
- Repoint default Router to the freshly deployed mainnet proxy
  0x13860c81003e1d11E8C8576F995a68b02c750A59 across frontend config,
  MCP server defaults (src + rebuilt zero-install bin bundle), README,
  and the play-skill connect docs.
- frontend: format wei-denominated gBalance for display (1 G = 1e18),
  fixing the G column now that mainnet runs the wei economy.
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gravity-town Ready Ready Preview, Comment Jun 5, 2026 10:16am

Request Review

@colinisme colinisme merged commit ab0f73d into main Jun 5, 2026
6 checks passed
@colinisme colinisme deleted the deploy/mainnet-gate branch June 5, 2026 10:20
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.

1 participant