ReasonJun

Ethereum : Bytecode 본문

Blockchain/Ethereum

Ethereum : Bytecode

ReasonJun 2023. 10. 13. 16:56
728x90

Bytecode in EVM is the low-level programming language that is used to execute smart contracts on the Ethereum blockchain. It is generated by a compiler from Solidity code, which is a high-level programming language that is designed for writing smart contracts.

 

EVM bytecode is a stack-based language, which means that it uses a stack to store data and instructions. The stack is a last-in-first-out (LIFO) data structure, which means that the last item added to the stack is the first item to be removed.

 

EVM bytecode consists of a series of opcodes, which are instructions that the EVM can execute. Opcodes can be divided into two categories: arithmetic and logical opcodes, and control flow opcodes. Arithmetic and logical opcodes perform operations on data, such as addition, subtraction, multiplication, and division. Control flow opcodes control the flow of execution of a smart contract, such as jump, if-else, and loop statements.

 

To execute a smart contract, the EVM reads the bytecode of the smart contract one opcode at a time and executes the corresponding instruction. The EVM maintains a memory space to store data and a stack to store data and instructions. The EVM also maintains a program counter to track the current opcode being executed.

 

EVM bytecode is a powerful tool that can be used to create a wide variety of smart contracts. It is efficient, platform-independent, and secure.

 

 

 

https://blog.trustlook.com/understand-evm-bytecode-part-2/

 

Understand EVM bytecode – Part 2

In the first section, Understand EVM bytecode – Part 1 [https://blog.trustlook.com/understand-evm-bytecode-part-1/] We have inspected the contract creation part of the EVM bytecode of the smart contract. In this section we will analyze the runtime EVM by

blog.trustlook.com

 

 

linkReferences : Address where other smart contracts that the current smart contract depends on are deployed

object : Bytecode of current smart contract

opcodes : Action code, which is a low-level, human-readable command.

sourceMap :  Match each contract command with the generated source code section.

728x90
Comments