
How smart contract functions *really* work
On this week we're going to implement functions that can be called by any ethereum account or smart contract. Is important to understand how function call work under the hood to be able to write better and safer smart contract, optimize, and integrate with any tooling available today. Additionally, this way we can prepare for future updates where EVM get's improved. We are...

The Ethereum Bytecode Lifecyle
Today we’re tracing the two distinct journeys your contract takes: one when you deploy it, and another each time it’s called.1. Writing and CompilingYou start with a .sol or .vy file in Solidity or Vyper, defining functions, state variables and control flow in human-readable form. When...

This is how smart contracts call each other under the hood
This week, we take on one of the most powerful opcodes in the EVM toolbox: CALL.What is CALL?CALL lets your smart contract talk to other contracts (or even itself) on the ...

How smart contract functions *really* work
On this week we're going to implement functions that can be called by any ethereum account or smart contract. Is important to understand how function call work under the hood to be able to write better and safer smart contract, optimize, and integrate with any tooling available today. Additionally, this way we can prepare for future updates where EVM get's improved. We are...

The Ethereum Bytecode Lifecyle
Today we’re tracing the two distinct journeys your contract takes: one when you deploy it, and another each time it’s called.1. Writing and CompilingYou start with a .sol or .vy file in Solidity or Vyper, defining functions, state variables and control flow in human-readable form. When...

This is how smart contracts call each other under the hood
This week, we take on one of the most powerful opcodes in the EVM toolbox: CALL.What is CALL?CALL lets your smart contract talk to other contracts (or even itself) on the ...
Subscribe to Bytecode Tuesday
Subscribe to Bytecode Tuesday
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers


We reject abstraction
We believe in bytecode
Bytecode is the only true form
Let’s code with bytes now
Bytecode is a low-level version of your smart contract. It’s what your Solidity code turns into before it gets deployed on the Ethereum blockchain (or any Ethereum compatible blockchain , a.k.a EVM compatible blockchain).
Think of it like this:
You write your contract in Solidity (a human-friendly language). Then the computer translates it into bytecode (a machine-friendly language). This bytecode is what the Ethereum blockchain actually understands and runs.
EVM stands for Ethereum Virtual Machine. It’s like a global computer that runs on every Ethereum node. Whenever someone deploys or interacts with a smart contract, the EVM is responsible for running that code.
The EVM doesn't understand Solidity (or any other smart contract language) directly. It understands bytecode, a set of very simple instructions, kind of like a recipe with tiny steps.
The EVM uses something called a stack to do its work. Think of a stack like a pile of plates. You can only:
Push a new plate onto the top, or
Pop the top plate off.
You can't reach into the middle. You always work with the top of the pile.

In bytecode, everything is done by combining simple instructions. You push values onto the stack, then use an operation like ADD to do something with them.
Here’s a small example:
Add: 2 + 5
To add two numbers together, the EVM needs to:
Push the number 2 onto the stack
Push another 5 onto the stack
Run ADD to add the top two numbers

👀 What’s happening on the stack:
Step | Stack New Value | Description |
Start | [] | Stack is empty |
PUSH1 0x01 | [2] | 2 is pushed |
PUSH1 0x01 | [2, 5] | 5 is pushed |
ADD | [7] | Top two numbers of the stack are added and replaced by the result: 2 + 5 |
This is the foundation of how smart contracts work under the hood. Bytecode may seem basic, but when you combine lots of small instructions like this, you can build powerful and complex contracts, all without touching Solidity.
Click that Subscribe button for weekly bytecode learnings.
Let’s reject abstraction together.
We reject abstraction
We believe in bytecode
Bytecode is the only true form
Let’s code with bytes now
Bytecode is a low-level version of your smart contract. It’s what your Solidity code turns into before it gets deployed on the Ethereum blockchain (or any Ethereum compatible blockchain , a.k.a EVM compatible blockchain).
Think of it like this:
You write your contract in Solidity (a human-friendly language). Then the computer translates it into bytecode (a machine-friendly language). This bytecode is what the Ethereum blockchain actually understands and runs.
EVM stands for Ethereum Virtual Machine. It’s like a global computer that runs on every Ethereum node. Whenever someone deploys or interacts with a smart contract, the EVM is responsible for running that code.
The EVM doesn't understand Solidity (or any other smart contract language) directly. It understands bytecode, a set of very simple instructions, kind of like a recipe with tiny steps.
The EVM uses something called a stack to do its work. Think of a stack like a pile of plates. You can only:
Push a new plate onto the top, or
Pop the top plate off.
You can't reach into the middle. You always work with the top of the pile.

In bytecode, everything is done by combining simple instructions. You push values onto the stack, then use an operation like ADD to do something with them.
Here’s a small example:
Add: 2 + 5
To add two numbers together, the EVM needs to:
Push the number 2 onto the stack
Push another 5 onto the stack
Run ADD to add the top two numbers

👀 What’s happening on the stack:
Step | Stack New Value | Description |
Start | [] | Stack is empty |
PUSH1 0x01 | [2] | 2 is pushed |
PUSH1 0x01 | [2, 5] | 5 is pushed |
ADD | [7] | Top two numbers of the stack are added and replaced by the result: 2 + 5 |
This is the foundation of how smart contracts work under the hood. Bytecode may seem basic, but when you combine lots of small instructions like this, you can build powerful and complex contracts, all without touching Solidity.
Click that Subscribe button for weekly bytecode learnings.
Let’s reject abstraction together.
Cooldev1337 and filosofiacodigo.eth
Cooldev1337 and filosofiacodigo.eth
No activity yet