Skip to content

Add a single-source-of-truth errors.rs shared across crates #103

Description

@ibrahimmosouf-png

Add a single-source-of-truth errors.rs shared across crates

Labels: architecture, dx, priority/medium
Difficulty: Medium · Effort: S
Backlog slot: 16

Problem Statement

There are three independent error enums:

  • orbitchain-campaign::Error (canonical, 80+ codes).
  • orbitchain-core::CoreError (legacy, ~12 codes).
  • Tooling-side anyhow::Error (CLI).
    No shared crate means new contributors cannot reuse an error concept across the workspace.

Why it Matters

  • Single source of truth = documentation, lint and migration story become tractable.

Expected Outcome

Move non-contract specific enum variants (e.g. Overflow, NotInitialized generalised names) to orbitchain-common::CommonError. Update campaign to import from there.

Acceptance Criteria

  • All shared errors live in common::CommonError.
  • No duplicate discriminants across crates.

Files Likely Affected

  • common/src/lib.rs
  • campaign/src/types.rs
  • crates/contracts/core/src/lib.rs

Dependencies

Issue #9.


Activity

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

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26architectureImported from .github/ISSUES_TO_CREATE.mddxImported from .github/ISSUES_TO_CREATE.mdpriority/mediumImported from .github/ISSUES_TO_CREATE.md

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions