Skip to content

Add contract configuration validation #7

@Lakes41

Description

@Lakes41

The contracts helper reads MEMBERSHIP_NFT_ADDRESS and CHAIN_ID directly from environment variables. Add validation so invalid or missing contract configuration fails clearly when on-chain features are used.

Suggested tasks

  • Validate that MEMBERSHIP_NFT_ADDRESS is a valid EVM address when required
  • Validate that CHAIN_ID is a valid number
  • Add a helper such as getContractAddresses()
  • Avoid silently returning an empty contract address in production
  • Add tests for valid and invalid environment values
  • Document the expected contract environment variables

Acceptance criteria

  • Invalid contract configuration returns a clear error
  • Production usage cannot silently proceed with an empty contract address
  • Contract configuration validation is tested

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions