echoevm logo

echoevm

A minimal Ethereum Virtual Machine implementation in Go
focusing on bytecode execution from the ground up

v0.0.5 - Latest Release
150+
Opcodes Supported
100%
Test Coverage
5
Major Releases
Go
Pure Implementation

About echoevm

echoevm is a from-scratch implementation of the Ethereum Virtual Machine written in Go. It's designed to be educational, minimal, and focused on understanding how EVM bytecode execution works.

The project started as a learning exercise to understand the internals of the EVM, from basic opcode execution to complex smart contract interactions.

Educational Minimal From Scratch Open Source
$ go run ./cmd/echoevm run \
  -artifact contract.json \
  -function "add(uint256,uint256)" \
  -args "42,58"

Executing artifact file: contract.json
Contract result: 100

Key Features

โšก

Bytecode Execution

Execute Solidity bytecode directly from .bin files or Hardhat artifacts with full opcode support.

๐Ÿ”ง

Function Calls

Automatic ABI encoding for function calls with support for various data types and parameters.

๐Ÿ›ก๏ธ

Error Handling

Proper handling of REVERT conditions with appropriate exit codes and detailed error messages.

๐Ÿงช

Testing Framework

Comprehensive test suites covering data types, control flow, and edge cases for validation.

๐ŸŒ

Block Processing

Fetch and execute blocks from Ethereum networks via RPC with range processing capabilities.

๐Ÿ“Š

Detailed Logging

Comprehensive execution tracing with configurable log levels for debugging and analysis.

Quick Start

Installation

# Clone the repository
git clone https://github.com/smallyunet/echoevm.git
cd echoevm

# Build the binary
make build

# Run tests
make test-advanced

Basic Usage

# Execute a contract function
go run ./cmd/echoevm run \
  -artifact contract.json \
  -function "add(uint256,uint256)" \
  -args "42,58"

# Process Ethereum blocks
go run ./cmd/echoevm block -block 1

Release History

v0.0.5 Latest
July 27, 2025

Comprehensive Testing Framework

Added comprehensive Solidity contracts as test cases covering basic data types, functions, control flow, modifiers, events, interfaces, libraries, and inline assembly. All tests pass with the convenient make test-advanced command.

Testing Solidity Coverage Make Commands
v0.0.4 July 5, 2025

Hardhat Artifact Support

Added support for reading bytecode from Hardhat artifact files, making it easier to work with standard Hardhat projects. Simplified the compilation and execution workflow significantly.

go run ./cmd/echoevm run -artifact ./artifacts/contracts/Add.sol/Add.json -function "add(uint256,uint256)" -args "1,2"
v0.0.3 June 24, 2025

Ethereum Block Execution

Implemented the ability to execute Ethereum blocks via RPC! Successfully executes the first 10,000 blocks of Ethereum mainnet (which contain no contract transactions). Added single block and block range execution modes.

RPC Support Block Processing Mainnet Compatible
v0.0.2 June 9, 2025

Runtime Bytecode & Function Calls

Added the ability to execute runtime bytecode after deployment. Introduced function calling capabilities with automatic ABI encoding for parameters, making it possible to interact with deployed contracts.

Runtime Execution ABI Encoding Function Calls
v0.0.1 May 27, 2025

Initial Implementation

First working version! Successfully deploys a simple Add.sol contract and outputs runtime bytecode. This version established the fundamental understanding of the difference between deployment code and runtime code.

MVP Deployment Learning Project