Tipps for using Infura with Nethereum

I’m an experienced C# developer, but not specialized with crypto (yet), nor with infura. I want to make some test, e.g. creating an account with eth testnet and transferring some coins, creating tokens etc, before switching to mainnet.
Unfortunately I didn’t found many examples or they are really outdated.
Can someone give some tipps or advices how to continue or where to look?
TIA

Hi @Manman and welcome to our Infura community.

Could you please let us know which examples have you found so far? I’d recommend taking a look at the following documentation from Nethereum → Infura - Nethereum Documentation

Hi Flaviu,

yes, I already did that, and wrote a small program to GetBalance(). This worked fine.
But there is a link for instructions to create an account with a program:
https://docs.nethereum.com/en/latest/Nethereum.Workbooks/docs/nethereum-using-account-objects/#sending-a-transaction
And that didn’t work so far, but I’m still trying and will give you an update soon.

Thanks for your help.

Update: I created two wallets with some Ropsten coins on one, and tried to send a part to the other wallet. To do this I created a small program like mentioned in the nethereum documentation (see my last post).

This didn’t work, I’m getting an exceptions which tells: “The method eth_sendTransaction does not exist/is not available: eth_sendTransaction”

Here’s my code:
const string Provider = “https://ropsten.infura.io/v3/12345…etc”;

static async void SendCoin(string id)
{
try
{
await SendCoinWorkAsync(id);
}
catch (Exception ex)
{
Console.WriteLine(string.Format("{0}: ERROR: {1}", id, ex.Message));
// The method eth_sendTransaction does not exist/is not available: eth_sendTransaction
}
}

static async Task SendCoinWorkAsync(string id)
{
var web3 = new Web3(Provider);
var fromAccount = new Account(PrivKey_Ropsten_1);
var amountInEth = 0.01m;
var ret = await web3.TransactionManager.SendTransactionAsync(
fromAccount.Address,
Address_Ropsten_2,
new Nethereum.Hex.HexTypes.HexBigInteger(Web3.Convert.ToWei(amountInEth, UnitConversion.EthUnit.Ether)));

Console.WriteLine(string.Format("{0}, ret: {1}", id, ret));

}

What can I do? And: does someone know where the Nethereum / Web3 documentation for TransactionManager and SendTransactionAsync is? I couldn’t find one.