| 123456789101112131415161718192021222324 |
- const ChainLib = require("../lib/chain-lib");
- const Web3Utils = require("../../utils/web3-utils");
- const WalletUtils = require("../lib/wallet-lib")
- const logger = require("../../utils/logger");
- const secretConfig = require("../../.secret-config.js")
- async function main() {
- const chain = await ChainLib.getChainFromCommand()
- const web3 = Web3Utils.autoCreate(chain)
- for (let index = 0; index < secretConfig.walletMax; index++) {
- const privateKey = await WalletUtils.readWallet(index)
- if (!privateKey) logger.info('cant find wallet in db, index:'.concat(index.toString()))
- const wallet = web3.eth.accounts.privateKeyToAccount(privateKey)
- logger.info(wallet.address, wallet.privateKey)
- }
- }
- main().catch((error) => {
- console.error(error);
- process.exitCode = 1;
- })
|