Smart contracts are at the heart of the blockchain revolution, providing the building blocks for decentralized applications (dapps).