commit
669c5886cb
@ -19,5 +19,5 @@ WORKDIR /run_repo_root
|
||||
RUN yarn install --frozen-lockfile --production
|
||||
|
||||
EXPOSE 8000
|
||||
ENTRYPOINT ["/run_repo_root/packages/faucet/bin/cosm-faucet"]
|
||||
ENTRYPOINT ["/run_repo_root/packages/faucet/bin/cosmwasm-faucet"]
|
||||
CMD [""]
|
||||
|
||||
@ -21,13 +21,13 @@ FAUCET_CREDIT_AMOUNT_COSM=10 \
|
||||
FAUCET_CREDIT_AMOUNT_STAKE=5 \
|
||||
FAUCET_CONCURRENCY=3 \
|
||||
FAUCET_MNEMONIC="economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone" \
|
||||
./bin/cosm-faucet start cosmwasm "http://localhost:1317"
|
||||
./bin/cosmwasm-faucet start cosmwasm "http://localhost:1317"
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
sage: cosmwasm-faucet action [arguments...]
|
||||
Usage: cosmwasm-faucet action [arguments...]
|
||||
|
||||
Positional arguments per action are listed below. Arguments in parentheses are optional.
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"scripts": {
|
||||
"dev-start": "FAUCET_CREDIT_AMOUNT_COSM=10 FAUCET_CREDIT_AMOUNT_STAKE=5 FAUCET_CONCURRENCY=3 FAUCET_MNEMONIC=\"economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone\" ./bin/cosm-faucet start cosmwasm \"http://localhost:1317\"",
|
||||
"dev-start": "FAUCET_CREDIT_AMOUNT_COSM=10 FAUCET_CREDIT_AMOUNT_STAKE=5 FAUCET_CONCURRENCY=3 FAUCET_MNEMONIC=\"economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone\" ./bin/cosmwasm-faucet start cosmwasm \"http://localhost:1317\"",
|
||||
"docs": "shx rm -rf docs && typedoc --options typedoc.js",
|
||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\" && tslint -t verbose --project .",
|
||||
|
||||
@ -3,11 +3,14 @@ import { Bip39, Random } from "@iov/crypto";
|
||||
import { UserProfile } from "@iov/keycontrol";
|
||||
|
||||
import { codecFromString } from "../codec";
|
||||
import * as constants from "../constants";
|
||||
import { setSecretAndCreateIdentities } from "../profile";
|
||||
|
||||
export async function generate(args: ReadonlyArray<string>): Promise<void> {
|
||||
if (args.length < 2) {
|
||||
throw Error(`Not enough arguments for action 'generate'. See 'iov-faucet help' or README for arguments.`);
|
||||
throw Error(
|
||||
`Not enough arguments for action 'generate'. See '${constants.binaryName} help' or README for arguments.`,
|
||||
);
|
||||
}
|
||||
const codecName = codecFromString(args[0]);
|
||||
const chainId = args[1] as ChainId;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
const binaryName = "cosmwasm-faucet";
|
||||
import { binaryName } from "../constants";
|
||||
|
||||
export function help(): void {
|
||||
const out = `
|
||||
|
||||
@ -36,7 +36,9 @@ function getCount(): number {
|
||||
|
||||
export async function start(args: ReadonlyArray<string>): Promise<void> {
|
||||
if (args.length < 2) {
|
||||
throw Error(`Not enough arguments for action 'start'. See 'iov-faucet help' or README for arguments.`);
|
||||
throw Error(
|
||||
`Not enough arguments for action 'start'. See '${constants.binaryName} help' or README for arguments.`,
|
||||
);
|
||||
}
|
||||
const codec = codecFromString(args[0]);
|
||||
const blockchainBaseUrl: string = args[1];
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
export const binaryName = "cosmwasm-faucet";
|
||||
export const concurrency: number = Number.parseInt(process.env.FAUCET_CONCURRENCY || "", 10) || 5;
|
||||
export const port: number = Number.parseInt(process.env.FAUCET_PORT || "", 10) || 8000;
|
||||
export const mnemonic: string | undefined = process.env.FAUCET_MNEMONIC;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user