Day 3 / 100DaysOfWeb3
Today I will learn what smart contracts are to explain them in depth
Table of contents
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. 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.
These contracts must be :
- Transparent (because they are published on the blockchain and everyone can read it),
- Simple (because they are expensive to deploy),
- 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. 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.