Tier: S (1-2 days) | Type: dx + docs
Context. Every Stellar contract with a rich contracterror enum (stealth-sender, stealth-registry, wraith-names, stealth-vault, stealth-splitter) assigns numeric codes independently. wraith-names uses codes 1 to 32 for its main enum and 100+ for AuctionError specifically to stay disjoint. There is no single-page catalog SDK authors can grep to map a returned code back to a source, so integration teams keep re-deriving it from Rust source. stealth-batch-sender and wraith-asset-policy are still panic-only today (issue #1 fixes batch-sender), so the catalog also serves as a coverage tracker.
Scope.
- New
stellar/ERRORS.md listing every code in every contract, one table per crate: Code | Name | Meaning | Introduced in.
- Cross-reference each row to the line in source where the variant is defined.
- Add a "Code allocation policy" section reserving disjoint ranges per contract to prevent future collisions.
- Add a CI check under
.github/workflows/ci.yml that greps contracterror enums in source and fails if any variant is missing from ERRORS.md.
Acceptance.
Files. stellar/ERRORS.md (new), .github/workflows/ci.yml, stellar/README.md, stellar/contracts/*/README.md, stellar/*/README.md.
Tier: S (1-2 days) | Type: dx + docs
Context. Every Stellar contract with a rich
contracterrorenum (stealth-sender,stealth-registry,wraith-names,stealth-vault,stealth-splitter) assigns numeric codes independently.wraith-namesuses codes 1 to 32 for its main enum and 100+ forAuctionErrorspecifically to stay disjoint. There is no single-page catalog SDK authors can grep to map a returned code back to a source, so integration teams keep re-deriving it from Rust source.stealth-batch-senderandwraith-asset-policyare still panic-only today (issue #1 fixes batch-sender), so the catalog also serves as a coverage tracker.Scope.
stellar/ERRORS.mdlisting every code in every contract, one table per crate:Code | Name | Meaning | Introduced in..github/workflows/ci.ymlthat grepscontracterrorenums in source and fails if any variant is missing fromERRORS.md.Acceptance.
contracterrorvariant across every crate is present instellar/ERRORS.mdstellar/README.mdand from each contract's READMEFiles.
stellar/ERRORS.md(new),.github/workflows/ci.yml,stellar/README.md,stellar/contracts/*/README.md,stellar/*/README.md.