Created
May 19, 2022 18:34
-
-
Save maypo/83a233197e4964036c2ba5e049fe370f to your computer and use it in GitHub Desktop.
everyone gets some eth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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