Skip to content

Commit 1aad5ae

Browse files
committed
feat: enable secure accounts by default
Signed-off-by: Tomás Migone <[email protected]>
1 parent e269fb7 commit 1aad5ae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

gre/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,17 @@ It's important to note that the deployer is not a named account as it's derived
226226

227227
#### Integration with hardhat-secure-accounts
228228

229-
[hardhat-secure-accounts](https://www.npmjs.com/package/hardhat-secure-accounts) is a hardhat plugin that allows you to use encrypted keystore files to store your private keys. GRE has built-in support to use this plugin, you just need to enable it when instantiating the GRE object using the `useSecureAccounts` option, then each time you call any of the account management methods you will be prompted for an account name and password to unlock:
229+
[hardhat-secure-accounts](https://www.npmjs.com/package/hardhat-secure-accounts) is a hardhat plugin that allows you to use encrypted keystore files to store your private keys. GRE has built-in support to use this plugin. By default is enabled but can be disabled by setting the `useSecureAccounts` option to `false` when instantiating the GRE object. When enabled, each time you call any of the account management methods you will be prompted for an account name and password to unlock:
230230

231231
```js
232232
// Without secure accounts
233-
> const graph = hre.graph()
233+
> const graph = hre.graph({ useSecureAccounts: false })
234234
> const deployer = await g.l1.getDeployer()
235235
> deployer.address
236236
'0xBc7f4d3a85B820fDB1058FD93073Eb6bc9AAF59b'
237237

238238
// With secure accounts
239-
> const graph = hre.graph({ useSecureAccounts: true })
239+
> const graph = hre.graph()
240240
> const deployer = await g.l1.getDeployer()
241241
== Using secure accounts, please unlock an account for L1(goerli)
242242
Available accounts: goerli-deployer, arbitrum-goerli-deployer, rinkeby-deployer, test-mnemonic

gre/gre.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ extendEnvironment((hre: HardhatRuntimeEnvironment) => {
4545
logDebug('*** Initializing Graph Runtime Environment (GRE) ***')
4646
logDebug(`Main network: ${hre.network.name}`)
4747

48-
const secureAccounts = opts.useSecureAccounts ?? false
48+
const secureAccounts = opts.useSecureAccounts ?? true
4949
logDebug(`Secure accounts: ${secureAccounts ? 'enabled' : 'disabled'}`)
5050

5151
const { l1ChainId, l2ChainId, isHHL1 } = getChains(hre.network.config.chainId)

0 commit comments

Comments
 (0)