- Notifications
You must be signed in to change notification settings - Fork42
tendermint/faucet
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A faucet that usescosmos-sdk executable binaries only.
The main purpose of thisfaucet
is to avoid using RPC or API endpoints, and use the CLI binary instead, morespecifically, the commands:
$ {app}d tx bank send
and:
$ {app}d query txs
Since the faucet only uses the CLI binary, it is compatible with practically any blockchain built withcosmos-sdk even if different types of keys are used (such as inethermint for example).
$ curl https://get.starport.network/faucet!| bash
Use docker imageghcr.io/tendermint/faucet
. You can use it in a Kubernetes pod withshareProcessNamespaceor mount the chain binary using docker:
$ docker run -it -v~/go/bin/gaiad:/usr/local/bin/gaiad ghcr.io/tendermint/faucet
You can build the faucet with:
$ make build
The executable binary will be avaialable in the./build/
directory. To install it to$GOPATH/bin
, use instead:
$ make install
You can configure the faucet either using command line flags or environment variables. The following tableshows the available configuration options and respective defaults:
flag | env | description | default |
---|---|---|---|
port | PORT | tcp port where faucet will be listening for requests | 8000 |
account-name | ACCOUNT_NAME | name of the account to be used by the faucet | faucet |
mnemonic | MNEMONIC | mnemonic for restoring an account | |
keyring-password | KEYRING_PASSWORD | password for accessing keyring | |
cli-name | DENOMS | denomination of the coins sent by default (comma separated) | uatom |
credit-amount | CREDIT_AMOUNT | amount to credit in each request | 10000000 |
max-credit | MAX_CREDIT | maximum credit per account | 100000000 |
sdk-version | SDK_VERSION | version of sdk (launchpad or stargate) | stargate |
node | NODE | address of tendermint RPC endpoint for this chain | |
keyring-backend | KEYRING_BACKEND | keyring backend to be used | |
legacy-send | LEGACY_SEND | whether to use legacy send command | false |
coin-type | COIN_TYPE | registered coin type number for HD derivation (BIP-0044) | 118 |
home | HOME | replaces the default home used by the chain | |
gaia example
This faucet options default to work withgaia. So you can start the faucet with just:
$ faucet --keyring-password 12345678INFO[0000] listening on :8000
or, with environment variables:
$export KEYRING_PASSWORD=12345678$ faucetINFO[0000] listening on :8000
ethermint example
Start the faucet with:
$ faucet --cli-name ethermintcli --denoms ueth --keyring-password 12345678 --sdk-version launchpadINFO[0000] listening on :8000
or, with environment variables:
$export CLI_NAME=ethermintcli$export SDK_VERSION=launchpad$export DENOMS=ueth$export KEYRING_PASSWORD=12345678$ faucetINFO[0000] listening on :8000
wasmd example
Start the faucet with:
$ faucet --cli-name wasmcli --denoms ucosm --keyring-password 12345678INFO[0000] listening on :8000
or, with environment variables:
$export CLI_NAME=wasmcli$export DENOMS=ucosm$export KEYRING_PASSWORD=12345678$ faucetINFO[0000] listening on :8000
You can request tokens by sending aPOST
request to the faucet, with a key address in aJSON
:
$ curl -X POST -d'{"address": "cosmos1kd63kkhtswlh5vcx5nd26fjmr9av74yd4sf8ve"}' http://localhost:8000{"transfers":[{"coin":"10000000uatom","status":"ok"}]}
For requesting specific coins, use:
$ curl -X POST -d'{"address": "cosmos1kd63kkhtswlh5vcx5nd26fjmr9av74yd4sf8ve", "coins": ["10uatom", "20ueth"]}' http://localhost:8000{"transfers":[{"coin":"10uatom","status":"ok"}, {"coin":"20ueth","status":"ok"}]}
About
A faucet for cosmos-sdk apps that uses the app binary only
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.