I am gonna write smart contracts test on hardhat. By default, hardhat provides 20 signers with enough amount of ETH on it. But for my contracts, I will need 1000 signers and each signer should have some eth on it. How can I achieve this? I can create any amount of random wallets using ethers but am not sure how to send ether and use that random wallet.
In hardhat.config.js[ts], you could config accounts. Like this:
module.exports = {
...
networks: {
hardhat: {
accounts: [
privateKey0,
privateKey1,
privateKey2,
...
]
}
}
...
}
how to send ether: https://ethereum.org/en/developers/tutorials/send-token-etherjs/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.