Skip to content

Expose default publicClient in hardhat-viem#6268

Closed
schaable wants to merge 11 commits intov-nextfrom
viem-public-client
Closed

Expose default publicClient in hardhat-viem#6268
schaable wants to merge 11 commits intov-nextfrom
viem-public-client

Conversation

@schaable
Copy link
Member

This PR should not be merged yet as there is a concurrency issue when deploying multiple contracts using the same public client. The issue occurs randomly and causes a timeout.

An example can be found in v-next/hardhat-viem/test/contracts.ts in the test case: 'should be able to deploy a contract with both normal and constructor libraries linked'.

@schaable schaable added the v-next A Hardhat v3 development task label Feb 12, 2025
@schaable schaable requested a review from alcuadrado February 12, 2025 18:10
@schaable schaable self-assigned this Feb 12, 2025
@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2025

⚠️ No Changeset found

Latest commit: 749d356

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Feb 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2025 6:22pm

@schaable
Copy link
Member Author

schaable commented Jul 8, 2025

I can confirm the hanging test is still happening. I believe it’s a concurrency issue, since it seems to go away if the libraries are deployed one after the other. That said, I wasn’t able to identify the root cause. The test hangs but eventually passes, so we don’t get any actual error. I added some logging, and everything looks normal compared to runs with different public clients.
I’m going to close this for now and we can revisit it in the future if needed.

@schaable schaable closed this Jul 8, 2025
@github-project-automation github-project-automation bot moved this from Backlog to Done in Hardhat Jul 8, 2025
@schaable schaable deleted the viem-public-client branch September 1, 2025 15:49
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

v-next A Hardhat v3 development task

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants