Alex sits at his desk. On the table are a couple of empty cups, chaotic notes, an open laptop. On the screen — dozens of tabs with new terms and diagrams. In his head is a storm. He whispers:
— "I think I've got it. This idea might work. For the first time in a long time, everything is coming together into one picture."
He gets up and starts pacing around the room:
— "My project can become truly independent. Without servers, without the risk of blocking, without centralized control. I want it to work by itself — like a living mechanism. Anywhere in the world. Without me."
His gaze stops on the Ethereum: Smart Contracts tab.
— "They write that you can create a program in a special programming language — Solidity. Such a program will live in a network of many computers, it can't be turned off or hacked. You can entrust it with money, management, rules. This is blockchain."
He studied the topic all night. And the more he read, the more he understood — he's on the threshold of something big.
Alex says to himself:
— "Imagine a library where every book is held by millions of readers. Try to forge one page — the rest will immediately notice something's wrong. That's how blockchain works. The data in it can't just be erased or replaced."
Terms
Blockchain — is a system where information is stored decentrally. Each new record is confirmed by all network participants, no one can secretly change history. A key component of the technology are smart contracts — autonomous programs that function in the blockchain environment and are available for deployment and calling by users. They manage rules, assets, events. They cannot be deceived or stopped. Everything works automatically and transparently, as long as there are working servers in the network — nodes.
Transaction — this is an operation that goes through the blockchain. For example, sending money, executing smart contract code. A transaction is confirmed by all network participants and cannot be changed or deleted. To confirm the authenticity of the transaction creator's identity, a cryptographic signature is used, which they put when sending the transaction.
Smart contract — a program that is deployed in the blockchain and executed simultaneously on thousands of computers. If all network participants execute the same code, then the result will be the same — the principle of determinism. By agreeing among themselves on the result of code execution, network nodes form a huge virtual machine distributed around the world. This system cannot be stopped or subjected to interference by one owner.
Solidity — a programming language used to create smart contracts. It allows creating programs capable of interacting with blockchain and other smart contracts. Programs in Solidity are compiled into a special set of instructions — bytecode, intended for the virtual machine EVM — Ethereum Virtual Machine, running on each node of the Ethereum network.
Ethereum — one of the most popular blockchain networks where most contracts are deployed.
Ethereum Virtual Machine (EVM) — this is a virtual machine that executes smart contract bytecode. It takes a sequence of instructions and executes them one after another. It's like a Java virtual machine, but running simultaneously on thousands of computers around the world, providing decentralized and immutable code execution.
Cryptographic signature — this is a mechanism that allows proving that a transaction was sent by a specific person. Each user of the Ethereum network has their unique key, which is used to sign transactions. This key is stored in the user's wallet and is used to confirm the identity of the transaction creator. By signing a transaction, the user makes it authentic — somewhat similar to a signature on a bank check. Receiving the signature, a network node can verify that the transaction was created by exactly this user.
Main features of smart contracts:
Work on thousands and millions of computers
Don't depend on one owner
Cannot be changed after deployment, if not initially provided for
Open and verifiable, anyone can look at the code
Can manage tokens and digital assets
— "The entire system works like an army of tireless, incorruptible notaries who never make mistakes and don't succumb to pressure. Each of them checks the work of the others."
Why this is important
In regular applications, all data is stored on company servers, blocking or censorship is possible, rules can be changed without warning. In decentralized applications, there's no single server — everything works in a distributed network. You can't just change the rules — they're embedded in code. The code is available for checking and analysis.
Alex thoughtfully looks out the window:
— "If my project lives in blockchain, it won't die with my company. Other developers will be able to look at it, use it, and call it. It will become something bigger than myself. And that's inspiring."
Tools for work
Special tools are used to work with blockchain. They help write code, test it, deploy it to the network, and view transactions. The BlockFirst platform provides all necessary tools for working with blockchain within the platform, however it will be extremely useful to independently look at existing tools.
Remix — online development environment for writing, compiling, testing, and deploying smart contracts. Doesn't require installing programs on the computer — everything works right in the browser.
Etherscan — website where you can view any transactions and contracts
MetaMask — Ethereum network wallet for storing and sending cryptocurrencies, creating transactions and interacting with smart contracts
Hardhat — environment for testing and writing smart contracts
Analyzing simple code
Let's look at simple smart contract code that will store the message "Hello, Blockchain!" and return it when someone requests the message.
Solidity
// SPDX-License-Identifier: MIT
pragmasolidity ^0.8.19;
contractHelloBlockchain{
stringpublic message ="Hello, Blockchain!";
}
Alex starts analyzing:
// SPDX-License-Identifier: MIT — line indicating the license under which the code is distributed. This is important: in blockchain everything is transparent, and even usage rights must be explicitly stated
pragma solidity ^0.8.19; — directive for the compiler: use Solidity language version not lower than 0.8.19. This way we ensure that the code will work predictably and stably
contract HelloBlockchain { — creates a smart contract named HelloBlockchain. Essentially, this is like a class in familiar programming languages — an independent unit of logic
string public message = "Hello, Blockchain!"; — variable storing a text message. Thanks to the public modifier, a function for reading this variable is automatically created, and any network user can get its value by addressing the contract
} — Close the contract
He opens Remix IDE, copies the code and deploys the contract. After a few seconds, his message spreads across network nodes. Somewhere in Tokyo, Berlin, San Francisco and Riga — the code is stored on thousands of machines. He laughs:
— "I just said hello to the entire blockchain!"
Looking at code
Studying the contract on etherscan
After deployment, Alex was shown the smart contract address — a strange sequence of numbers and letters. The address was the following — 0xaf508A803E4E0602fD6f5083741c4C3B3f7cE02D
An address is a unique identifier of a deployed smart contract, by which it can be found in the blockchain. By address you can look at the contract content or call it in a transaction. In transaction visualizers, for example in etherscan, by the contract address you can look at all information about it. Let's see how Alex's deployed contract looks — https://sepolia.etherscan.io/address/0xaf508A803E4E0602fD6f5083741c4C3B3f7cE02D#code
By following the link, you can see information such as the smart contract creator's address, balance and contract code.
In the Read Contract tab you can see our variable with the message. Click on it, and see our greeting!
Greeting visualization
Practical assignment
Now it's your moment. Alex, inspired by what he just saw, turns to you. In his eyes — a mixture of delight and slight excitement:
— "Listen, this really works. This thing just said 'Hello, Blockchain!', and thousands of machines around the world saw it... What if they answer me — 'Hello, Alex!'? I want the network to greet me personally. Will you help?"
He hands you a notebook with code and a pen.
— "Here's this fragment. Just one line... but it's already history. A personal message recorded in an eternal digital book, that's cool! Help me implement it, okay?"
Your task is to change the message so it becomes personal. Let the blockchain address Alex by name. When you finish, this code will become part of the common network. Thousands of people will be able to see, read and check it. And each of them will see that Alex was here. That he started the journey. That he's not alone.