Skip to content

Implement .env parsing for network configuration #9

Description

@Code-Paragon

Problem

The frontend currently lacks a standardized way to manage different deployment environments, meaning RPC URLs and Contract IDs will have to be hardcoded when integrating the SDK.

Expected behavior

A src/config.ts file is created to parse and validate environment variables (e.g., NEXT_PUBLIC_RPC_URL, NEXT_PUBLIC_CONTRACT_ID) with strict fallbacks.

Files to update

  • src/config.ts (create)
  • .env.example (create)

Project relevance

Ensures secure, dynamic deployments across local, testnet, and mainnet environments without committing sensitive configuration strings to the repository.

Acceptance criteria

  • Feature works as described
  • Tests are added or updated where needed
  • Documentation is updated where needed
  • .env.example is documented with required configuration keys
  • No TypeScript, lint, test, or build errors

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions