Files
P2Pix-Front-End/package.json
Arthur Abeilice e7bf32b6c3 chore(codegen): restore minimal wagmi.config.ts (hardhat plugin)
Reverts wagmi.config.ts to the pre-existing simpler shape (hardhat
plugin auto-discovers artifacts) and drops our hand-rolled readFileSync
bootstrap. The plugin emits ABIs for every compiled contract; unused
ones are tree-shaken out of the production bundle, and the file itself
is gitignored so the extra bytes never hit the repo.

The plugin runs `npx hardhat compile` internally, which loads
hardhat.config.ts at import time and throws when ALCHEMY_API_KEY is
missing — env vars from our wrapper script don't propagate into the
plugin's subprocess. Fix: prewagmi:gen now bootstraps a placeholder
.env inside the submodule (gitignored there via *.env), instead of
running our own `hardhat compile` with inline env vars.

- wagmi.config.ts: hardhat({ project: 'p2pix-smart-contracts' }), no
  explicit contracts/loadAbi
- package.json: contracts:compile -> contracts:setup
  (bun install + create .env if absent); the wagmi hardhat plugin
  handles the actual compile
2026-06-02 01:41:01 +00:00

3.7 KiB