Smart contracts for the IDBlock platform, with Hardhat for compilation, deployment, and testing.
- Node.js 18+
- npm
npm install| Command | Description |
|---|---|
npx hardhat compile |
Compile all contracts in ./contracts |
npx hardhat test |
Run the test suite |
npm run deploy |
Deploy the full contract set to the default network (Hardhat in-process) |
npm run deploy:local |
Deploy to a local node at http://127.0.0.1:8545 |
contracts/ Solidity sources (production + testonly helpers)
scripts/deploy.ts Full deployment script
test/ Mocha/Chai tests and shared deploy helpers
artifacts/ Compiled output (generated)
typechain-types/ TypeScript bindings (generated)
Upgradeable contracts use UUPS proxies (ERC1967Proxy). Core auth contracts resolve a circular dependency by deploying proxies first, then calling RoleControl.initialize followed by UpgradeControl.initialize. Remaining contracts are deployed and initialized in dependency order; see test/helpers/deploy.ts and scripts/deploy.ts.
Configure additional networks in hardhat.config.ts and optional .env (see .env.example).