Skip to content

Add CONTRIBUTING guide section explaining how to add a new ContractError variant #639

Description

@Kingsman-99

Description

CONTRIBUTING.md does not explain how to add a new error variant to ContractError in contracts/split/src/error.rs. New contributors often append variants without checking the stability note ("Discriminants are stable — never reorder, only append"). A dedicated section in CONTRIBUTING.md would prevent breaking changes.

Acceptance Criteria

  • Add a "Adding a new ContractError variant" section to CONTRIBUTING.md
  • The section explains: always append (never reorder), discriminant assignment, updating docs
  • Include a minimal before/after code snippet showing the correct way to add a new variant
  • cargo test passes (no code changes, only docs)

Context

  • Target file: CONTRIBUTING.md
  • Reference: contracts/split/src/error.rs — stability comment on line 3

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 ptsdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions