Skip to content

Commit 1869d06

Browse files
committed
feat: allow overriding localhost accounts
Signed-off-by: Tomás Migone <[email protected]>
1 parent 1f065e4 commit 1869d06

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

packages/hardhat-graph-protocol/src/sdk/hardhat.base.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ export const networksUserConfig: BaseNetworksUserConfig = {
6060
secureAccounts: {
6161
enabled: true,
6262
},
63+
...(vars.has('LOCALHOST_ACCOUNTS_MNEMONIC') && {
64+
accounts: { mnemonic: vars.get('LOCALHOST_ACCOUNTS_MNEMONIC') },
65+
}),
6366
deployments: {
6467
horizon: resolveLocalAddressBook('@graphprotocol/horizon/addresses.json'),
6568
subgraphService: resolveLocalAddressBook('@graphprotocol/subgraph-service/addresses.json'),

packages/horizon/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The following environment variables might be required:
1313
| `ARBITRUM_SEPOLIA_RPC` | Arbitrum Sepolia RPC URL - defaults to `https://sepolia-rollup.arbitrum.io/rpc` |
1414
| `LOCALHOST_RPC` | Localhost RPC URL - defaults to `http://localhost:8545` |
1515
| `LOCALHOST_CHAIN_ID` | Localhost chain ID - defaults to `31337` |
16+
| `LOCALHOST_ACCOUNTS_MNEMONIC` | Localhost accounts mnemonic - no default value. Note that setting this will override any secure accounts configuration. |
1617

1718
You can set them using Hardhat:
1819

packages/horizon/tasks/deploy.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ function _patchStepConfig<ChainId extends number, ContractName extends string, H
133133
subgraphServiceAddress: SubgraphService3.address,
134134
},
135135
})
136-
console.log(patchedConfig)
137136
break
138137
case 4:
139138
const HorizonStaking = horizonAddressBook.getEntry('HorizonStaking')

packages/subgraph-service/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ The following environment variables might be required:
1313
| `ARBITRUM_SEPOLIA_RPC` | Arbitrum Sepolia RPC URL - defaults to `https://sepolia-rollup.arbitrum.io/rpc` |
1414
| `LOCALHOST_RPC` | Localhost RPC URL - defaults to `http://localhost:8545` |
1515
| `LOCALHOST_CHAIN_ID` | Localhost chain ID - defaults to `31337` |
16+
| `LOCALHOST_ACCOUNTS_MNEMONIC` | Localhost accounts mnemonic - no default value. Note that setting this will override any secure accounts configuration. |
17+
1618
You can set them using Hardhat:
1719

1820
```bash

0 commit comments

Comments
 (0)