Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Dashboard documentation could use a note about timeout: 0 for Hardhat projects #1413

Open
gnidan opened this issue Mar 22, 2023 · 1 comment

Comments

@gnidan
Copy link
Contributor

gnidan commented Mar 22, 2023

As surfaced in trufflesuite/truffle#5967, Hardhat defaults to a 40 second timeout for provider requests sent to localhost networks. This might not be enough time for users to carefully review their transaction.

Our Truffle Dashboard docs should include the suggestion to specify timeout: 0 inside their network configuration, since this will disable the timeout and give users as much time as they need.

Example hardhat.config.ts with timeout disabled
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";

const config: HardhatUserConfig = {
  networks: {
    "truffle-dashboard": {
      url: "http://localhost:24012/rpc",
      timeout: 0
    },

    // ... other networks
  },

  // ... rest of hardhat config ...
};

export default config;
@gnidan
Copy link
Contributor Author

gnidan commented Mar 23, 2023

Another option to explore is that maybe we can send a bunch of newlines at least once every <40s to "trick" Hardhat into not timing out. It's possible that HH will still timeout, but perhaps not likely. (@davidmurdoch thinks it's just an idle timeout)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant