Learning Solidity
From zero to hero
Explain Smart contract
A smart contract is an agreement between two people or entities in the form of computer code programmed to execute automatically. The idea was proposed in the 1990s by Nick Szabo
, a pioneer of modern computer science, who defined them as a set of virtual promises with associated protocols to enforce them.
Smart contracts are executed on blockchain, which means that the terms are stored in a distributed database and cannot be changed. Transactions are also processed on the blockchain, which automates payments and counterparties. Since the emergence of the digital currency Ethereum, the creation and execution of smart contracts has been simplified, as complex transactions can be programmed into the Ethereum protocol.
Explain Solidity language
Solidity is an object-oriented programming language created specifically by the Ethereum Network team for constructing and designing smart contracts on Blockchain platforms.
It's used to create smart contracts that implement business logic and generate a chain of transaction records in the blockchain system.
It acts as a tool for creating machine-level code and compiling it on the "Ethereum Virtual Machine" (EVM).
It has a lot of similarities with C and C++ and is pretty simple to learn and understand. For example, a “main” in C is equivalent to a “contract” in Solidity.
Create by Example Creating a contract in solidity involves writing functions and deploying them to the blockchain. Here are some examples of how to create a contract in Solidity:
Simple Storage Contract This is a simple storage contract example that stores a single value:
Payable Contract This is an example of a payable contract that allows users to send ether to the contract. The contract then stores the amount of ether received.
Token Contract This is an example of a token contract that allows users to transfer tokens between accounts.
By using these examples, you can get started creating your own contracts in Solidity.
Smart Contract Language
Remix Id Tutorial
Write You First Contract
Solidity Data Type
Solidity Function
State variable
Local Variable
Global variable
View Keyword
Pure Keyword
Event Ticket Smart Contract
Constant Keyword
If Else Keyword
while loop
Do Wile Loop
For Loop
Required Error
Assert Error
Revert Error
Modifier
Constructor
Mapping
Array
Array Remove
Replace Array
Enum Solidity
Import Enum
Structs
Import Structs
Data Location
Solidity Events
Inheritance
Shadowing Effect
Super Keyword
Visibility Solidity
Interface Solidity
Payable
Sending ether solidity
fallback
Call Function
DelegateCall
Calling other Contract
Create Other Contract
Try and catch
Solidity Library
Solidity ABI Encoded
Solidity ABI Decoded
Keccak256
DAPP
. . .
In the next lesson, we'll go over Introducing Solidity language.
Last updated