Note

If you are new to the blockchain technology, taking our Introduction to Blockchain Technology self-paced course is highly recommended. Also, for a comprehensive coverage of blockchain development in Ethereum or mastering Solidity programming, taking our below self paced courses is highly recommended:

Recap

In our previous article (How Ethereum Manages Transactions), we discussed how Ethereum process and manage transactions in a blockchain application.

In this article, we learn how blockchain smart contracts work in Ethereum.

Smart contract

A smart contract is an executable code that is digitally signed by the contract creator as part of contract account creation. It is like a scripted agreement between transacting parties; the code built into the contract is stored on the Ethereum blockchain and cannot be tampered with or removed. This greatly increases the credibility of the legal document.

Typically, DApp developers write smart contracts in some high-level programming language and then compile them into the bytecode. It is the bytecode living on the blockchain and executed within the EVM. There are not a lot of choices in determining which programming languages to use. The following are a couple of options that the developers may consider:

  • Solidity: Solidity is the most popular one in the market for developing smart contracts. It is a JavaScript type language and is Turing complete.
  • Vyper: Vyper is a general-purpose, experimental programming language that compiles down to the EVM bytecode, as does Solidity. It is a contract-oriented, Pythonic programming language that targets smart contract development language. Vyper aims to be auditable, secure, and human-readable. Being simple to read is more important than being simple to write.
  • Serpent: Serpent is another pythonic programming language for smart contract development. It is largely deprecated. Serpent is compiled using LLL, a Lisp-like low-level language similar to Assembly.

Folks may wonder which one to use, Solidity or Vyper? For the majority of use cases, this is a personal preference. Solidity is the most popular one and has all tools and utilities in place for developing end-to-end decentralized applications. Vyper is still in the earlier experimental stage. On purpose, it omitted several programming constructs for being more secure, auditable, and human-readable. If your use case requires these, use Solidity instead of Vyper.
We will focus on the Solidity programming language in our article series. As covered in our future article series, we will show you, step-by-step, how to design and develop, test and debug, and deploy and monitor decentralized applications using Solidity, Ethereum, and various tools and utilities in Ethereum ecosystems.

 

One-to-One Live Blockchain Classes

Coding Bootcamps school offers One-to-One Live Blockchain Classes for Beginners.

 

Next Article

In our next article (How Ether and Gas Work in Ethereum), we discuss how Ether and Gas work in Ethereum.

This article is written in collaboration with Brian Wu who is a leading author of “Learn Ethereum: Build your own decentralized applications with Ethereum and smart contracts” book. He has written 7 books on blockchain development.

Resources

Free Webinars on Blockchain

Here is the list of our free webinars that are highly recommended:

 

Free Courses

Here is the list of our 10 free self-paced courses that are highly recommended:

 

Self-Paced Blockchain Courses

If you like to learn more about Hyperledger Fabric, Hyperledger Sawtooth, Ethereum or Corda, taking the following self-paced classes is highly recommended:

  1. Intro to Blockchain Technology
  2. Blockchain Management in Hyperledger for System Admins
  3. Hyperledger Fabric for Developers
  4. Intro to Blockchain Cybersecurity
  5. Learn Solidity Programming by Examples
  6. Introduction to Ethereum Blockchain Development
  7. Learn Blockchain Dev with Corda R3
  8. Intro to Hyperledger Sawtooth for System Admins

 

Live Blockchain Courses

If you want to master Hyperledger Fabric, Ethereum or Corda, taking the following live classes is highly recommended:

 

Articles and Tutorials on Blockchain Technology

If you like to learn more about blockchain technology and how it works, reading the following articles is highly recommended:

 

Articles and Tutorials on Ethereum and Solidity

If you like to learn more about blockchain development in Ethereum with Solidity, reading the following articles and tutorials is highly recommended:

 

Articles and Tutorials on Hyperledger Family

If you like to learn more about blockchain development with Hyperledger, reading the following articles and tutorials is highly recommended:

 

Articles and Tutorials on R3 Corda

If you like to learn more about blockchain development on Corda , reading the following articles and tutorials is highly recommended:

 

Articles and Tutorials on Other Blockchain Platforms

If you like to learn more about blockchain development in other platforms, reading the following articles and tutorials is highly recommended: