Remove broken chain ID from cosmwasm-faucet generate

This commit is contained in:
Simon Warta 2020-08-11 08:38:23 +02:00
parent 0c88e88290
commit 3e9ae72190
4 changed files with 5 additions and 8 deletions

View File

@ -3,6 +3,7 @@
## 0.22.1 (unreleased)
- @cosmjs/faucet: Add config variable `FAUCET_ADDRESS_PREFIX`.
- @cosmjs/faucet: Remove broken chain ID from `cosmwasm-faucet generate`.
## 0.22.0 (2020-08-03)

View File

@ -38,7 +38,6 @@ help Shows a help text and exits
version Prints the version and exits
generate Generates a random mnemonic, shows derived faucet addresses and exits
1 Chain ID
start Starts the faucet
1 Node base URL, e.g. http://localhost:1317

View File

@ -4,17 +4,15 @@ import * as constants from "../constants";
import { createWallets } from "../profile";
export async function generate(args: readonly string[]): Promise<void> {
if (args.length < 1) {
throw Error(
`Not enough arguments for action 'generate'. See '${constants.binaryName} help' or README for arguments.`,
if (args.length > 0) {
console.warn(
`Warning: ${constants.binaryName} generate does not require positional arguments anymore. Use env variables FAUCET_ADDRESS_PREFIX or FAUCET_CONCURRENCY to configure how accounts are created.`,
);
}
const chainId = args[0];
const mnemonic = Bip39.encode(Random.getBytes(16)).toString();
console.info(`FAUCET_MNEMONIC="${mnemonic}"`);
// Log the addresses
await createWallets(mnemonic, chainId, constants.concurrency, true);
await createWallets(mnemonic, constants.addressPrefix, constants.concurrency, true);
}

View File

@ -11,7 +11,6 @@ help Shows a help text and exits
version Prints the version and exits
generate Generates a random mnemonic, shows derived faucet addresses and exits
1 Chain ID
start Starts the faucet
1 Node base URL, e.g. http://localhost:1317