Skip to content

Instantly share code, notes, and snippets.

@maypo
Created May 19, 2022 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maypo/83a233197e4964036c2ba5e049fe370f to your computer and use it in GitHub Desktop.
Save maypo/83a233197e4964036c2ba5e049fe370f to your computer and use it in GitHub Desktop.
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