Skip to content

Commit 48df657

Browse files
committed
config: add url option for custom Ethereum node
1 parent a6fc96f commit 48df657

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

hardhat.config.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import '@tenderly/hardhat-tenderly'
3030
interface NetworkConfig {
3131
network: string
3232
chainId: number
33+
url?: string
3334
gas?: number | 'auto'
3435
gasPrice?: number | 'auto'
3536
}
@@ -44,15 +45,15 @@ function getAccountMnemonic() {
4445
return process.env.MNEMONIC || ''
4546
}
4647

47-
function getInfuraProviderURL(network: string) {
48+
function getDefaultProviderURL(network: string) {
4849
return `https://${network}.infura.io/v3/${process.env.INFURA_KEY}`
4950
}
5051

5152
function setupNetworkProviders(hardhatConfig) {
5253
for (const netConfig of networkConfigs) {
5354
hardhatConfig.networks[netConfig.network] = {
5455
chainId: netConfig.chainId,
55-
url: getInfuraProviderURL(netConfig.network),
56+
url: netConfig.url ? netConfig.url : getDefaultProviderURL(netConfig.network),
5657
gas: netConfig.gas || 'auto',
5758
gasPrice: netConfig.gasPrice || 'auto',
5859
accounts: {
@@ -213,8 +214,8 @@ const config = {
213214
flat: true,
214215
},
215216
tenderly: {
216-
project: '',
217-
username: '',
217+
project: 'graph-network',
218+
username: 'abarmat',
218219
},
219220
contractSizer: {
220221
alphaSort: true,

0 commit comments

Comments
 (0)