Skip to content
@Nethereum

Nethereum

Ethereum .Net cross platform integration framework. For technical support, chat and collaboration come to Discord: https://discord.gg/u3Ej2BReNn

Nethereum

Nethereum is the Ethereum .Net integration platform, the aim is to provide solutions to develop any type of dapp (web, mobile, desktop), backend integration or gaming and VR using platforms like Unity3d.

Nethereum core

The main Nethereum Solution and projects: Source and more Info: https://github.com/Nethereum/Nethereum

Main Libraries

Project Source Nuget_Package Description
Nethereum.Web3 NuGet version Ethereum Web3 Class Library to simplify the interaction with Ethereum (RPC, Contracts, Signing, etc)
Nethereum.Unity Unity3d integration, libraries can be found in the Nethereum releases
Nethereum.Geth NuGet version Nethereum.Geth is the extended Web3 library for Geth. This includes the non-generic RPC API client methods to interact with the Go Ethereum Client (Geth) like Admin, Debug, Miner
Nethereum.Quorum NuGet version Extension to interact with Quorum, the permissioned implementation of Ethereum supporting data privacy created by JP Morgan
Nethereum.Besu NuGet version Nethereum.Besu is the extended Web3 library for Besu. Including the non-generic RPC API client methods to interact with Besu.
Nethereum.Optimism NuGet version Nethereum L2 Optimism integration

Core Libraries

Project Source Nuget_Package Description
Nethereum.ABI NuGet version Encoding and decoding of ABI Types, functions, events of Ethereum contracts
Nethereum.Hex NuGet version HexTypes for encoding and decoding String, BigInteger and different Hex helper functions
Nethereum.RPC NuGet version Core RPC Class Library to interact via RCP with an Ethereum client
Nethereum.Contracts NuGet version Core library to interact via RPC with Smart contracts in Ethereum including presets for ERC20, ERC1155, ENS, ProofOfHumanity, MultiCall, etc
Nethereum.JsonRpc.RpcClient NuGet version JsonRpc Rpc Client using Http
Nethereum JsonRpc IpcClient NuGet version JsonRpc IpcClient provider for Windows, Linux and Unix
Nethereum.JsonRpc.WebSocketClient NuGet version JsonRpc WebsocketClient provider for Windows, Linux and Unix
Nethereum.RLP NuGet version RLP encoding and decoding
Nethereum.KeyStore NuGet version Keystore generation, encryption and decryption for Ethereum key files using the Web3 Secret Storage definition, https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition
Nethereum.Signer NuGet version Nethereum signer library to sign and verify messages, RLP and transactions using an Ethereum account private key
Nethereum.HDWallet NuGet version Generates an HD tree of Ethereum compatible addresses from a randomly generated seed phrase (using BIP32 and BIP39)
Nethereum.Metamask.Blazor NuGet version Metamask / Blazor integration
Nethereum.BlockchainProcessing NuGet version Nethereum Blockchain crawler and log processing
Nethereum.GnosisSafe NuGet version Nethereum GnosisSafe integration
Nethereum.ENS NuGet version Nethereum ENS extended integration
Nethereum.ENS NuGet version Nethereum ENS extended integration
Nethereum.Signer.EIP712 NuGet version Nethereum EIP712
Nethereum.Siwe NuGet version Nethereum SIWE

And others, check the source here: https://github.com/Nethereum/Nethereum/tree/master/src or Nugets https://www.nuget.org/profiles/nethereum

Nethereum Playground. Try Nethereum now in your browser.

The Nethereum playground http://playground.nethereum.com provides a simple IDE with many examples and first point of documentation on common tasks using Nethereum. Some of the examples included: Chain interation, Ether transfer, Transaction Signing, 1559 Fees, Interaction with Smart contracts and events, Smart contracts structs, Log and Blockchain Processing, Gnosis Safe, ENS, ERC20 and ERC721 presets, Hd Wallets, L2 Optimism, EIP712 Sign and recover a typed message, Abi Encoding, Key Store, Quorum, and many more...

Nethereum Playground

Do you need support, want to have a chat, or want to help?

Please join the Discord server using this link: https://discord.gg/u3Ej2BReNn We should be able to answer there any simple queries, general comments or requests, everyone is welcome. If you want to help or have any ideas for a pull request just come and chat.

Documentation

The documentation and guides can be found at Read the docs.

Examples and Templates

The simplest way to get started, is to use one of the provided examples or templates

Nethereum.Templates.Pack

The nethereum templates pack includes templates to work and create smart contract libraries, standalone or using a contract framewowrk like Open Zeppelin. It also includes Blazor wasm and server project templates that integrate with Metamask or Siwe (Sign with Ethereum)

Installation

Nuget: https://www.nuget.org/packages/Nethereum.Templates.Pack/

dotnet new -i Nethereum.Templates.Pack

Templates included

