fix: wire contract addresses and env vars from NEXT_PUBLIC_* with testnet defaults (#9) - #317
Open
Chummy-debug wants to merge 1 commit into
Conversation
|
@Chummy-debug is attempting to deploy a commit to the Ada's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Overview
Wires all 5 Soroban contract addresses, the RPC URL, and the network passphrase from
process.env.NEXT_PUBLIC_*with sensible testnet defaults, and updates.env.exampleto document every environment variable consumed byconstants.ts.Related Issue
Closes #9
Changes
🔧 Contract address wiring —
frontend/src/lib/constants.tsREGISTRY,BOT_NFT,ACCRUAL,MARKETPLACE,TOKEN) already read fromNEXT_PUBLIC_*env varsSOROBAN_RPC_URLdefaults tohttps://soroban-testnet.stellar.orgNETWORK_PASSPHRASEdefaults to"Test SDF Network ; September 2015"CONTRACT_ADDRESSESaggregate object📄 Environment documentation —
frontend/.env.exampleSOROBAN_RPC_URLexample from placeholderhttps://your-soroban-rpc.example.comto actual testnet defaulthttps://soroban-testnet.stellar.orgNEXT_PUBLIC_HORIZON_URL,NEXT_PUBLIC_TX_TIMEOUT,NEXT_PUBLIC_BASE_FEE,NEXT_PUBLIC_POINTS_PER_AMT,NEXT_PUBLIC_LEADERBOARD_LIMIT,NEXT_PUBLIC_POLL_INTERVAL_MS,NEXT_PUBLIC_COUNTER_TICK_MSVerification Results
```
.env.example now covers every NEXT_PUBLIC_* var consumed by constants.ts
$ grep -oP "NEXT_PUBLIC_\w+" frontend/src/lib/constants.ts | sort > /tmp/code_vars
$ grep -oP "NEXT_PUBLIC_\w+" frontend/.env.example | sort > /tmp/env_vars
$ diff /tmp/code_vars /tmp/env_vars
✅ Complete parity — no missing vars
```