A Deep Dive into Smart Contracts for Decentralized App Development