Skip to content

Commit

Permalink
++ scripts/accounts.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mshakeg committed Sep 13, 2023
1 parent 4f9c2eb commit 8dfad2f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
"task:deployGreeter": "hardhat task:deployGreeter",
"task:setGreeting": "hardhat task:setGreeting",
"test": "hardhat test",
"typechain": "cross-env TS_NODE_TRANSPILE_ONLY=true hardhat typechain"
"typechain": "cross-env TS_NODE_TRANSPILE_ONLY=true hardhat typechain",
"scripts:accounts:ts-node": "TS_NODE_FILES=true ts-node scripts/accounts.ts",
"scripts:accounts:hh": "hardhat run scripts/accounts.ts"
}
}
14 changes: 14 additions & 0 deletions scripts/accounts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { ethers } from 'hardhat';

async function main() {
const accounts = await ethers.getSigners();

for (const account of accounts) {
console.log(account.address);
}
}

main().catch((error) => {
console.error(error);
process.exitCode = 1;
});

0 comments on commit 8dfad2f

Please sign in to comment.