mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Add config variable FAUCET_MEMO
This commit is contained in:
parent
5218c1697f
commit
98e4c7b958
@ -3,6 +3,7 @@
|
||||
## 0.22.2 (2020-08-11)
|
||||
|
||||
- @cosmjs/faucet: Log errors for failed send transactions.
|
||||
- @cosmjs/faucet: Add config variable `FAUCET_MEMO`.
|
||||
|
||||
## 0.22.1 (2020-08-11)
|
||||
|
||||
|
@ -46,6 +46,7 @@ Environment variables
|
||||
|
||||
FAUCET_CONCURRENCY Number of distributor accounts. Defaults to 5.
|
||||
FAUCET_PORT Port of the webserver. Defaults to 8000.
|
||||
FAUCET_MEMO Memo for send transactions. Defaults to unset.
|
||||
FAUCET_MNEMONIC Secret mnemonic that serves as the base secret for the
|
||||
faucet HD accounts
|
||||
FAUCET_ADDRESS_PREFIX The bech32 address prefix. Defaults to "cosmos".
|
||||
|
@ -19,6 +19,7 @@ Environment variables
|
||||
|
||||
FAUCET_CONCURRENCY Number of distributor accounts. Defaults to 5.
|
||||
FAUCET_PORT Port of the webserver. Defaults to 8000.
|
||||
FAUCET_MEMO Memo for send transactions. Defaults to unset.
|
||||
FAUCET_MNEMONIC Secret mnemonic that serves as the base secret for the
|
||||
faucet HD accounts
|
||||
FAUCET_ADDRESS_PREFIX The bech32 address prefix. Defaults to "cosmos".
|
||||
|
@ -2,6 +2,7 @@ import { TokenConfiguration } from "./tokenmanager";
|
||||
import { parseBankTokens } from "./tokens";
|
||||
|
||||
export const binaryName = "cosmwasm-faucet";
|
||||
export const memo: string | undefined = process.env.FAUCET_MEMO;
|
||||
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;
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { CosmosClient, OfflineSigner, SigningCosmosClient, assertIsPostTxSuccess } from "@cosmjs/launchpad";
|
||||
import { assertIsPostTxSuccess, CosmosClient, OfflineSigner, SigningCosmosClient } from "@cosmjs/launchpad";
|
||||
import { sleep } from "@cosmjs/utils";
|
||||
|
||||
import * as constants from "./constants";
|
||||
import { debugAccount, logAccountsState, logSendJob } from "./debugging";
|
||||
import { createWallets } from "./profile";
|
||||
import { TokenConfiguration, TokenManager } from "./tokenmanager";
|
||||
@ -78,7 +79,7 @@ export class Faucet {
|
||||
* Throws an error if the transaction failed.
|
||||
*/
|
||||
public async send(job: SendJob): Promise<void> {
|
||||
const result = await this.clients[job.sender].sendTokens(job.recipient, [job.amount], "Make love, not war");
|
||||
const result = await this.clients[job.sender].sendTokens(job.recipient, [job.amount], constants.memo);
|
||||
assertIsPostTxSuccess(result);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user