This series of tutorial documents my process of building an Ethereum faucet on the Ropsten Testnet. This is the 4th article of the series and it explains the codes behind the Faucet Web App. The Faucet Web App allows requesters to provide their Wallet address to let the faucet dish out free ETH to them.

  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.

Image for post
Image for post
Photo by Kirsten Marie Ebbesen on Unsplash

Not a DApp

By design, the Faucet Web App is not a Decentralized Application (DApp). It doesn’t connect directly to a Blockchain and it does not integrate with an Ethereum Wallet; rightly so because as I have explained in Part 1, ETH requesters who wants free ETH aren’t likely to already own ETHs in their wallet. …


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. …


Motivation

This series of tutorial documents my process of building an Ethereum faucet on the Ropsten Testnet. This is the 2nd article of the series and it explains how the Faucet Smart Contract works.

Image for post
Image for post
Photo by Zbysiu Rodak on Unsplash
  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.

Discover and review best Ethereum development tools

Setting up the Faucet Smart Contract

Image for post
Image for post

To compile the faucet smart contract, visit the Remix Ethereum IDE. …


This series of tutorial documents my process of building an Ethereum faucet on the Ropsten Testnet. The development of a faucet was borne out of necessity. In my regular engagements and workshops, I frequently give out ETHs to participants to let them try out stuff. But being new to these things, it isn’t so straightforward to simply transfer ETHs to them. And sometimes, the various Ropsten faucets out there don’t perform too reliably.

So I built my own faucet.

Image for post
Image for post
Photo by Kazuky Akayashi on Unsplash

This tutorial will be presented in 4 parts:

  1. Ropsten Ethereum Faucet: How it works
  2. Ropsten Ethereum Faucet: Smart Contract
  3. Ropsten Ethereum Faucet: JSON Web…


This is the last of the 5 articles I wrote to explain how an end-to-end Balloting system on Ethereum might work. In this segment, I will explain the codes behind the Voting module of the DApp.

Image for post
Image for post
Photo by Michael on Unsplash

1. Voting on a Blockchain: How it works
2. Voting on a Blockchain: Solidity Contract Codes explained
3. Voting on a Blockchain: DApp Demonstration
4. Voting on a Blockchain: Ballot Management DApp Code Walk-through
5. Voting on a Blockchain: Voting DApp Code Walk-through

In May, I was invited to give a talk about the role of Blockchain in Democratic societies to a group in Singapore known as the “Singapore Futurists”. I decided that rather than to just talk about it, perhaps I should demonstrate how voting on the Blockchain may work. The talk eventually turned into this series of articles and a live demo that I I use frequently in my Blockchain workshops. …


This is the 4th of 5 articles to explore the development of an end-to-end Balloting system on Ethereum. In this article, I will explain the codes behind the Ballot Management module of the DApp.

Image for post
Image for post
Photo by Jesse Collins on Unsplash

Do check back often as I work on the rest of the articles in this series.

1. Voting on a Blockchain: How it works
2. Voting on a Blockchain: Solidity Contract Codes explained
3. Voting on a Blockchain: DApp Demonstration
4. Voting on a Blockchain: Ballot Management DApp Code Walk-through
5. Voting on a Blockchain: Voting DApp Code Walk-through

Recap

The Ballot Management Module of the Ballot DApp lets the chairman set the proposal, setup the voting register, open/close the ballot and monitor voters as they vote. It also releases the voting results. The complete source code to this module can be found on my Github…


This is the 3rd of 5 articles to explore the development of an end-to-end Balloting system on Ethereum. In this article, I will demonstrate how the voting DApp works. This is a demonstration you can try.

Image for post
Image for post
Photo by Ming Jun Tan on Unsplash

Do check back often as I work on the rest of the articles in this series.

1. Voting on a Blockchain: How it works
2. Voting on a Blockchain: Solidity Contract Codes explained
3. Voting on a Blockchain: DApp Demonstration
4. Voting on a Blockchain: Ballot Management DApp Code Walk-through
5. Voting on a Blockchain: Voting DApp Code Walk-through

Getting Started

Visit MetaMask to install a digital wallet on your Chrome browser. A digital wallet is where you keep your cryptocurrency. …


This is the 2nd of 5 articles to explore the development of an end-to-end Balloting system on Ethereum. In this article, i will walk through the codes the Balloting system’s Smart Contract, Ballot.sol.

Image for post
Image for post
Photo by Michael D Beckwith on Unsplash

Do check back often as I work on them.

1. Voting on a Blockchain: How it works
2. Voting on a Blockchain: Solidity Contract Codes explained
3. Voting on a Blockchain: DApp Demonstration
4. Voting on a Blockchain: Ballot Management DApp Code Walk-through
5. Voting on a Blockchain: Voting DApp Code Walk-through

Variables of the Contract

struct vote{
address voterAddress;
bool choice;
}

Lines 12 to 15: A vote comprises 2 parts, the wallet address of the voter, and the choice he makes, and aye or a nah. An aye is represented by the value TRUE and a nah, by the value FALSE. …


This is the 1st of a 5 part tutorial on developing an end-to-end Balloting system on Ethereum. In this part, I demonstrate how voting works on the Blockchain.

Image for post
Image for post
Photo by Arnaud Jaegers on Unsplash

Do check back often as I work on the remaining parts of the tutorial.

  1. Voting on a Blockchain: How it works
  2. Voting on a Blockchain: Solidity Contract Codes explained
  3. Voting on a Blockchain: DApp Demonstration
  4. Voting on a Blockchain: Ballot Management DApp Code Walk-through
  5. Voting on a Blockchain: Voting DApp Code Walk-through

Voting is one of the most popular example to illustrate the potentials of Blockchain and Smart Contracts. …


This tutorial explains how to execute a Smart Contract on your private Kaleido Ethereum Blockchain with the Truffle Framework.

Image for post
Image for post
Photo by Lance Anderson on Unsplash

Prerequisites

Do read “Deploy a Private Ethereum Blockchain in 10 minutes” to have your private Blockchain instance running before continuing with this tutorial.

Setting Up

If you haven’t setup the Truffle Framework, here are the steps to do so.

If you are running Truffle on Windows, you first need to install the window build tool. Run this in your command prompt.

npm install -g -production windows-build-tools

Then install the Truffle Framework.

npm install -g truffle

The truffle-hdwallet-provider-privkey library lets you sign and execute transactions by providing a private key that belongs to an existing Ethereum wallet. This is helpful because I could have an existing Wallet address that was generated earlier in MetaMask and now wish to use it to test my Smart Contract in Truffle. …

About

Jackson Ng

Changing the world, one semicolon at a time @ http://jacksonng.org

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store