Ropsten Ethereum Faucet: JSON Web Service

Jackson Ng
Coinmonks

--

This series of tutorial documents my process of building an Ethereum faucet on the Ropsten Testnet. This is the 3rd article of the series and it explains the codes behind the JSON Web Service. The JSON Web Service performs the role of dishing out free ETH when the requester provides his Ethereum wallet address and the number of ETHs he wishes to receive.

  1. Ropsten Ethereum Faucet: How it works
  2. Ropsten Ethereum Faucet: Smart Contract
  3. Ropsten Ethereum Faucet: JSON Web Service
  4. Ropsten Ethereum Faucet: Web App

The source codes for this project are in the project’s Github repository and the faucet smart contract is accessible here.

Photo by Talal Ahmad on Unsplash

Why Node?

When building DApps, a developer would likely adopt the typical architecture where a DApp built with the Web3 library will interact with a Solidity Smart Contract on the Blockchain. So why is my faucet developed with NodeJS? I decided against the DApp architecture because users who wanted ETHs would likely not have any to begin with. To ask a user who needs ETHs to connect his ETH wallet (such as MetaMask) to a DApp to make a ETH request isn’t so logical since he needs ETHs to spend on gas to begin with!.

--

--