Skip to content

feat(bridges): validate supported route metadata (#2624) - #3593

Open
Larslllllll wants to merge 1 commit into
Chain-Love:json-toolsfrom
Larslllllll:fix/dbip-2624-schema
Open

feat(bridges): validate supported route metadata (#2624)#3593
Larslllllll wants to merge 1 commit into
Chain-Love:json-toolsfrom
Larslllllll:fix/dbip-2624-schema

Conversation

@Larslllllll

Copy link
Copy Markdown

Summary

Adds the missing json-tools schema, metadata, and permanent validation support for approved DBIP #2624.

This recreates the CI prerequisite that was missing from closed data PR #2725. That PR was closed as stale because Generate JSON and validate could not accept supportedRoutes; it was not rejected on scope.

Changes

  • Add optional supportedRoutes to the bridge JSON Schema
  • Require sourceChain and destinationChain per route object
  • Support optional non-empty, unique assetSymbols
  • Reject extra route-object properties and exact duplicate objects
  • Add supportedRoutes UI column metadata
  • Add permanent validation for:
    • trimmed, non-blank endpoints
    • different source and destination
    • endpoint membership in populated supportedChains
    • trimmed, sorted, unique asset symbols
    • duplicate route objects
    • deterministic source/destination ordering

Compatibility

The property is initially not in the bridge required header list. This keeps current main valid until the coordinated CSV data PR adds the column. After this tools PR merges, the data PR can pass isolated CI rather than repeat #2725's ordering failure.

Validation

  • python3 -m py_compile tools/validate.py
  • JSON parsing for schema and metadata
  • Positive and negative route-rule fixtures
  • Direct Draft 2020-12 schema fixtures for valid shape, missing fields, extra fields, and empty assets
  • git diff --check
  • Confirmed no .pyc or __pycache__ artifacts

Economics

Payout

10 USDC to 0x06f44f4839fd5df4f4670036d028b29dec939363.

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.

1 participant