Skip to content

test(scripts): add sync unit test for error-codes.mjs vs error.rs enums (#499) - #630

Open
urielit1313-creator wants to merge 1 commit into
MergeFi:mainfrom
urielit1313-creator:test/error-codes-sync-499
Open

urielit1313-creator wants to merge 1 commit into
MergeFi:mainfrom
urielit1313-creator:test/error-codes-sync-499

Conversation

@urielit1313-creator

Copy link
Copy Markdown

Summary of Changes

Closes #499

  1. Automated Error Synchronization Test:
    • Added scripts/error-codes.test.mjs using node:test and node:assert/strict.
    • Parses the Rust error enums across contracts/escrow/src/error.rs, contracts/milestones/src/error.rs, and contracts/maintenance-pool/src/error.rs and asserts exact parity with errorMappings.
  2. Synchronized Mappings in error-codes.mjs:
    • Updated error-codes.mjs with ArithmeticOverflow (21) for escrow/milestones and TooManyDeposits (15) / ArithmeticOverflow (16) for maintenance-pool.

Testing & Verification

  • node --test scripts/error-codes.test.mjs:
    • ✔ escrow errorMappings matches contracts/escrow/src/error.rs
    • ✔ milestones errorMappings matches contracts/milestones/src/error.rs
    • ✔ maintenancePool errorMappings matches contracts/maintenance-pool/src/error.rs
    • 3 passed, 0 failed.

Bounty Payout Address (Base USDC): 0xfE777c43e4B0A24fFA1527eD520d1E7f9ECED483

@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

@urielit1313-creator is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant