Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error HH108: Cannot connect to the network anvil #74

Open
gigamesh opened this issue Jun 30, 2022 · 0 comments
Open

Error HH108: Cannot connect to the network anvil #74

gigamesh opened this issue Jun 30, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@gigamesh
Copy link

I am importing hardhat-anvil, but the additional params (ex: launch) aren't recognized by typescript. It also is not using the accounts I specify (I've tried accounts: { mnemonic: ... } as well as the array of private keys).

image
image

Stripped-down version of my config:

import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-etherscan';
import '@nomiclabs/hardhat-solhint';
import '@nomiclabs/hardhat-waffle';
import '@openzeppelin/hardhat-upgrades';
import '@typechain/hardhat';
import '@foundry-rs/hardhat-anvil';
import 'hardhat-deploy';

import * as dotenv from 'dotenv';
import { HardhatUserConfig } from 'hardhat/config';

const config: HardhatUserConfig = {
  networks: {
    anvil: {
      url: 'http://localhost:8545',
      chainId: 1337,
      accounts: [process.env.ADMIN_PRIVATE_KEY!],
      launch: true,
    },
  },
};

export default config;

I can get it to connect if I start anvil in a separate terminal, but I still need to be able to deploy from the ADMIN_PRIVATE_KEY account. Any ideas?

@onbjerg onbjerg added the bug Something isn't working label Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants