Day 3 / 100DaysOfWeb3

Day 3 / 100DaysOfWeb3

Today I will learn what smart contracts are to explain them in depth

Table of contents

No heading

No headings in the article.

A smart contract is the set of rules that govern operations on a blockchain. First of all, a traditional legal contract is an agreement by which one or more people bind themselves to give, to do or not to do something. reummm.jpeg So, in the blockchain world, you need rules that describe the set of conditions needed to add a new block to the chain. In 2013, Ethereum already allowed developers to write pieces of code, called smart contracts that could be deployed on the Ethereum network. These codes can thus function without their creators. In the Ethereum network, contracts are written in the solidity language, designed to run on the Ethereum virtual machine. ethereum-virtual-machine.jpg

These contracts must be :

  1. Transparent (because they are published on the blockchain and everyone can read it),
  2. Simple (because they are expensive to deploy),
  3. Immutable (because once deployed they can no longer be modified, thus functioning as a reliable third party or a automated and trusted financial intermediary.)

On the Ethereum network, there are two types of account. Externally Owned Accounts (EOAs) managed by human users, and Contracts Accounts managed by smart contract codes linked to them. hero.png Both can receive Ether, NFT, execute smart contracts, generate new contracts. But the Contracts accounts cannot perform actions themselves, they can only respond to the transactions they receive from the EOAs and they are completely controlled by written code unlike EOAs.