fix: complete 0.100.21 mainnet deploy (witness, deploy script, frontend build, gateway routing) - #8
Merged
Conversation
…nd build, gateway routing)
Follow-up fixes found while deploying the effectstream 0.100.21 + bun migration
to mainnet. Each is required for go-fish to actually run on the new contract.
- node: add missing `wit_split_card_index` witness to actionWitnesses. The
compiled contract requires it; without it `initializeActionContract` throws
and the node crash-loops once sync reaches live game-action events. Mirrors
the frontend midnightBridge witness (index = suit*7 + rank, returned as
bigints).
- evm: fix deploy.mainnet.ts — it still imported the deleted GoFishLobby module
and referenced result.paimaL2Contract. Point it at effectstreaml2-module on
the arbitrum network so the mainnet deploy works.
- deployed_addresses.json + frontend VITE_PAIMA_L2_CONTRACT_ADDRESS: record the
redeployed mainnet effectstreaml2 contract 0x148bC957bFbCd344A50ec9cC08654c6e2A9656c2.
- frontend/vite.config.ts: nodePolyfills `overrides: { fs: memfs, 'node:fs': memfs }`
so server-only modules pulled into the bundle (get-wallet-info via
@effectstream/wallets) resolve named fs exports instead of the empty mock.
Matches block-kart. Without it `build:mainnet` fails.
- config.mainnet.ts: route EVM reads through ARBITRUM_ONE_RPC (the local
evm-gateway cache) instead of arbitrum's default public RPC, matching the
other migrated games.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Yiakman
added a commit
that referenced
this pull request
Jun 13, 2026
fix: add wit_split_card_index to queryWitnesses (follow-up to #8)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up fixes discovered while deploying the effectstream 0.100.21 + bun migration (PR #7) to the mainnet box. Each is required for go-fish to actually run on the new contract. The mainnet redeploy + cutover are already live on the box; this PR makes the source match.
Changes
1.
wit_split_card_indexwitness (the blocker)packages/client/node/src/midnight-actions.ts— the compiled Midnight contract requires awit_split_card_indexwitness, butactionWitnessesnever defined it. Result:initializeActionContractthrows and the node crash-loops once sync reaches live game-action events. (Dormant before because the node was ~17 days behind; the mainnet skip-ahead brought it to realtime and exposed it. Pre-dates this migration — traces to theadmin_secret_keystub work.)Fix mirrors the frontend
midnightBridgewitness, validated against the contract's own reconstruction check:index = suit*7 + rank, returned as bigints ([Uint<0..256>, Uint<0..256>]).2.
deploy.mainnet.tsbroken importpackages/shared/contracts/evm/deploy.mainnet.tsstill imported the deletedGoFishLobbymodule and referencedresult.paimaL2Contract. Repointed toeffectstreaml2-moduleon thearbitrumnetwork so the mainnet deploy runs.3. New mainnet contract address
deployed_addresses.json(key was the staleGoFishModule#PaimaL2Contract) and frontendVITE_PAIMA_L2_CONTRACT_ADDRESSnow record the redeployed contract:0x148bC957bFbCd344A50ec9cC08654c6e2A9656c2(Arbitrum, deploy block 472739253).4. Frontend mainnet build fix
frontend/vite.config.ts— addnodePolyfills({ overrides: { fs: "memfs", "node:fs": "memfs" } }). Without itbuild:mainnetfails: server-onlyget-wallet-info(pulled in via@effectstream/wallets) hitsnode-stdlib-browser's emptyfsmock and can't resolve named exports. Matches block-kart.5. Gateway read routing
config.mainnet.ts— route EVM reads throughARBITRUM_ONE_RPC(the local evm-gateway cache) instead of arbitrum's default public RPC, matching the other migrated games. (Not in the original ask, but it's live on the box and origin/v2 would otherwise bypass the gateway — drop this commit hunk if you'd rather keep it box-local.)Notes
build/, midnightmanaged/) are gitignored and unchanged.MemoryMax/MemoryHighcaps (box-side, not in this repo).🤖 Generated with Claude Code