ABSTRACT

With the advancements in blockchain technology, it is possible to do business, manage supply chains, and do voting on it. Blockchain uses smart contracts for maintaining the rules and agreements between two parties. These smart contracts can be easily programmed using the Solidity programming language. Solidity is a statically typed, contract-oriented, high-level language employed for coding smart contracts. Using this, the developers can write robust, self-executing, and authoritative contracts. Solidity generates a byte code that executes on an Ethereum Virtual Machine (EVM). The solidity language is similar to other advanced languages such as C, JavaScript, and Python. It supports various libraries, complex user-defined data types, and OOP concepts like inheritance, among several other features. Some use cases of Solidity-coded smart contracts are systematic voting, auctions, and lottery.

This chapter’s central focus is on clearly understanding the Solidity programming language. The need for Solidity is discussed. Its use case and implementation are addressed. Details regarding its environment setup and compilation are shown. Its important components are explained along with examples for a better understanding of syntax. By the end of this chapter, one will be familiar with Solidity and will be able to write smart contracts on it.