Skip to content

fix: wire contract addresses and env vars from NEXT_PUBLIC_* with testnet defaults (#9) - #317

Open
Chummy-debug wants to merge 1 commit into
Ada-Girly881:testnet-implementationfrom
Chummy-debug:fix/9-wire-env-contract-addresses
Open

fix: wire contract addresses and env vars from NEXT_PUBLIC_* with testnet defaults (#9)#317
Chummy-debug wants to merge 1 commit into
Ada-Girly881:testnet-implementationfrom
Chummy-debug:fix/9-wire-env-contract-addresses

Conversation

@Chummy-debug

Copy link
Copy Markdown

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.example to document every environment variable consumed by constants.ts.

Related Issue

Closes #9

Changes

🔧 Contract address wiring — frontend/src/lib/constants.ts

  • [EXISTING] All 5 contract IDs (REGISTRY, BOT_NFT, ACCRUAL, MARKETPLACE, TOKEN) already read from NEXT_PUBLIC_* env vars
  • [EXISTING] SOROBAN_RPC_URL defaults to https://soroban-testnet.stellar.org
  • [EXISTING] NETWORK_PASSPHRASE defaults to "Test SDF Network ; September 2015"
  • [EXISTING] Individual exports + CONTRACT_ADDRESSES aggregate object

📄 Environment documentation — frontend/.env.example

  • [FIX] Changed SOROBAN_RPC_URL example from placeholder https://your-soroban-rpc.example.com to actual testnet default https://soroban-testnet.stellar.org
  • [ADD] Missing env vars documented: NEXT_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_MS

Verification 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
```

Acceptance Criteria Status
5 contract addresses read from env vars
RPC URL read from env var with testnet default
Network passphrase read from env var with testnet default
.env.example documents all NEXT_PUBLIC_* vars

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@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.

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.

Wire contract addresses from environment

2 participants