Skip to content
This repository was archived by the owner on Aug 4, 2026. It is now read-only.

Repository files navigation

NXP Contracts

NXP smart contract monorepo.

Requirements

  • Node.js >= 18

Getting Started

npm install
npm run build

Scripts

Command Description
npm run build Build all
npm run test Run tests
npm run lint Lint
npm run coverage Coverage
npm run format Format code

⚠️ Compile Job Concurrency

This project uses many compiler versions and per-file settings overrides, so Hardhat runs multiple compile jobs (currently 9) in parallel. However, the @openzeppelin/hardhat-upgrades plugin locks cache/validations.json with proper-lockfile using retries=0, so when the jobs finish almost simultaneously a lock race raises ELOCKED and breaks the compilation midway. If tests then run in this state, some contract artifacts are missing and hundreds of tests can fail (❌ N test(s) failed under coverage).

To prevent this race, scripts/config-exclude-contracts.ts intercepts the TASK_COMPILE_SOLIDITY_COMPILE_JOBS subtask and forces the default concurrency to 1. It is applied automatically to every Hardhat task (compile / test / coverage / run / console, etc.), so it behaves the same whether you use npm run or invoke npx hardhat directly.

# All equally safe (concurrency=1 applied automatically)
npm run build
npm run coverage
npx hardhat compile
npx hardhat coverage
npx hardhat run scripts/foo.ts

The tradeoff is that build time roughly doubles (1 min → 2 min).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages