From 569b3c5b7f2c689cf6dd40a186fabbf8ff205a12 Mon Sep 17 00:00:00 2001 From: Ryan Ostrom Date: Fri, 15 Sep 2023 13:40:36 -0500 Subject: [PATCH] Refactor geth-dev-node accounts length --- scripts/test/geth-dev-fund.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/test/geth-dev-fund.ts b/scripts/test/geth-dev-fund.ts index ea25e449..7a693d50 100644 --- a/scripts/test/geth-dev-fund.ts +++ b/scripts/test/geth-dev-fund.ts @@ -1,14 +1,15 @@ import { ethers } from 'hardhat' +import { getAccounts } from '../utils/helpers' async function main() { - let accounts = 9 + const { accounts } = await getAccounts() let customHttpProvider = new ethers.providers.JsonRpcProvider(process.env.GETH_URL) let coinbase = await customHttpProvider.send('eth_coinbase', []) let coinbaseSigner = await customHttpProvider.getUncheckedSigner(coinbase) - for (let i = 0; i < accounts; i++) { + for (let i = 0; i < accounts.length; i++) { let signer = await ethers.provider.getSigner(i) let balance = await signer.getBalance()