contracts icon indicating copy to clipboard operation
contracts copied to clipboard

Refactor setupNetworkProviders as it affects when forking a chain

Open abarmat opened this issue 3 years ago • 2 comments
trafficstars

function setupNetworkProviders(hardhatConfig) {
  for (const netConfig of networkConfigs) {
    hardhatConfig.networks[netConfig.network] = {
      chainId: netConfig.chainId,
      url: netConfig.url ? netConfig.url : getDefaultProviderURL(netConfig.network),
      gas: netConfig.gas || 'auto',
      gasPrice: netConfig.gasPrice || 'auto',
      accounts: {
        mnemonic: getAccountMnemonic(),
      },
    }
  }
}

The accounts entry affects how hardhat verifies that a sending account is a hosted private key.

abarmat avatar Jul 20 '22 00:07 abarmat

The address book also gets in the way of having a proper env when forking

abarmat avatar Jul 20 '22 01:07 abarmat