Skip to main content

gnofaucet

gnofaucet is a server for distributing GNOT, the gas currency of Gnoland, to specific addresses in a local chain. Interact with the gnofaucet from an address with an empty balance in your locally built testnet to fuel it with GNOT to pay for transactions.

Run gnofaucet Commands

Enable the faucet using the following command.

gnofaucet serve

Options

NameTypeDescription
chain-idStringThe id of the chain (required).
gas-wantedInt64The maximum amount of gas to use for the transaction (default: 50000)
gas-feeStringThe gas fee to pay for the transaction.
memoStringAny descriptive text (default: "")
test-toStringTest address (optional)
sendStringCoins to send (default: "1000000ugnot").
captcha-secretStringThe secret key for the recaptcha. If empty, the captcha is disabled (default: "").
is-behind-proxyBooleanUses X-Forwarded-For IP for throttling (default: false).
insecure-password-stdinBooleanINSECURE! Takes password from stdin (default: false).

Example

Step 1. Create an account named test1 with the test seed phrase below.

gnokey add test1 --recover

Test Seed Phrase: source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast Test Private key: ea97b9fddb7e6bf6867090a7a819657047949fbb9466d617f940538efd888605

Step 2. Run gnofaucet

gnofaucet serve test1 --chain-id dev --send 500000000ugnot

Step 3. Receive GNOTs from the faucet

To receive funds through the gnoweb form GUI, you can request them on: http://localhost:8888/faucet (given http://localhost:8888/ is the location where gnoweb is serving pages).

Alternatively, you can request funds from the faucet by directly invoking a CURL command:

curl --location --request POST 'http://localhost:5050' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'toaddr={address to receive}'