contracts
contracts copied to clipboard
Refactor setupNetworkProviders as it affects when forking a chain
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.
The address book also gets in the way of having a proper env when forking