I am trying to call a function from my contract using Netherums "SendTransactionAsync", however, it only works when the source is a public key rather than a private key.
I am using Ganache private network to test my contract.
Error: One or more errors occurred. (sender account not recognized: eth_sendTransaction)
This is my Code
HexBigInteger gas = new HexBigInteger(new BigInteger(400000));
HexBigInteger value = new HexBigInteger(new BigInteger(0));
myContract.GetFunction("giveFruit").SendTransactionAsync("b6558007a470f0593a35be45926342e92942fa3d7d00fc357c104fcc428f0cee", gas, value, "apple");
The first parameter of the function is the address that is supposed to call this function and the last parameter is an item passed to the contracts function?
The contract is working fine however when the code above doesn't work if I use the private key as shown, on the other hand, if I replace the private key with a public key it works just fine. This doesn't make any sense, as you shouldn't be allowed to send transactions using public keys.