Smart-contract factory for the paycodex and paycodex-onchain knowledge graphs.
Hardhat 2 - TypeScript - Solidity 0.8.20 - OpenZeppelin 5.x - ethers v6
flowchart LR
KG1[paycodex KG<br/>incumbent rails] -->|references| Factory
KG2[paycodex-onchain KG<br/>EVM patterns] -->|sources snippets| Factory[paycodex-factory<br/>Hardhat]
Factory -->|compile + test + gas| CI[GitHub Actions CI]
CI -->|RESULTS.md feedback| KG2
Factory -->|deploy| Networks[hardhat / sepolia / base]
The factory is the executable companion to the documentation graphs.
git clone https://github.com/lopezpalacios/paycodex-factory
cd paycodex-factory
npm install
npm run compile
npm test
npm run test:gaspaycodex-factory/
├── contracts/ demo snippets + mocks/
├── test/ TypeScript tests
├── scripts/ deploy scripts
├── .github/workflows/ CI
├── hardhat.config.ts
├── package.json
└── RESULTS.md test + gas + coverage outputs
See RESULTS.md - populated by CI.
npm install
npm run compile
npm test
npm run test:gas
npm run coveragenpm run lint # solhint + prettier check
npm run format # prettier write
npm run lint:fix # solhint --fix
npm run analyze # slither (requires Python + slither-analyzer)flowchart LR
PR[Pull Request] --> Lint[CI: Lint<br/>solhint + prettier]
Lint --> Test[CI: Test<br/>compile + 26 unit tests + coverage]
Test --> Gas[CI: Gas report<br/>diff vs main]
Test --> Slither[CI: Slither<br/>static analysis]
Slither --> Merge{Approve}
Gas --> Merge
Merge -->|merged to main| Tag[Manual: tag release]
Tag -->|workflow_dispatch| Deploy[Deploy: Sepolia/Base/Hardhat]
husky + lint-staged run solhint + prettier on staged files. Bypass with --no-verify for emergency only.
- Require PR + 1 approval before merge to
main - Require status checks: lint, test, slither
- Dismiss stale reviews on push
- Require linear history (no merge commits)
MIT - see LICENSE.