Template Name                                                  Short Name           Language  Tags
-------------------------------------------------------------  -------------------  --------  -----------------------------------------------------
Nethereum Default Smart contract Library / XUnit ERC20 sample  smartcontract        [C#]      Nethereum/Smart contracts
Nethereum ERC721, ERC1155 Open Zeppelin and  XUnit Projects    nethereum-erc721-oz  [C#]      Nethereum/Smart contracts/OpenZeppelin/ERC721/ERC1155
Nethereum Blazor Metamask Wasm-Server Projects                 nethereum-mm-blazor  [C#]      Nethereum/Blazor/Metamask
Nethereum Blazor SIWE Wasm/Server/RestApi Projects             nethereum-siwe       [C#]      Nethereum/SIWE/Blazor/Metamas/RestApi
Nethereum WebSocket Streaming Examples                         nethereum-ws-stream  [C#]      Nethereum/WebSocketStreaming

Nethereum Default Smart contract Library / XUnit ERC20 sample

Source and more info: https://github.com/Nethereum/Nethereum.Templates.SmartContractDefault

Template to create a smart contract library development solution including:

  • Smart contract example (ERC20)
  • Auto code generation settings for vscode
  • XUnit testing and testchains setup for Geth, Ganache, CustomUrl, etc
  • Examples of integration testing the smart contract ERC20 (Token transfer, balance, deployment, Events and Log Processing)
  • Examples of integration testing Ether transfers

quickdemotemplate

Nethereum ERC721, ERC1155 Open Zeppelin and XUnit Projects

Source and more info: https://github.com/Nethereum/Nethereum.Templates.SmartContracts.OZ-Erc721-Erc1155

Template to get started creating ERC721 NFTs - ERC1155 and DAO Governor using OpenZeppelin For more information:

156877329-9f799c56-a4e4-4314-9169-489370c73e73 Shop1155-hd

Nethereum Blazor Metamask Wasm-Server Projects

Source and more info: https://github.com/Nethereum/Nethereum.Templates.Metamask.Blazor

This projects provides the quick start example/template on how to integrate Metamask + Nethereum using Blazor interop. The project allows you to work both in Wasm and Server side, so you can create a fully decentralised application using Wasm or semi-decentralised using server hosted components (Web3+Web2).

Both project types include and example on how to:

  • Configure Metamask as a UI host provider
  • Connect to Metamask
  • Interact with Ethereum using simple Web3 rpc calls (Blockhash and ChainId)
  • How to create a generic component for ERC20 token transfer including simple validation using FluentValidation
  • How to use the EthereumAuthenticationStateProvider and the claim role "EthereumConnected" with connected account
  • How to override the default styles of the Metmask component

quickdemo

Nethereum Blazor SIWE Wasm/Server/RestApi Projects

Source and more info: https://github.com/Nethereum/Nethereum.Templates.Siwe

The Nethereum SIWE template provides an starting point of signing and authentication using Ethereum accounts and the standard SIWE message. The templates provides the following use cases, and how SIWE can be implemented using the Nethereum libraries.

  • Rest Api
  • Blazor Wasm + Rest Api
  • Blazor Server side (standalone)
  • Maui (Future template with Rest Api)
  • Avalonia (Future template with Rest Api)

demoAuthentication

Wallets and End to End examples

Blazor / Maui Hybrid Explorer wallet (Desktop, Mobile)

Source and more info: https://github.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor

Nethereum Explorer is a .Net Blazor Wasm SPA, Desktop Windows and Mac, Android and iOS light blockchain explorer and simple wallet Template.

You can try it here: https://explorer.nethereum.com

browserwasm android

Desktop wallet (Avalonia)

Source and more info: https://github.com/Nethereum/Nethereum.UI.Desktop

Functional sample of a Reactive Cross platform desktop wallet connecting to Ethereum using Nethereum, Avalonia and ReactiveUI.

The aim of the starter kit is to provide a continous improving shell allowing to focus only on the developing the specific screens that provide the integration with smart contracts.

The main example for this is the Standard Token component which provides the desktop views and view models

simpleDemo

Unity 3D project

Unity package

Nethereum can be installed as a Unity Package using the following git repository: https://github.com/Nethereum/Nethereum.Unity

Getting started (Unity3d Net472 / Netstandard Sample)

Source and more info: https://github.com/Nethereum/Unity3dSampleTemplate

  • Output to the log the current BlockNumber using Unity.UI both in Async and coroutines
  • Ether transfer using Web3 and coroutines
  • Smart contract deployment (ERC20), Transactions (Transfer) and Querying (Balance)
  • Using 1559 Suggestion strategies or Legacy mode when tranfering Ether
  • Cross Platform architecture for both Coroutines and Task to enable the reuse of your code using different deployments Native /Desktop or Browser using Metamask)
  • Metamask connectivity in browser

Desktop demo

Unity3dDestopSample )

Browser demo

Unity3dBrowserSample )

Unity WebGl

Source: https://github.com/Nethereum/Nethereum.Unity.Webgl

Example on how to integrate a WebGl unity project with Metamask, Deploy an ERC721 smartcontract (NFT) and interact with the smart contract minting a token and retrieving the asset (image) associated with it.

MMUnity2021 gif

Pinned Loading

  1. Nethereum Nethereum Public

    Ethereum .Net cross platform integration library

    C# 2.2k 727

  2. Nethereum.BlockchainStorage Nethereum.BlockchainStorage Public

    Library for processing the storage of the Ethereum blockchain in Azure Table Storage

    C# 41 32

  3. Nethereum.UI.Wallet.Sample Nethereum.UI.Wallet.Sample Public

    Cross platform wallet example using Nethereum, Xamarin.Forms and MvvmCross

    C# 77 42

  4. Nethereum.Game.Sample Nethereum.Game.Sample Public

    Crossplatform game sample using Nethereum and UrhoSharp

    C# 25 21

  5. abi-code-gen abi-code-gen Public

    Generic code generator from abi

    HTML 22 4

  6. Nethereum.Workbooks Nethereum.Workbooks Public archive

    Nethereum tutorials using workbooks

    C# 18 16

Repositories

Showing 10 of 86 repositories

Top languages

Loading…

Most used topics

Loading…