Feat/issue 259 deploy community factory - #285
Merged
Caneryy merged 3 commits intoAug 30, 2026
Merged
Conversation
…lla-labs#259) - Upload approved community_nft and community_governor WASM to testnet - Deploy CommunityFactory with owner and approved WASM hashes - Deploy default community NFT and Governor instances for fallback routes - Capture deployment ledger sequence from Soroban RPC - Update apps/web/.env.local preserving unrelated variables and comments - Display contract IDs, WASM hashes, deploy ledger, and Stellar Expert explorer links - Add --dry-run option for testability and offline command verification - Add scripts/deploy-testnet.test.mjs automated test suite and wire into npm test - Update README with new deploy flow, parameters, and dry-run usage - Fix broken test mock references in web workspace so npm test passes cleanly
|
@Oluwa-Laughter is attempting to deploy a commit to the caneryy's projects Team on Vercel. A member of the Team first needs to authorize it. |
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Testnet Deployment Update
Extends
scripts/deploy-testnet.shto deploy and configureCommunityFactoryonStellar testnet as outlined in ADR-005
and Plan N3.
Motivation and Problem
Previously,
scripts/deploy-testnet.shwas constrained to the initial MVParchitecture:
community_nftandcommunity_governorinstances.CommunityFactory.NEXT_PUBLIC_GOVERNOR_START_LEDGER, which is required for proposalevent indexing.
apps/web/.env.localwithcat >, removing unrelated customenvironment variables and comments.
Key Changes
WASM uploads: Upload approved
community_nft.wasmandcommunity_governor.wasmwithstellar contract upload, capturing theirSHA-256 hashes as
NFT_WASM_HASHandGOV_WASM_HASH.CommunityFactory deployment: Deploy
community_factory.wasmwith thefollowing constructor arguments:
Backward compatibility: Deploy default
community_nftandcommunity_governorinstances so existing single-community fallback views(
/communityand/proposals) and health endpoints remain functional.Ledger capture: Query Soroban RPC
getLatestLedgerimmediately afterdeployment to record
NEXT_PUBLIC_GOVERNOR_START_LEDGER.Non-destructive
.env.localupdate: Parse the existingapps/web/.env.localline by line, updating managed keys in place andappending new keys while preserving unrelated custom variables, comments,
and whitespace. For example, preserve
NEXT_PUBLIC_IPFS_GATEWAY_URL.Output and explorer links: Emit a formatted deployment table containing
contract IDs, WASM hashes, deployment ledger, and direct Stellar Expert
explorer links for every deployed contract and the deployer account.
Dry-run and safe shell behavior: Support
--dry-run,--network,--rpc-url, and--helpflags withset -euo pipefailand identityvalidation.
Automated test suite: Add
scripts/deploy-testnet.test.mjsto verifycommand construction, argument passing,
.env.localpreservation, anddry-run execution. Wire the tests into the root
npm testcommand.Documentation: Update
README.mdwith the new deployment steps and--dry-runcommand options.Test doubles fix: Update outdated test mock references in the web app:
stellar.ts,voteAggregation.test.ts,ProposalDetailPage.test.tsx,and the Vitest test runner configuration, so the web test suite passes
cleanly.
Test Plan
1. Automated Tests
Run the workspace test suite and layout verification:
Expected results:
scripts/check-production-health.test.mjsandscripts/deploy-testnet.test.mjs.scripts/check-workspace-layout.mjs.2. Dry-Run Command Construction Verification
Run the deployment script with
--dry-runto verify CLI argument construction,mock outputs, and non-destructive
.env.localupdates without broadcastingtransactions:
3. Manual Live Testnet Deployment
Generate and fund a testnet identity, then run the deployment:
Verify that:
apps/web/.env.localcontains updated values forNEXT_PUBLIC_COMMUNITY_FACTORY_CONTRACT_ID,NEXT_PUBLIC_NFT_CONTRACT_ID,NEXT_PUBLIC_GOVERNOR_CONTRACT_ID, andNEXT_PUBLIC_GOVERNOR_START_LEDGER..env.localremain unaltered.and valid Stellar Expert testnet explorer links.
Checklist
npm run lintand fixed warnings introduced by these changes.npm run buildsuccessfully.files.
npm run test:contractspasses.