Skip to content

test: drop hardhat and waffle in favour of plain ethers - #272

Open
rickstaa wants to merge 1 commit into
mainfrom
test/drop-hardhat
Open

test: drop hardhat and waffle in favour of plain ethers#272
rickstaa wants to merge 1 commit into
mainfrom
test/drop-hardhat

Conversation

@rickstaa

@rickstaa rickstaa commented Sep 9, 2026

Copy link
Copy Markdown
Member

The test harness only used hardhat as an RPC provider, a source of signers and a mocha launcher, and waffle for two event assertions. This replaces them with an ethers JsonRpcProvider, a small expectEvent helper that parses receipt logs, native fetch in place of apollo-fetch, and mocha run directly with ts-node. hardhat.config.ts is gone and tsconfig.hardhat.json becomes tsconfig.test.json.

That removes hardhat, both @nomiclabs plugins, ethereum-waffle, apollo-fetch and solc, and with them request, node-fetch 1.x, tough-cookie, json-schema and the old mocha pins. Ten resolutions in #269 go with them, and the five remaining alerts from those packages clear. Staying on ethers v5 keeps typechain and the existing test idioms untouched; ethers v6 is a separate follow-up.

Two fixes surfaced while doing this. The block listener in mineBlocks was never removed, so the provider polled forever and the suite hung after printing its summary; it is now removed once mining completes. The ticket redemption test is skipped with a pointer to #267, and its ticket hash and signing are corrected so it is ready to re-enable once that is understood.

yarn test now exits 0 for the first time: subgraph does not fail passes, 24 pending, none failing. Closes #268.

The harness only used hardhat as an RPC provider, a source of signers and
a mocha launcher, and waffle for two event assertions. Replacing them with
a JsonRpcProvider, an expectEvent helper and mocha run directly removes
hardhat, ethereum-waffle, solc and apollo-fetch, and with them request,
node-fetch 1.x, tough-cookie and json-schema.

The block listener in mineBlocks is now removed once mining completes,
so the suite exits instead of polling forever.
Copilot AI lite review requested due to automatic review settings September 9, 2026 10:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

🚀 Subgraph Studio preview deployed

Item Details
Version label pr-272-f0022fb-34342938562
Query endpoint https://api.studio.thegraph.com/query/31909/livepeer-ci/pr-272-f0022fb-34342938562
curl -H 'Content-Type: application/json' \
  -d '{"query":"{ protocol(id: \"0\") { inflation } }"}' \
  https://api.studio.thegraph.com/query/31909/livepeer-ci/pr-272-f0022fb-34342938562

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace the hardhat test harness with plain ethers and mocha

2 participants