From smart contracts to blockchain