This repository contains a collection of Go examples and utilities for interacting with Ethereum using the w3 library.
w3-workshop/
│
├── abi/
│ └── main.go
│
├── rpc/
│ ├── eth-balance/
│ │ └── main.go
│ └── eth-block-by-hash/
│ └── main.go
│
├── utilities/
│ └── main.go
│
├── vm/
│ ├── simulation/
│ │ └── uniswap/
│ │ ├── uniswap.go
│ │ └── main.go
│ │
│ ├── testing/
│ │ └── main.go
│ │
│ └── tracing/
│ ├── trace-hooks/
│ │ └── main.go
│ └── tx-trace/
│ ├── _main.go
│ └── main.go
│
└── .gitignore
This workshop is designed to showcase various aspects of Ethereum development using the w3 library in Go. Here's a brief overview of each directory:
Contains examples of working with Ethereum ABI (Application Binary Interface).
Demonstrates making RPC calls to Ethereum nodes:
eth-balance/
: Example of checking ETH balanceeth-block-by-hash/
: Example of fetching block information by its hash
Utility functions and helpers for Ethereum development.
Ethereum Virtual Machine related examples and simulations:
simulation/
: Contains simulations of Ethereum transactions and contract interactionsuniswap/
: Specific example simulating Uniswap interactions
testing/
: Examples of testing smart contracts using w3tracing/
: Tools and examples for tracing Ethereum transactionstrace-hooks/
: Examples of using trace hookstx-trace/
: Transaction tracing utilities
- Clone this repository
- Ensure you have Go installed (version 1.16 or later recommended)
- Install dependencies:
go mod tidy
- Navigate to any of the example directories and run the Go files, for example:
cd rpc/eth-balance go run main.go