Truffle for Dapp development
In the previous blog, I had written a smart contract that allowed hash of an artifact to be added to the blockchain. Although the programming of the smart contract was pretty simple, the deployment of the contract on the blockchain was pretty cumbersome. A framework makes this task easy. The two popular frameworks used for Dapp development are Truffle and Embark . Both have a lot of features and allow a lot of customizations and test-based development. In this tutorial, I will provide examples of how to program a Dapp using Truffle framework. The purpose of this Distributed Application (Dapp) is to allow an initial set of ‘shareholders’ to fairly distribute profits from an external source among themselves. The smart contract must be able to do the following: Accept profits sent as ETH to the contract. Allow shareholders to withdraw their fair portion of the profits based on their % ownership at the time of the profits being paid in. Allow a shareholder to transfer his or