By : jeteika

This module focuses on best practices, including assessing whether a blockchain-based solution is right for your problem, designing Solidity smart contracts, and those related to the Remix IDE. Welcome to the second blockchain specialization course titled Smart Contract. This course is entirely dedicated to the smart contract, the computational element of blockchain technology. Let`s start with the origins of a smart contract. In the first specialization course, Blockchain Fundamentals, we discussed how the proven algorithms and techniques of encryption, hashing, and peer-to-peer networks have been creatively applied to the innovation of blockchain, a decentralized, reliable, distributed, and immutable ledger. The concept of a smart contract existed long before the advent of Bitcoin. Computer scientist Nick Szabo explained his idea of the Bit Gold cryptocurrency as a kind of precursor to Bitcoin. He also described the concept of the smart contract in his 1996 publication. In fact, Szabo coined the term smart contract more than 20 years ago.

The smart contract is a centerpiece and a major axis of the Ethereum blockchain. This is the good, bad and ugly of blockchain technology. This is a powerful feature. The inappropriate design and coding of a smart contract has led to significant flaws such as DAO hacking and parity wallet locking. This is a dominant feature of blockchain, which is why we used the second course of this specialization to help you design, code, deploy and execute a smart contract. As we discussed in the first course, Bitcoin has a scripting feature that contains rules and guidelines. The Linux Foundation`s Hyperledger blockchain has a smart contract feature called Chaincode. String code is written in Go and runs in a Docker environment. Docker is a lightweight container technology for running programs. You can read more about this in the resources section. Many variants of smart contracts are widely used in the context of blockchain.

We decided to discuss Ehereum`s implementation of smart contracts, as Ethereum is a consumer blockchain and is used as the reference blockchain for many others. At the end of this course, you will be able to explain the elements of a smart contract, discuss the syntax and semantics of a Solidity smart contract programming language, solve a problem and design a smart contract solution, use the remix development environment to create and test smart contracts, and deploy the smart contract with remix and access the contract via a simple web interface. In this course, it is imperative that you try the different concepts related to smart contract in a test environment in order to understand and apply these concepts. We use the ide integrated remix development environment, a web interface for hands-on exploration. For now, make sure that you can access this interface under remix.ethereum.org. Be warned that Remix is just a development environment and is constantly changing as new features are added, even as often as every week. This course is the one in which you will experiment with the smart contract. In the next course, we will develop complete end-to-end applications with a smart contract. After completing this module, you will be able to explain the elements of a smart contract and explain the types of problems that a smart contract can solve, define the structure of a smart contract, apply this knowledge to understand what the real smart contract is written in Solidity language, and use a remix of web development environment, to call and interact with a smart contract. To begin with, we must remember that the Bitcoin blockchain is primarily intended for the transfer of digital currency. Bitcoin has added a simple conditional transfer of value via a built-in script.

Remember from the Blockchain Basics course, course one, that this is a conditional feature that was started as a soft fork in Bitcoin. The script was limited in its capabilities. It allowed simple conditional transfers. After Bitcoin, Ethereum evolved. The founders of Ethereum developed smart contracts taking into account Nick Szabo`s idea of a smart contract from more than 20 years ago. A significant contribution of Ethereum is a functional smart contract layer that supports any code execution on the blockchain. The smart contract allows for customized operations of any complexity. This feature enhances the ability of the Ethereum blockchain to be a powerful decentralized computer system. Why would you want to transfer currency? Cryptocurrencies such as Bitcoin allow the transfer of assets such as money or currency peer-to-peer without intermediaries. For what? Give someone a gift, buy a product, maybe even renew a driver`s license or send flowers to someone.

Let`s go further. We may wish that the gift be delivered on a specific date. Buy a product of a certain color and quality. Some credentials may need to be verified to renew the license. And we may need a certain bouquet of tulips to deliver to Buffalo. This introduces conditions, rules, and policies that go beyond what a simple money transfer cryptocurrency protocol can handle. .