Skip to content

Update nori_aligned_bridge to consume NoriTokenBridge ABI from released ETH contracts package #8

Description

@Kirol54

Description

Following the re-release of the ETH contract package (with updated NoriTokenBridge.sol + published ABI), update the Rust nori_aligned_bridge repo to stop using the local abi/ folder and instead pull the ABI from the published package.

Goal: make this a drop-in replacement for the current abi/ usage with no breaking changes to the rest of the Rust repo.

Requirements

  • Add an npm-based fetch/import step to obtain the released contracts package artifact (ABI).

  • Replace current abi/ folder usage with ABI sourced from the installed package.

  • Keep the Rust-side ABI access path stable (so existing code changes are minimal):

    • Ideally the Rust code still refers to the same ABI filename(s) or a wrapper provides the same interface.
  • Refactor any Rust code that loads/parses the ABI to point at the new location.

  • Ensure build/test flow works locally

Suggested Implementation

  • Add a package.json + npm install step:

    • Depend on the released ETH contracts package (pinned version).
  • Add a small script (Node or shell) invoked by Cargo build/test that:

    • Copies the ABI artifact from node_modules/<pkg>/... into a predictable location (e.g. ./abi/ or ./generated/abi/)
    • OR updates Rust to read directly from node_modules/... (less ideal for CI portability)
    • OR you decide on best approach

Tasks

  1. Add npm dependency

    • Add package.json / lockfile and dependency on the ETH contracts package version.
  2. Add ABI sync step

    • Create scripts/sync_abi.(js|sh) to copy NoriTokenBridge ABI into ./abi/ (or a new generated folder).
    • Wire into cargo build via build.rs, Makefile, or CI step.
  3. Rust refactor

    • Update ABI loading paths only (ideally centralized in one module).
    • Ensure generated bindings / ABI parsing still works.
  4. Cleanup

    • Remove committed ABI copies if feasible.

Acceptance Criteria

  • nori_aligned_bridge no longer relies on a manually maintained abi/ copy.
  • ABI is sourced from the published NoriSDK contracts package (pinned version).
  • Minimal code changes; no breaking changes to public Rust APIs.
  • Repo builds pass locally

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions