Created
January 24, 2018 13:22
-
-
Save timelf123/37a14f37a91af302c18e6330aeb2045c to your computer and use it in GitHub Desktop.
Generate ETH address with 00 at the end.
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 Web3 = require('web3'); | |
const provider = new Web3.providers.HttpProvider('http://localhost:8549'); | |
const web3 = new Web3(provider); | |
let acc = web3.eth.accounts.create(); | |
let last = acc.address[acc.address.length-2]; | |
let last2 = acc.address.slice(acc.address.length - 2, acc.address.length ); | |
console.log(last2); | |
while(last2 != '00' ){ | |
acc = web3.eth.accounts.create(); | |
last = acc.address[acc.address.length-1]; | |
last2 = acc.address.slice(acc.address.length - 2, acc.address.length ); | |
// console.log(last2); | |
} | |
console.log(acc); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment