Skip to content

No test keeps scripts/error-codes.mjs in sync with the contracts' error.rs enums #499

Closed

Description

@chonilius

Problem

The mapping is maintained by hand, and it has already drifted (missing ArithmeticOverflow and TooManyDeposits). Nothing in scripts/*.test.mjs or CI compares it with contracts/*/src/error.rs.

Suggested fix

Add a small test that parses each error.rs (Name = N, lines) and asserts the JS mapping matches exactly, or generate the JS file in make build.

Related: #124

Activity

  1. urielit1313-creator commented on Oct 14, 2026

    @urielit1313-creator

    Addressed in PR #630.

    Summary

    • Created scripts/error-codes.test.mjs using node:test and node:assert/strict which parses all three contracts/*/src/error.rs files directly and asserts complete bidirectional parity with errorMappings.
    • Synchronized scripts/error-codes.mjs mappings to include missing codes (ArithmeticOverflow and TooManyDeposits).
    • All 3 synchronization tests passing (node --test scripts/error-codes.test.mjs).

    Bounty Payout Address (Base USDC): 0xfE777c43e4B0A24fFA1527eD520d1E7f9ECED483

  2. Mhidesav commented on Oct 18, 2026

    @Mhidesav

    @Mhidesav has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi
    I would like to work on this issue please

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Mhidesav to this issue.

  3. oluwagbemigaphilip commented on Oct 18, 2026

    @oluwagbemigaphilip

    @oluwagbemigaphilip has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi, I’ve carefully reviewed the issue and understand the expected outcome. I have the relevant experience to implement the solution and would be glad to take it on. Please assign it to me.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @oluwagbemigaphilip to this issue.

  4. drips-wave commented on Oct 18, 2026

    @drips-wave

    Congratulations, @oluwagbemigaphilip! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @oluwagbemigaphilip: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  5. drips-wave commented on Oct 18, 2026

    @drips-wave

    This issue has been completed by @oluwagbemigaphilip as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @oluwagbemigaphilip: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

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

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programgood first issueGood for newcomerstestingTesting/QA infrastructure

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions