static async Task SendTx(Wallet wallet, string toAddress, double amountOfCoins)
{
var accountFrom = new Account(wallet.GetAccount(0).PrivateKey, 137);
var web3 = new Web3(accountFrom, network);
var wei = Web3.Convert.ToWei(amountOfCoins);
decimal amt = 2.99m;
var tx = await web3.Eth.GetEtherTransferService().TransferEtherAsync(toAddress, amt);
Throws an error for invalid sender: eth_sendRawTransaction
. I create the Wallet in another function. When I try to debug it, the information looks correct. The from and to Addresses look good, I know the wallet has a balance....etc. Is there something special I have to do other than declaringthe chainID(137) when I'm transacting on Polygon network?
Anyone tell me what I'm doing wrong?