what are the four major parts of a smart contract 
it depends on the blockchain and how it is programmed generally speaking smart contracts have state variables data functions what can be done events messages in and out and modifiers special rules for specific users some may have additional elements depending on what they are designed to do the bottom linesmart contracts are code written into a blockchain that executes the actions two parties agree to outside the chain by automating these actions the need for an intermediary or trust between the parties is removed the comments opinions and analyses expressed on investopedia are for informational purposes online read our warranty and liability disclaimer for more info 