You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Contract IDs in apps/web/.env.testnet disagree with packages/contracts/contracts.json (14 of 18 differ) #860
AGENTS.md §5 says: "Contract IDs are committed, not secrets. They live in packages/contracts/contracts.json. Do not reintroduce environment variables for them."
But the web app still reads every contract ID from env vars (apps/web/src/app/config/env.ts → requireEnv(import.meta.env.VITE_CONTRACT_*)), sourced from apps/web/.env.testnet. Comparing the two:
18 contract/token IDs in .env.testnet
14 of them don't appear in contracts.json, including VITE_CONTRACT_DATA_STORE, MARKET_FACTORY, DEPOSIT_HANDLER, WITHDRAWAL_HANDLER, ORDER_VAULT, REFERRAL_STORAGE, ORACLE and ORDER_HANDLER
So the generated bindings (packages/contracts) and the running app may point at different deployments. That risks wrong reads and transactions sent to stale contracts.
Acceptance criteria
Find which set is the current testnet deployment and record it here
Make contracts.json the single source: web reads IDs from @workspace/contracts and the VITE_CONTRACT_* vars are removed (keep only network/RPC config in env)
Test that every contract the web app uses resolves from contracts.json for each network
Update .env.example, .env.testnet, .env.mainnet and the README
Found while running the web app locally (bun dev, headless Chromium and axe-core sweep of every route at desktop and iPhone-13 sizes) on 2026-10-15, main @ 4c5cf1d. Contributors: follow AGENTS.md / CONTRIBUTING.md. The full commit gate must pass, with no eslint-disable, .skip, or lowered thresholds.
I reviewed the requirements for "Contract IDs in apps/web/.env.testnet disagree with packages/contracts/contracts.json (14 of 18 differ)" and would like to work on this implementation.
Technical Implementation Outline:
Review contract state storage keys, TTL policies, and auth guards (Address::require_auth) in packages/contracts/contracts.js.
Implement safe state transition logic with checked arithmetic preventing under/overflow.
Write comprehensive Soroban unit tests covering standard flows, unauthorized callers, and reverts.
Congratulations, @Jaydbrown! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @Jaydbrown: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
Made packages/contracts/contracts.json the single source of truth for contract addresses across networks (testnet and mainnet).
Exported typed contract deployment mappings and getContractAddresses from @workspace/contracts.
Updated apps/web/src/app/config/contracts.ts to source directly from @workspace/contracts using ENV.NETWORK.
Removed VITE_CONTRACT_* from apps/web/src/app/config/env.ts, .env.testnet, .env.example, and .env.mainnet.
Added contract resolution tests in apps/web/src/app/config/contracts.test.ts and packages/contracts/src/deployments.test.ts verifying all contracts resolve for testnet and mainnet.
😎 @Jaydbrown: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.
Activity
Ranjeet2063 commentedon Oct 15, 2026
Hello maintainers,
I reviewed the requirements for "Contract IDs in apps/web/.env.testnet disagree with packages/contracts/contracts.json (14 of 18 differ)" and would like to work on this implementation.
Technical Implementation Outline:
Address::require_auth) inpackages/contracts/contracts.js.Please assign this issue to me. I will submit a clean, well-tested, and production-ready PR promptly!
Dekah101 commentedon Oct 16, 2026
@Dekah101 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Dekah101 to this issue.
Eli-greens commentedon Oct 16, 2026
@Renowned9 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Renowned9 to this issue.
Ay-obami commentedon Oct 18, 2026
@Ay-obami has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Ay-obami to this issue.
Ghoost-404 commentedon Oct 18, 2026
@Ghoost-404 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Ghoost-404 to this issue.
Jaydbrown commentedon Oct 18, 2026
@Jaydbrown has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Jaydbrown to this issue.
drips-wave commentedon Oct 18, 2026
Congratulations, @Jaydbrown! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @Jaydbrown: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
Jaydbrown commentedon Oct 18, 2026
Resolved in #996:
packages/contracts/contracts.jsonthe single source of truth for contract addresses across networks (testnetandmainnet).getContractAddressesfrom@workspace/contracts.apps/web/src/app/config/contracts.tsto source directly from@workspace/contractsusingENV.NETWORK.VITE_CONTRACT_*fromapps/web/src/app/config/env.ts,.env.testnet,.env.example, and.env.mainnet.apps/web/src/app/config/contracts.test.tsandpackages/contracts/src/deployments.test.tsverifying all contracts resolve for testnet and mainnet.grantfox-oss commentedon Oct 19, 2026
🎉 This issue has been marked as completed on GrantFox!
@Jaydbrown's PR #996 was approved and merged by @IbrahimIjai.
🏆 @Jaydbrown: You earned 35 FoxPoints for this contribution! Your current tier: Builder (1,022 total points). Track your full progress on GrantFox.
👏 Great work, @Jaydbrown! Keep contributing to SO4-Markets.
drips-wave commentedon Oct 19, 2026
This issue has been completed by @Jaydbrown as part of the Stellar Wave Program's 10th Wave 🥳
😎 @Jaydbrown: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.