aboutsummaryrefslogtreecommitdiffstats
path: root/packages/testnet-faucets/README.md
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-01-24 08:56:16 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-01-24 09:42:35 +0800
commit3998b47d848d4b74d6db45d375420fe2cfcf1926 (patch)
treebf465c54ef4ff72e3e8853fc6c2c895eac347734 /packages/testnet-faucets/README.md
parentd965fdb11dfba5631c1f98ad3e309876c199999a (diff)
downloaddexon-sol-tools-3998b47d848d4b74d6db45d375420fe2cfcf1926.tar.gz
dexon-sol-tools-3998b47d848d4b74d6db45d375420fe2cfcf1926.tar.zst
dexon-sol-tools-3998b47d848d4b74d6db45d375420fe2cfcf1926.zip
Implement testnet faucets for any testnet available via infura
Diffstat (limited to 'packages/testnet-faucets/README.md')
-rw-r--r--packages/testnet-faucets/README.md26
1 files changed, 22 insertions, 4 deletions
diff --git a/packages/testnet-faucets/README.md b/packages/testnet-faucets/README.md
index 504eacedc..e1d34fd58 100644
--- a/packages/testnet-faucets/README.md
+++ b/packages/testnet-faucets/README.md
@@ -31,14 +31,19 @@ yarn install
Set the following environment variables:
```bash
-export FAUCET_ENVIRONMENT=development
export DISPENSER_ADDRESS=0x5409ed021d9299bf6814279a6a1411a7e866a631
export DISPENSER_PRIVATE_KEY=f2f48ee19680706196e2e339e5da3491186e0c4c5030670656b0e0164837257d
export FAUCET_ROLLBAR_ACCESS_KEY={GET_THIS_FROM_ROLLBAR_ACCOUNT_SETTINGS}
export INFURA_API_KEY={GET_THIS_FROM_INFURA}
```
-Infura API Key can be requested here: https://infura.io/register.html
+If you want to talk to testrpc, set the following environment variable:
+
+```bash
+export FAUCET_ENVIRONMENT=development
+```
+
+Infura API Key can be requested here: https://infura.io/signup
Note: The above public/private keys exist when running `testrpc` with the following option `--mnemonic concert load couple harbor equip island argue ramp clarify fence smart topic`.
@@ -50,11 +55,23 @@ yarn dev
`GET /ether/:recipient`
-Where recipient_address is a hex encoded Ethereum address prefixed with `0x`.
+Where recipient is a hex encoded Ethereum address prefixed with `0x`.
`GET /zrx/:recipient`
-Where recipient_address is a hex encoded Ethereum address prefixed with `0x`.
+Where recipient is a hex encoded Ethereum address prefixed with `0x`.
+
+#### Parameters
+
+Both endpoints take a query parameter named `networkId` to specify the desired network where you would like to receive the ETH or ZRX. For example:
+
+```bash
+curl -i http://localhost:3000/ether/0x14e2F1F157E7DD4057D02817436D628A37120FD1\?networkId=3
+```
+
+This command will request the local server to initiate a transfer of 0.1 ETH from the dispensing address to `0x14e2F1F157E7DD4057D02817436D628A37120FD1` on the Ropsten testnet.
+
+If no `networkId` is provided via query parameters the faucet will default to network 42 (Kovan)
### Docker configs
@@ -68,6 +85,7 @@ docker run -d \
-e DISPENSER_PRIVATE_KEY=$DISPENSER_PRIVATE_KEY \
-e FAUCET_ROLLBAR_ACCESS_KEY=$FAUCET_ROLLBAR_ACCESS_KEY \
-e FAUCET_ENVIRONMENT=production \
+-e INFURA_API_KEY=$INFURA_API_KEY \
testnet-faucets
```