infra-faucet/ansible/roles/faucet-api
Jakub Sokołowski 62c560f150
faucet-api: rafactor to use Docker Compose
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-03-25 14:02:56 +01:00
..
defaults faucet-api: rafactor to use Docker Compose 2021-03-25 14:02:56 +01:00
handlers rename faucet to faucet-api role 2019-05-28 08:20:37 -04:00
tasks faucet-api: rafactor to use Docker Compose 2021-03-25 14:02:56 +01:00
templates faucet-api: rafactor to use Docker Compose 2021-03-25 14:02:56 +01:00
README.md faucet-api: rafactor to use Docker Compose 2021-03-25 14:02:56 +01:00

README.md

Description

This role configures the faucet service which provides a REST API for receiving funds from our Ropsten and Rinkeby miner cluster.

Requirements

This role assumes it has a geth container with JSON RPC port open configured via Docker Compose.

Configuration

It makes sense to set the service name, it should match the Geth name:

faucet_service_name: 'ropsten-faucet'

The container needs know the Geth RPC port and account secret:

faucet_geth_rpc_port: 8545
faucet_account_pass: 'my-secret-pass'

In addition to that it needs a domain and network:

faucet_network: 'rinkeby-faucet.example.org'
faucet_domain: 'rinkeby'
faucet_cors_rule: '.*'

API

 > curl -s http://localhost:3001/ | jq .
{
  "message": "Status.im Ropsten Faucet",
  "methods": [
    "GET /",
    "POST /queue",
    "GET /donate/{address}",
    "GET /faucet-info"
  ]
}

Usage

To check sync state you can use the rpc.sh wrapper for calling JSON RPC API:

 > /docker/ropsten-faucet/rpc.sh eth_syncing
{
  currentBlock: 202432,
  highestBlock: 5120931,
  knownStates: 0,
  pulledStates: 0,
  startingBlock: 149504
}