We have developed a simple Smart Contract which offers this following public transaction method:
function bid(uint256 _userCode, uint256 _amount) public {
assert(_userCode> 0);
assert(_amount> 0);
winningBid.userCode= _userCode;
winningBid.amount= _amount;
var bidData= Bid(_userCode, _amount);
bids.push(bidData);
}
We are sending the transaction using this Nethereum code:
var result = bidFunction.SendTransactionAndWaitForReceiptAsync(address, gas, balance, null, userCode, amount).Result;
The method invocation does not throw any exception, even passing 0 to the userCode that, if you take a look to the Smart Contract, should trigger the assert and stop the method execution.
How could we check if a transaction has completed correctly or has been rejected by some assert check?