Posts

Showing posts from 2017

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

Smart Contracts using Solidity

Image
Solidity is the most popular and de-facto programming language for developing smart contracts which run on the Ethereum network. Theoretically you can develop these smart contracts in other programming languages such as Serpent and LLL, however, the support for Solidity is far better. Solidity follows a syntax similar to javascript, however, it has its own set of keywords and data-types. I would recommend everyone to read the Solidity language documentation to understand the basics of the language. In this blog/tutorial, we will: Build a smart contract to implement the royalty payout scenario , I had described earlier. Compile this smart contract. Deploy the contract to the test network. Going forward in future tutorials, we will be re-using the same smart contract for the complete development. As with any programming language, there are numerous tools and frameworks that can be used for building an app. At times these can get too confusing and frustrating. I too had my

CIBIL for corporates?

Most financial institutions in India evaluate an Individual for creditworthiness based on their CIBIL  score. However, no such creditworthiness scores are available for corporate. I believe a lot of time and effort is spent by many companies in researching on the financial health status of other companies they are dealing with before they can supply them with services/goods on credit. I haven't found any existing solution (at least in the Indian context) that provides the creditworthiness of a corporate. With the new tax regime GST, I believe there is a scope for a good product that can be built over blockchain that would evaluate the creditworthiness of a company. Probably prevent another Stayzilla? I am sure the same solution would find its application in other geographies too. I will update this blog with more details on the POC for this use-case that I am working in the weeks to come.

A use-case for block chain implementation

Image
Unless you have been living in a cocoon, you would have heard of the controversy surrounding the music director Ilayaraja and the singer SPB. There was excessive social media outrage over the issue and both sides had vociferous and sane backers. While this controversy was raging, I was busy learning and researching blockchain development and this got me to think that the resolution of the royalty issue could be a potential use-case for my blockchain application development. Royalty and licensing issue are quite common to almost all industries (not just the publishing industry but software/product industry as well). Piracy causes loss of revenue in many ways. My proposed solution to resolve this issue is Every publisher/artists/author must publish his content along with a smart contract (containing the royalty logic) into the public Ethereum blockchain. The content being published will be signed with references to these smart contracts (maybe as a new ID3 tag, which can't

Setting up Private Ethereum TestNet

None of the tutorials on the internet that involve setting up of a private Ethereum TestNet on the latest version 1.5.8 and above. so I decided to document my experiences on getting this done. Most Ethereum clients allow you to connect to two separate public block chains. The main blockchain network, which would require you to make use of *real ether* for all transactions or you can make use of the TestNet. On the test network, you have the ability to mine ether which can then be used for all your transactions. In order to develop distributed apps (Dapps) you will need access to an Ethereum client and an Ethereum wallet. Mist  the most popular wallet used by most developers for creating Dapps. However, if you have limited resources and would still like to build Dapps, I would recommend using MetaMask . MetaMask is a Chrome plugin(a plugin for FireFox is also expected to be released soon). This plugin acts a thin client that allows the user to connect to both the live Ethereum netw

Ethereum and Blockchain - 2

Image
In the previous blog , I had described the origin of bitcoin and the various components of the Bitcoin network. Although conceptually Ethereum is very similar to Bitcoin, there are few differences. Unlike Bitcoin protocol, Ethereum was designed to be adaptable and flexible. The nodes in Bitcoin network are simple software programs that validate a transaction and store a transaction, however, the nodes in the Ethereum network are fully functional Ethereum Virtual Machines which are capable of executing scripts of different algorithmic complexities. Developers can develop programs which execute on EVM. These programs are written in a new javascript programming language called Solidity . Programs written in Solidity are compiled to EVM bytecode. The EVM acts as the runtime environment for these programs. These programs are completely sandboxed, and completely isolated. They don't have access to the file system, network or any other processes running on the same machine! Like i

Ethereum and Blockchain - 1

"If you are not profoundly shocked by quantum mechanics, you haven't really understood it!"         ~ Niels Bohr. Frankly, I didn't understand what Bohr meant by this quote on quantum mechanics. But ever since I have started to read and experiment with Ethereum and Blockchain, I have started to realize a parallel to Bohr's quote w.r.t this new technology. I do understand that many, would now be wondering "what the hell am I blabbering??". Let me attempt to explain to you my shock through a series of blogs, which will also help me to recollect my learning over time. To understand Ethereum and Blockchain, one has to understand its parent, the Bitcoin.  I first heard of Bitcoin back in 2014 while working on a European startup. Apparently then a Nigerian bus booking company had implemented Bitcoin API to accept payments for bus travel. Although I was intrigued by the term, once I started to read through it I was confused and apprehensive (Nigeria,

Teething problems

So last Saturday, I picked out my Raspberry Pi 2 and tried installing Ethereum on it. Unfortunately, I ran into the common problem of MicroSD slot not locking. Tried few fixes available on the internet and finally gave up. Will take a look again later this week.

Getting started with Blockchain with IoT

I shall start documenting my experiences in Blockchain and IoT in this blog, so that I can refer to them later on. I am pretty sure this blog can be used by others who are interested in either of these two technologies as well.