Nethereum
Nethereum is the .NET integration platform for Ethereum and EVM-compatible blockchains. It provides a complete development stack — from smart contract interaction and transaction signing, through a full EVM simulator and in-process Ethereum node, to blockchain data indexing, an ERC-4337 account abstraction bundler, a Blazor blockchain explorer, MUD framework support, multi-platform wallet UIs, Unity game integration, and .NET Aspire orchestration. Nethereum targets netstandard 2.0 through .NET 10, .NET Framework 4.5.1+, and Unity, running on Windows, Linux, macOS, Android, iOS, WebAssembly, and game consoles.
Try Nethereum in Your Browser
Go to playground.nethereum.com to browse and execute samples directly in your browser — no setup required.
Quick Start
dotnet add package Nethereum.Web3
Get an account balance
var web3 = new Web3("https://mainnet.infura.io/v3/YOUR_API_KEY");
var balance = await web3.Eth.GetBalance.SendRequestAsync("0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae");
Console.WriteLine($"Balance: {Web3.Convert.FromWei(balance.Value)} ETH");
Transfer ETH
var account = new Account("YOUR_PRIVATE_KEY");
var web3 = new Web3(account, "https://mainnet.infura.io/v3/YOUR_API_KEY");
var receipt = await web3.Eth.GetEtherTransferService()
.TransferEtherAndWaitForReceiptAsync("0xRecipientAddress", 0.01m);
Interact with a smart contract
// Use code-generated typed services (see Code Generation below)
var transferHandler = web3.Eth.GetContractTransactionHandler<TransferFunction>();
var receipt = await transferHandler.SendRequestAndWaitForReceiptAsync(contractAddress,
new TransferFunction { To = recipientAddress, Value = amount });
What You Can Build
Nethereum includes 130+ packages organised into focused libraries. Every row below links to a how-to guide on the documentation site.
| I want to... |
Guide |
| Query ETH, ERC-20, ERC-721, and ERC-1155 balances (built-in typed services, no ABI needed) |
Query Balance |
| Send ETH (gas, nonce, EIP-1559 fees — all automatic) |
Transfer Ether |
| Send a transaction with custom data or fees |
Send Transactions |
| Delegate an EOA to a smart contract (EIP-7702) |
EIP-7702 |
| Query blocks, transactions, and receipts |
Query Blocks |
| Estimate and customize gas fees |
Fee Estimation |
| Replace or speed up a pending transaction |
Transaction Replacement |
| Decode function calls from transaction input data |
Decode Transactions |
| ABI encode/decode (abi.encode, abi.encodePacked, EIP-712) |
ABI Encoding |
| Stream real-time data (new blocks, pending txns, event logs) |
Real-Time Streaming |
| I want to... |
Guide |
| Run a local dev chain (no external node needed) |
DevChain Quickstart |
| Fork a live network and manipulate state/time |
Forking & State |
| Trace and debug transactions (opcode-level) |
Debug & Trace |
| Spin up a full dev environment with Aspire (DevChain + PostgreSQL + Indexer + Explorer) |
dotnet new nethereum-devchain |
| I want to... |
Guide |
| Verify ETH balances without trusting RPC |
Verified State |
| Track finalized beacon headers via light client |
Light Client |