viem-goviem-go
viem-go logoviem-go logo
Viem in Go

Build reliable blockchain apps & libraries with idiomatic Go, type-safe, and composable modules that interface with Ethereum — inspired by viem

golang
user@golem ~ % go get |

Familiar API

Same Client/Transport and Actions patterns as viem for TypeScript developers

Idiomatic Go

Built with Go conventions: explicit errors, context, and interfaces

Type Safe

Go's static typing for contract ABIs, transactions, and RPC calls

go-ethereum

Built on proven go-ethereum cryptographic primitives

High Performance

Leverage Go's concurrency model for parallel RPC operations

Composable

Modular architecture lets you import only what you need

Battle Tested

Comprehensive test suite running against Anvil

ABI Utilities

Encoding, decoding, and inspection utilities for ABIs

Familiar API

Same Client/Transport and Actions patterns as viem for TypeScript developers

Idiomatic Go

Built with Go conventions: explicit errors, context, and interfaces

Type Safe

Go's static typing for contract ABIs, transactions, and RPC calls

go-ethereum

Built on proven go-ethereum cryptographic primitives

High Performance

Leverage Go's concurrency model for parallel RPC operations

Composable

Modular architecture lets you import only what you need

Battle Tested

Comprehensive test suite running against Anvil

ABI Utilities

Encoding, decoding, and inspection utilities for ABIs

Performance
20×

Faster than viem. On average.

Viem-go is blazingly fast. along with careful optimisations, Go's compiled runtime crushes JavaScript across every benchmark. No JIT warm-up, no GC pauses.

19×
ABI Encode
32×
Hash Functions
24×
RLP Encoding
9×
Sig Recovery

* Benchmarks measured on Apple M2, Go 1.22, Node.js 20. Results may vary.

Head to Head

Viem-go vs Go-ethereum

See how viem-go compares to the standard go-ethereum library.

Feature
viem-go
go-ethereum
High-level API
Familiar to viem users
Type-safe ABI encoding
Multiple account types
Transport abstraction
Contract bindings
Low learning curve
Score
7/7
2/7
Use Cases

Why Go?

viem-go is designed for teams and projects that need Ethereum tooling in the Go ecosystem and have familiarity with the viem typescript library.

Backend Services

Build high-performance blockchain indexers, APIs, and microservices

CLI Tools

Create command-line utilities for wallet management and contract interactions

Infrastructure

Power validators, relayers, and other blockchain infrastructure

Cross-platform

Compile to a single binary for any OS without dependencies

Built-in

Features

viem-go supports all main features from the original viem typescript library. Every feature was built using the same syntax, method-names and patterns so that the developer friendly nature still remains.

JSON-RPC Abstractions

High-level APIs over the JSON-RPC API to make your life easier

Smart Contracts

First-class APIs for interacting with Smart Contracts

Ethereum Terminology

Language closely aligned to official Ethereum terminology

Multiple Accounts

Private Key, Mnemonic, and HD Wallet account types

Safe Numerics

Go's native big.Int for safe numeric operations

ABI Utilities

Encoding, decoding, and inspection utilities for ABIs

Token Bindings

Pre-built bindings for ERC20, ERC721, and ERC1155

Battle Tested

Test suite running against Anvil for real-world compatibility

Join Us

Community

Check out the following places for more viem-go content

0%

Test Coverage

0

GitHub Stars

0

Contributors

Support the Project

Help make viem-go a sustainable open-source project

2Stars on GitHub
0Forks
0Sponsors

Support

Help support future development and make viem-go a sustainable open-source project