Skip to content

Instantly share code, notes, and snippets.

@ryo-takahashi
Created July 8, 2022 08:23
Show Gist options
  • Save ryo-takahashi/b962f5d947e206761459c51cc70d473c to your computer and use it in GitHub Desktop.
Save ryo-takahashi/b962f5d947e206761459c51cc70d473c to your computer and use it in GitHub Desktop.
大量にウォレットアドレス用意するマン
const ethers = require("ethers");
const fs = require("fs");
const createCount = 150;
let createdAddress = [];
for (let i = 0; i < createCount; i++) {
const wallet = new ethers.Wallet.createRandom();
createdAddress.push(wallet.address);
}
console.log(createdAddress);
try {
fs.writeFileSync("address.json", JSON.stringify(createdAddress));
console.log("write end");
} catch (e) {
console.log(e);
}
@ryo-takahashi
Copy link
Author

const createCount = 1000;

こうすると1000件作れます

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment