If you’ve followed along with the previous LearnTheCrypt guides, you already have most of the pieces you need to understand why Solidity exists.
You know what cryptocurrency is.
You know what a blockchain does.
You know how Bitcoin works.
And you’ve seen how Ethereum goes a step further by allowing developers to run programs on a blockchain.
Now comes the question a lot of aspiring blockchain developers eventually ask:
How do you actually write those programs?
One of the main answers is Solidity.
Solidity is the programming language behind a huge number of smart contracts on Ethereum and other EVM-compatible blockchain networks.
And if you’re coming from a normal programming background, it may look surprisingly familiar.
What is Solidity?
Solidity is a high-level programming language designed for writing smart contracts that run on blockchain networks such as Ethereum.
It was specifically created for the Ethereum ecosystem and is influenced by programming languages including JavaScript, Python and C++.
The official Solidity documentation describes it as a statically typed programming language designed for developing smart contracts that run on the Ethereum Virtual Machine (EVM).
That definition contains two terms worth understanding:
Smart contract
and
Ethereum Virtual Machine.
If those sound familiar from our Ethereum article, that’s because they’re directly connected.
A quick reminder: what is a smart contract?
A smart contract is essentially a program deployed to a blockchain.
Instead of running only on your laptop or on a company’s private server, the program executes within the blockchain’s environment according to the rules of that network.
For example, imagine creating a simple contract that keeps track of who owns a particular digital asset.
The contract could contain rules such as:
- Only the current owner can transfer it.
- A transfer changes the recorded owner.
- Anyone can check the current owner.
- Certain actions require payment.
Those rules can be written into Solidity code.
Once the contract is deployed, users can interact with it through transactions.
Ethereum describes smart contracts as programs that run on the Ethereum blockchain and execute according to their programmed rules.
That’s the basic relationship:
Solidity → writes the smart contract
EVM → executes the compiled contract
Ethereum → provides the blockchain network
Why do we need a special programming language?
You might be wondering:
“If Ethereum is just software, why can’t developers use PHP, JavaScript or Python?”
It’s a fair question.
The problem is that smart contracts need to operate within the specific execution environment provided by a blockchain.
They need predictable behavior.
They need to interact with blockchain-specific concepts such as addresses, transactions, balances and contract storage.
They also need to be compiled into instructions that the EVM understands.
Solidity was designed specifically for this environment.
That doesn’t mean JavaScript or Python are useless in blockchain development.
Far from it.
JavaScript, TypeScript, Python and other languages are commonly used to build the applications that communicate with smart contracts.
But Solidity is one of the primary languages you’ll encounter when you want to write the smart contracts themselves.
What is the EVM?
The Ethereum Virtual Machine, or EVM, is the execution environment used by Ethereum to run smart contract code.
You can think of it as a giant virtual computer whose behavior is defined by Ethereum’s protocol.
When you write a Solidity contract, the Solidity compiler turns your code into EVM bytecode.
That bytecode can then be deployed to the Ethereum blockchain.
The EVM executes the instructions when users interact with the contract.
So the process looks roughly like this:
You write Solidity
↓
Solidity compiler
↓
EVM bytecode
↓
Deploy to Ethereum
↓
Users interact with the smart contract
That is the basic journey from source code to a blockchain application.
What does Solidity code look like?

If you’ve programmed before, Solidity won’t look completely alien.
Here’s a very small example:
Don’t worry if you don’t understand every line yet.
The important thing is that we’ve created a contract called HelloWorld and given it a variable called message.
The public keyword means Solidity automatically provides a way for other users and applications to read that variable.
It’s a tiny contract, but it’s still a real smart contract structure.
What does pragma mean?
You’ll usually see something like this near the top of Solidity contracts:
This tells the compiler which Solidity version the source code is intended to work with.
It’s similar to saying:
“This code was written with this version range of Solidity in mind.”
Versioning matters because programming languages change.
A contract written for an older version may behave differently or fail to compile with a newer compiler.
That’s why you’ll often see Solidity contracts explicitly specify their compiler version.
What are variables in Solidity?
Just like in other programming languages, variables allow you to store information.
For example:
Here, number is a variable.
uint256 specifies the type of value it can store.
In this case, it’s an unsigned integer.
You can also work with other types.
For example:
You’ve probably seen these concepts before if you’ve worked with languages such as PHP, JavaScript or C++.
The syntax is different, but the underlying programming ideas are familiar.
What is an address?
Because Solidity operates in the Ethereum environment, blockchain addresses are extremely important.
An address represents an Ethereum account or contract address.
For example:
You could use this variable to keep track of who owns something.
Solidity also provides a special address payable type for addresses that can receive Ether through certain operations.
Addresses are one of those things that you’ll encounter constantly when learning Solidity.
After all, a smart contract needs to know who is interacting with it and where assets should go.
What are functions?
Functions are pieces of code that perform actions.
For example:
This function accepts a number and changes the value stored in number.
You could then call the function by interacting with the deployed contract.
This is where Solidity starts to feel less like ordinary programming.
Calling a function that changes blockchain state generally requires a transaction.
And transactions cost gas.
Why does Solidity have gas fees?
If you’ve read our Ethereum guide, you already know that Ethereum uses gas to measure computational work.
Smart contracts are no exception.
When a function changes information stored on the blockchain, the network needs to process that operation.
That work costs gas.
For example:
Calling this function changes the contract’s stored state.
That means an Ethereum transaction is required, and that transaction requires gas.
By contrast, simply reading information from a contract can often be done without sending a blockchain transaction.
This distinction is extremely important when developing smart contracts.
Read vs write
You’ll frequently hear blockchain developers talk about read and write operations.
A read operation retrieves information from the blockchain.
For example:
This doesn’t change the blockchain’s state.
A write operation changes state.
For example:
That difference affects how users interact with your contract and whether a transaction—and therefore gas—is required.
Ethereum’s documentation makes the same distinction between reading contract data and transactions that modify state.
What are mappings?
Mappings are another Solidity feature you’ll encounter very quickly.
A mapping allows you to associate one value with another.
For example:
You can think of this roughly like:
Wallet address → balance
So one address might correspond to:
0x123... → 50
while another could correspond to:
0x456... → 120
Mappings are extremely useful for things such as token balances, ownership records and user information.
In fact, if you’ve ever wondered how a token contract keeps track of who owns how many tokens, mappings are often part of the answer.
What are events?
Smart contracts can also emit events.
Events allow contracts to record information in transaction logs that applications can listen for.
For example:
Then, when your function changes the number:
A website interacting with your contract can listen for that event.
This becomes particularly useful when building decentralized applications.
Imagine a user clicks a button on a website to purchase an NFT.
The smart contract completes the transaction and emits an event.
The frontend can detect that event and update what the user sees.
This is one of the ways the blockchain and the website communicate.
Is Solidity difficult to learn?

That depends on your programming background.
If you’ve never programmed before, Solidity can be challenging because you’re learning two things at once:
Programming
and
blockchain concepts.
If you already understand variables, functions, loops, conditionals, arrays and basic object-oriented programming, the syntax itself isn’t necessarily the hardest part.
The more difficult part is learning how blockchain applications behave differently from normal software.
For example:
- Blockchain transactions can cost money.
- Deployed contracts are difficult to change.
- Smart contracts can hold valuable assets.
- Bugs can have serious consequences.
- Blockchain data is generally public.
- Transactions are generally irreversible once finalized.
That last group is why blockchain development requires more caution than simply building a small website.
Can Solidity contracts be changed?
Not in the same straightforward way you might update a PHP application.
Imagine you build a normal website.
You discover a bug.
You open the code, fix it and upload the new version.
Done.
Smart contracts are different.
Once a contract has been deployed to a blockchain, the deployed code isn’t simply edited in place.
Developers can use various upgrade patterns, but those systems add complexity and introduce their own considerations.
This is why testing and security reviews are so important in smart contract development.
A tiny programming mistake can potentially become a very expensive mistake.
Why is smart contract security so important?
This deserves more attention than beginners sometimes give it.
A normal software bug might cause an application to crash.
A smart contract bug can potentially allow someone to manipulate the contract or steal assets held by it.
There have been numerous major incidents in the history of decentralized finance where vulnerabilities in smart contracts resulted in enormous financial losses.
This doesn’t mean smart contracts are inherently unsafe.
It means they need to be developed carefully.
Security isn’t something you add after finishing the contract.
It needs to be considered from the beginning.
What can you build with Solidity?
This is where learning Solidity becomes exciting.
You can use it to build:
Tokens
You can create blockchain-based tokens with defined rules for supply, transfers and balances.
NFT contracts
You can create contracts that manage unique or semi-unique digital assets.
DeFi applications
Smart contracts can implement financial mechanisms such as exchanges, lending systems and liquidity pools.
DAOs
You can create governance systems where token holders participate in decision-making.
Games
Blockchain games can use smart contracts to manage assets and game-related logic.
Escrow systems
A contract can hold funds and release them when predefined conditions are satisfied.
The possibilities are broad because Solidity isn’t designed for one specific application.
It’s a general-purpose language for writing programs that operate within the EVM environment.
Do you need Ethereum to use Solidity?
Not necessarily.
Solidity is strongly associated with Ethereum, but it can also be used on other networks that support the Ethereum Virtual Machine.
These are commonly referred to as EVM-compatible networks.
This means that once you learn Solidity, your skills aren’t necessarily limited to Ethereum mainnet.
You can potentially work with a wider ecosystem of blockchain networks using compatible execution environments.
That is one reason Solidity remains such a useful skill for people interested in Web3 development.
What tools do Solidity developers use?
You don’t need an expensive setup to begin.
A beginner can write and test Solidity using browser-based development environments.
One of the most popular tools is Remix, an Ethereum development environment that allows you to write, compile and deploy Solidity contracts directly from your browser.
As you become more comfortable, you can move into more advanced development environments and frameworks.
Developers commonly work with tools such as:
- Remix
- Hardhat
- Foundry
- MetaMask
- Node.js
- Git
- JavaScript or TypeScript
- Solidity testing frameworks
You don’t need to learn all of them on day one.
Start with Solidity itself.
Then gradually add the tools around it.
A realistic way to learn Solidity
Don’t start by trying to build the next Uniswap.
That’s one of the easiest ways to get overwhelmed.
Start small.
Build a contract that stores a number.
Then create one that stores a name.
Then make a simple ownership contract.
Then experiment with mappings.
Then build a basic token.
After that, start learning how contracts interact with each other.
The goal isn’t to memorize Solidity syntax.
It’s to understand how blockchain programs work.
Once that foundation is solid, the syntax becomes much easier to pick up.
Solidity is only one part of Web3 development

This is another important point.
Knowing Solidity doesn’t automatically make you a complete blockchain developer.
A real decentralized application usually has multiple pieces.
You might have:
Smart contracts
Written in Solidity.
Frontend
Built using technologies such as HTML, CSS, JavaScript, React or other frameworks.
Blockchain interaction
Libraries and tools allow the frontend to communicate with the blockchain and smart contracts.
Wallet connection
Users connect wallets to sign transactions.
Backend or off-chain services
Some applications still need traditional servers and databases for certain tasks.
So becoming a Web3 developer isn’t about abandoning everything you already know.
If you already know JavaScript, databases, frontend development or backend programming, those skills can still be extremely useful.
You’re simply adding a new environment to your toolbox.
Where should you go from here?
At this point, you understand the relationship between the main pieces:
Blockchain provides the decentralized network.
Ethereum provides a programmable blockchain environment.
Smart contracts are programs running on that network.
Solidity is one of the main languages used to write those programs.
The EVM executes the compiled smart contract code.
That’s enough theory for now.
The best way to really understand Solidity is to write something.
In the next LearnTheCrypt tutorial, we’ll do exactly that:
Build Your First Ethereum Smart Contract With Solidity.
We’ll start with a simple contract, explain what every important line does, compile it, deploy it in a development environment, and interact with it.
That’s where blockchain development starts becoming less about reading explanations and more about actually building things.





Leave a Reply