skalenetwork / docs.skale.space

https://docs.skale.space/
MIT License
0 stars 2 forks source link

Nethereum #39

Closed manuelbarbas closed 4 months ago

manuelbarbas commented 9 months ago

Nethereum

I is a .NET integration library for Ethereum, enabling developers to interact with EVM chains and smart contracts using the C# programming language. It provides a set of APIs and utilities to facilitate communication with the Ethereum blockchain.

Features

The main features of this web3 library are:

For more information check the Nethereum documentation

Unity Implementation Example

The Nethereum.Unity library is a Nethereum specific Unity library and api which provides support for UnityWebRequest to interact with Ethereum using RPC over Http.

All Nethreum realeases can be found in: https://github.com/Nethereum/Nethereum/releases

The following example showcases how to get the current balance of a wallet.

using System.Collections;
using UnityEngine;
using Nethereum.Web3;
using Nethereum.RPC.Eth.DTOs;
using Nethereum.Unity.Rpc;

  public IEnumerator GetWalletBalance()
    {
        string chain_rpc = "";
        string wallet_address = "";

        var balanceRequest = new EthGetBalanceUnityRequest(chain_rpc);
        yield return balanceRequest.SendRequest(wallet_address, BlockParameter.CreateLatest());
        var balance = Web3.Convert.FromWei(balanceRequest.Result.Value);

        Debug.Log("Wallet Balance " + balance);
    }

Nethereum Playground

In order to quickly experiment Nethereum library and it's capabilities, it was created a platform where developers can learn and run predefined examples that show how to make some requests. It can be useful to help developers deciding if Nethereum is a good fit for their project. To try it out check https://playground.nethereum.com/.

For more examples and information go to the Nethereum specific GitHub repository

manuelbarbas commented 8 months ago

What is: Library Language: C# Target: Unity