How to write Decentralized Blockchain Application