Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
everyone gets some eth
const oneEth = ethers.utils.parseEther("1.0");
const ethForAll = async (accounts) => {
await accounts.forEach(async account => {
const balance = await provider.getBalance(account);
//under 1 gets 1
if (balance.lt(oneEth)) {
const sendTx = await oprahSigner.sendTransaction({ to: account, value: oneEth})
assert.isNotNull(sendTx)
}
})
}
await ethForAll(accounts);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment