aboutsummaryrefslogtreecommitdiffstats
path: root/packages/testnet-faucets/README.md
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-01-30 21:00:35 +0800
committerFabio Berger <me@fabioberger.com>2018-01-30 21:00:35 +0800
commit69151c06e42fd588506db3aa62b95df5b4399607 (patch)
tree878532483594627a5283f784ced0a2c0cfc68d59 /packages/testnet-faucets/README.md
parent86cc011212088801a778d947ae925cc0b1ddadf8 (diff)
parent2e3c02887efc24de35ce82b3662d9c47a0056a8c (diff)
downloaddexon-sol-tools-69151c06e42fd588506db3aa62b95df5b4399607.tar
dexon-sol-tools-69151c06e42fd588506db3aa62b95df5b4399607.tar.gz
dexon-sol-tools-69151c06e42fd588506db3aa62b95df5b4399607.tar.bz2
dexon-sol-tools-69151c06e42fd588506db3aa62b95df5b4399607.tar.lz
dexon-sol-tools-69151c06e42fd588506db3aa62b95df5b4399607.tar.xz
dexon-sol-tools-69151c06e42fd588506db3aa62b95df5b4399607.tar.zst
dexon-sol-tools-69151c06e42fd588506db3aa62b95df5b4399607.zip
Merge branch 'development' into feature/portal-ledger-support
* development: Publish Add PR number Add config file specifically in prettier command and fix files Fix prettier Fix prettier Add shouldAddPersonalMessagePrefix param to signOrderHashAsync instead of trying to infer whether to add it or not from the nodeVersion Publish Move @0xproject/types to dependencies Updated web3-typescript-typings changelog Fixed getTransactionReceipt not returning null Run prettier Update changelog Add Rinkeby addresses to artifacts Fix bad merge on package.json Respond to GH comments and add /info endpoint Change package name to @0xproject/testnet-faucets Implement testnet faucets for any testnet available via infura Rename to testnet-faucets Add to the Pull Request Template Create an ISSUE TEMPLATE
Diffstat (limited to 'packages/testnet-faucets/README.md')
-rw-r--r--packages/testnet-faucets/README.md129
1 files changed, 129 insertions, 0 deletions
diff --git a/packages/testnet-faucets/README.md b/packages/testnet-faucets/README.md
new file mode 100644
index 000000000..a52d16a00
--- /dev/null
+++ b/packages/testnet-faucets/README.md
@@ -0,0 +1,129 @@
+## @0xproject/testnet-faucets
+
+This faucet dispenses 0.1 test ether to one recipient per second and 0.1 test ZRX every 5 seconds. It has a max queue size of 1000.
+
+## Installation
+
+This is a private package and therefore is not published to npm. In order to build and run this package locally, see the [Install Dependencies](#Install-Dependencies) section and onwards below.
+
+## Contributing
+
+We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.
+
+Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
+
+### Install Dependencies
+
+If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
+
+```bash
+yarn config set workspaces-experimental true
+```
+
+Then install dependencies
+
+```bash
+yarn install
+```
+
+### Start
+
+Set the following environment variables:
+
+```bash
+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}
+```
+
+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`.
+
+```bash
+yarn dev
+```
+
+### Endpoints
+
+`GET /ping`
+
+Returns `pong`
+
+`GET /info`
+
+Returns a JSON payload describing the state of the queues for each network. For example:
+
+```json
+{
+ "3": {
+ "ether": {
+ "full": false,
+ "size": 4
+ },
+ "zrx": {
+ "full": false,
+ "size": 6
+ }
+ },
+ "42": {
+ "ether": {
+ "full": false,
+ "size": 8
+ },
+ "zrx": {
+ "full": false,
+ "size": 20
+ }
+ }
+}
+```
+
+`GET /ether/:recipient`
+
+Where recipient is a hex encoded Ethereum address prefixed with `0x`.
+
+`GET /zrx/:recipient`
+
+Where recipient is a hex encoded Ethereum address prefixed with `0x`.
+
+#### Parameters
+
+The endpoints `/ether` and `/zrx` 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
+
+```
+docker run -d \
+-p 80:3000 \
+--name testnet-faucets \
+--log-opt max-size=100m \
+--log-opt max-file=20 \
+-e DISPENSER_ADDRESS=$DISPENSER_ADDRESS \
+-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
+```
+
+### Lint
+
+```bash
+yarn lint
+```