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
Tasks
-
Add npm dependency
- Add
package.json / lockfile and dependency on the ETH contracts package version.
-
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.
-
Rust refactor
- Update ABI loading paths only (ideally centralized in one module).
- Ensure generated bindings / ABI parsing still works.
-
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
Description
Following the re-release of the ETH contract package (with updated
NoriTokenBridge.sol+ published ABI), update the Rustnori_aligned_bridgerepo to stop using the localabi/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):
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:Add a small script (Node or shell) invoked by Cargo build/test that:
node_modules/<pkg>/...into a predictable location (e.g../abi/or./generated/abi/)node_modules/...(less ideal for CI portability)Tasks
Add npm dependency
package.json/ lockfile and dependency on the ETH contracts package version.Add ABI sync step
scripts/sync_abi.(js|sh)to copyNoriTokenBridgeABI into./abi/(or a new generated folder).cargo buildviabuild.rs,Makefile, or CI step.Rust refactor
Cleanup
Acceptance Criteria
nori_aligned_bridgeno longer relies on a manually maintainedabi/copy.