I have a mnemonic in my .env
.
I added it to my hardhat.config.js
as such:
accounts: {
mnemonic: process.env.MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
passphrase: "",
}
However, all my contracts are still being deployed by the 1st signer in getSigners()
.
Questions:
- How do I deploy all my contracts from the 1st address generated by my mnemonic (without having to write
.connect()
for each ContractFactory)? Essentially, how do I change the default signer? - How do I get multiple signers from my one mnemonic?