Minimal example to reproduce Hardhat bug report

Initial setup:

  1. Install dependencies: yarn
  2. Create a .env file with content: RPC=https://<URL_TO_YOUR_RPC

Run

yarn hardhat test