0
0
Blockchain / Solidityprogramming~10 mins

Why Solidity is the language of Ethereum in Blockchain / Solidity - Visual Breakdown

Choose your learning style9 modes available
Concept Flow - Why Solidity is the language of Ethereum
Ethereum Blockchain
Need for Smart Contracts
Choose a Language
Solidity Created
Write Smart Contracts
Deploy on Ethereum
Execute on Ethereum Virtual Machine (EVM)
This flow shows how Ethereum needed a language for smart contracts, leading to Solidity's creation, which lets developers write and deploy contracts on Ethereum.
Execution Sample
Blockchain / Solidity
pragma solidity ^0.8.0;

contract SimpleStorage {
    uint storedData;
    function set(uint x) public {
        storedData = x;
    }
    function get() public view returns (uint) {
        return storedData;
    }
}
A simple Solidity contract that stores and retrieves a number on Ethereum.
Execution Table
StepActionVariable/StateResult/Effect
1Deploy contract SimpleStoragestoredDatainitialized to 0 on blockchain
2Call set(42)storedDataupdated to 42 on blockchain
3Call get()storedDatareturns 42
4Call set(100)storedDataupdated to 100 on blockchain
5Call get()storedDatareturns 100
6No more calls-Contract state remains storedData=100
💡 Execution stops when no more contract calls are made.
Variable Tracker
VariableStartAfter set(42)After set(100)Final
storedData042100100
Key Moments - 3 Insights
Why does storedData keep its value between function calls?
Because storedData is stored on the blockchain inside the contract's state, it persists across calls as shown in execution_table steps 2, 4, and 6.
Why do we need Solidity instead of just using regular programming languages?
Solidity is designed to work with Ethereum's blockchain and its virtual machine (EVM), enabling secure, decentralized contract execution, unlike regular languages that don't interact with blockchain.
What happens when we deploy the contract?
Deploying uploads the contract code to Ethereum, initializing its state (storedData=0), making it ready to accept calls, as shown in execution_table step 1.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the value of storedData after step 2?
A42
B0
C100
DUndefined
💡 Hint
Check the 'Variable/State' column at step 2 in the execution_table.
At which step does storedData change to 100?
AStep 3
BStep 5
CStep 4
DStep 6
💡 Hint
Look at the 'Action' and 'Variable/State' columns in execution_table rows.
If we never call set(), what would get() return according to variable_tracker?
A42
B0
C100
DError
💡 Hint
Check the 'Start' value of storedData in variable_tracker.
Concept Snapshot
Solidity is Ethereum's main language for smart contracts.
It compiles to bytecode for the Ethereum Virtual Machine (EVM).
Contracts store data on blockchain, persisting between calls.
Solidity syntax is similar to JavaScript and C++.
It enables decentralized, secure contract execution on Ethereum.
Full Transcript
Ethereum needed a way to write smart contracts that run on its blockchain. Solidity was created as a language designed specifically for this purpose. When a Solidity contract is deployed, it is stored on the Ethereum blockchain with an initial state. Functions like set() can change the contract's stored data, which persists between calls because it is saved on the blockchain. The get() function reads this stored data. Solidity compiles to code that runs on the Ethereum Virtual Machine, enabling decentralized and secure contract execution. This visual trace showed deploying a simple contract, updating stored data, and retrieving it, illustrating why Solidity is the language of Ethereum.