Skip to content

Commit ce3ec16

Browse files
authored
Merge pull request #987 from graphprotocol/mde/data-edge-account-index
chore: add mnemonic initial index for data-edge hardhat config
2 parents 750522f + d0c1ea4 commit ce3ec16

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/data-edge/hardhat.config.ts

+6
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ function getAccountMnemonic() {
6161
return process.env.MNEMONIC || ''
6262
}
6363

64+
function getAccountIndex() {
65+
return process.env.ACCOUNT_INDEX ? parseInt(process.env.ACCOUNT_INDEX) : 0
66+
}
67+
6468
function getDefaultProviderURL(network: string) {
6569
return `https://${network}.infura.io/v3/${process.env.INFURA_KEY}`
6670
}
@@ -74,6 +78,8 @@ function setupDefaultNetworkProviders(buidlerConfig) {
7478
gasPrice: netConfig.gasPrice || 'auto',
7579
accounts: {
7680
mnemonic: getAccountMnemonic(),
81+
path: "m/44'/60'/0'/0",
82+
initialIndex: getAccountIndex(),
7783
},
7884
}
7985
}

0 commit comments

Comments
 (0)