i

Blockchain Complete Guide  

Smart Contract

Smart Contract is an Automated Enforceable script. It is used to ease, verify and enforce the negotiation of a contract. It allows the credible transaction without the need of a third party.

Simply, it allows for the automatic transfer of digital assets between parties based upon pre-specified conditions.

It is also termed as Chain code in few other Blockchain Protocols like Hyperledger.

As Blockchain is Peer to peer decentralized network, so transaction between parties need not have intermediaries. But to effectively have transactions placed on the network, you might need some automated clauses to be effective once both parties complete their part of transactions.

These Automated clauses are called Smart Contract.

These smart contracts make Blockchain cheaper (because of No middleman fee), faster (peer to peer connectivity in the transaction) and also secure (As data resides in the cryptographic form with other nodes).

Ethereum has the support for multiple languages for smart contract writing.

There are three common languages Smart contracts are written in. After compiling, smart contracts are run on Ethereum Virtual machines.

1. Solidity

Similar to JavaScript. This is currently the most popular scripting language from writing smart contracts.

2. Serpent

Similar to Python, very popular in early software release of Ethereum.

3. LLL (Lisp-like language)

Similar to Lisp.

Some other languages that will be available soon:

Viper

An example of a basic Smart contract in Solidity