diff --git a/CHANGELOG.md b/CHANGELOG.md index 851aa033..ce48da8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/packages/faucet/README.md b/packages/faucet/README.md index a76e48b9..1d4785fb 100644 --- a/packages/faucet/README.md +++ b/packages/faucet/README.md @@ -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 diff --git a/packages/faucet/src/actions/generate.ts b/packages/faucet/src/actions/generate.ts index ad876dae..a7720b75 100644 --- a/packages/faucet/src/actions/generate.ts +++ b/packages/faucet/src/actions/generate.ts @@ -4,17 +4,15 @@ import * as constants from "../constants"; import { createWallets } from "../profile"; export async function generate(args: readonly string[]): Promise { - 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); } diff --git a/packages/faucet/src/actions/help.ts b/packages/faucet/src/actions/help.ts index cf51b66f..1e602b6a 100644 --- a/packages/faucet/src/actions/help.ts +++ b/packages/faucet/src/actions/help.ts @@ -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