LykkeBiz.Nethereum.Extension 1.0.2

The extension to Nethereum library

There is a newer version of this package available.
See the version list below for details.
Install-Package LykkeBiz.Nethereum.Extension -Version 1.0.2
dotnet add package LykkeBiz.Nethereum.Extension --version 1.0.2
<PackageReference Include="LykkeBiz.Nethereum.Extension" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LykkeBiz.Nethereum.Extension --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Lykke.Nethereum.Extension

The extension to Nethereum library

Batch execute via https

  1. Create RPC client:
    ILykkeJsonRpcClientvar client = new LykkeJsonRpcClient(NodeUrl);

  2. Make a call:
    var result = await client.ExecuteRpcBatchAsync(
    new RpcRequestMessage(1, "eth_getBalance", "0xd092cd556828f7a2f4db7eeb9fe3b261cd664350", "latest"),
    new RpcRequestMessage("hello world", "eth_blockNumber"));

  3. Handle results
    Assert.AreEqual(2, result.Count);
    Assert.AreEqual(1, result[0].IdAsInteger());
    Assert.AreEqual("hello world", result[1].IdAsString());

Get block number

  1. Create RPC client:
    ILykkeJsonRpcClientvar client = new LykkeJsonRpcClient(NodeUrl);

  2. Make a call:
    Int64 blockNumber = await client.GetBlockNumberAsync();

  3. Handle results
    Console.WriteLine($"Last block number: {blockNumber}");

Get Ether balance

  1. Create RPC client:
    ILykkeJsonRpcClientvar client = new LykkeJsonRpcClient(NodeUrl);

  2. Make a call:
    Int balanceWei = wait client.GetEtherBalanceAsync("0xd092cd556828f7a2f4db7eeb9fe3b261cd664350");

  3. Handle results
    Console.WriteLine($"balance in wei: {balanceWei}");

Lykke.Nethereum.Extension

The extension to Nethereum library

Batch execute via https

  1. Create RPC client:
    ILykkeJsonRpcClientvar client = new LykkeJsonRpcClient(NodeUrl);

  2. Make a call:
    var result = await client.ExecuteRpcBatchAsync(
    new RpcRequestMessage(1, "eth_getBalance", "0xd092cd556828f7a2f4db7eeb9fe3b261cd664350", "latest"),
    new RpcRequestMessage("hello world", "eth_blockNumber"));

  3. Handle results
    Assert.AreEqual(2, result.Count);
    Assert.AreEqual(1, result[0].IdAsInteger());
    Assert.AreEqual("hello world", result[1].IdAsString());

Get block number

  1. Create RPC client:
    ILykkeJsonRpcClientvar client = new LykkeJsonRpcClient(NodeUrl);

  2. Make a call:
    Int64 blockNumber = await client.GetBlockNumberAsync();

  3. Handle results
    Console.WriteLine($"Last block number: {blockNumber}");

Get Ether balance

  1. Create RPC client:
    ILykkeJsonRpcClientvar client = new LykkeJsonRpcClient(NodeUrl);

  2. Make a call:
    Int balanceWei = wait client.GetEtherBalanceAsync("0xd092cd556828f7a2f4db7eeb9fe3b261cd664350");

  3. Handle results
    Console.WriteLine($"balance in wei: {balanceWei}");

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.11 78 11/13/2019
1.0.10 57 11/13/2019
1.0.9 50 11/13/2019
1.0.8 52 11/13/2019
1.0.7 54 11/13/2019
1.0.6 51 11/13/2019
1.0.5 51 11/12/2019
1.0.4 50 11/12/2019
1.0.3 51 11/12/2019
1.0.2 51 11/12/2019
1.0.1 49 11/12/2019
1.0.0 50 11/12/2019
Show less