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.
The main Nethereum Solution and projects: Source and more Info: https://github.com/Nethereum/Nethereum
Project Source | Nuget_Package | Description |
---|---|---|
Nethereum.Web3 | 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 | 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 | Extension to interact with Quorum, the permissioned implementation of Ethereum supporting data privacy created by JP Morgan | |
Nethereum.Besu | Nethereum.Besu is the extended Web3 library for Besu. Including the non-generic RPC API client methods to interact with Besu. | |
Nethereum.Optimism | Nethereum L2 Optimism integration |
Project Source | Nuget_Package | Description |
---|---|---|
Nethereum.ABI | Encoding and decoding of ABI Types, functions, events of Ethereum contracts | |
Nethereum.Hex | HexTypes for encoding and decoding String, BigInteger and different Hex helper functions | |
Nethereum.RPC | Core RPC Class Library to interact via RCP with an Ethereum client | |
Nethereum.Contracts | Core library to interact via RPC with Smart contracts in Ethereum including presets for ERC20, ERC1155, ENS, ProofOfHumanity, MultiCall, etc | |
Nethereum.JsonRpc.RpcClient | JsonRpc Rpc Client using Http | |
Nethereum JsonRpc IpcClient | JsonRpc IpcClient provider for Windows, Linux and Unix | |
Nethereum.JsonRpc.WebSocketClient | JsonRpc WebsocketClient provider for Windows, Linux and Unix | |
Nethereum.RLP | RLP encoding and decoding | |
Nethereum.KeyStore | 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 | Nethereum signer library to sign and verify messages, RLP and transactions using an Ethereum account private key | |
Nethereum.HDWallet | Generates an HD tree of Ethereum compatible addresses from a randomly generated seed phrase (using BIP32 and BIP39) | |
Nethereum.Metamask.Blazor | Metamask / Blazor integration | |
Nethereum.BlockchainProcessing | Nethereum Blockchain crawler and log processing | |
Nethereum.GnosisSafe | Nethereum GnosisSafe integration | |
Nethereum.ENS | Nethereum ENS extended integration | |
Nethereum.ENS | Nethereum ENS extended integration | |
Nethereum.Signer.EIP712 | Nethereum EIP712 | |
Nethereum.Siwe | Nethereum SIWE |
And others, check the source here: https://github.com/Nethereum/Nethereum/tree/master/src or Nugets https://www.nuget.org/profiles/nethereum
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...
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.
The documentation and guides can be found at Read the docs.
The simplest way to get started, is to use one of the provided examples or templates
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)
Nuget: https://www.nuget.org/packages/Nethereum.Templates.Pack/
dotnet new -i Nethereum.Templates.Pack
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
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
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:
- ERC721 Spec https://eips.ethereum.org/EIPS/eip-721
- ERC1155 https://eips.ethereum.org/EIPS/eip-1155
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
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)
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
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
Nethereum can be installed as a Unity Package using the following git repository: https://github.com/Nethereum/Nethereum.Unity
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
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.