Sample code below (simplified for illustrative purposes only):
var a = new ManagedAccount(mOwner, mOwnerPwd);
var w = new Web3(a, mNodeUrl);
w.TransactionManager.DefaultGas = mGasLimit;
w.TransactionManager.DefaultGasPrice = mGasPrice;
Contract c = w.Eth.GetContract(mVAbi, mVAdd);
var r = c.GetFunction("issueCoin").
SendTransactionAsync(mOwner, To, Value).Result;
Thread.Sleep(10000);
var rcpt = w.TransactionManager.TransactionReceiptService.PollForReceiptAsync(r).Result;
No matter how long I sleep, the rcpt.Status is always NULL, even when I deliberately let the transaction runs out of gas and failed, the rcpt.Status is still NULL.
My question now is, how can I check and ensure a transaction is successful?