How to get the status of a transaction?
I am using the following code to transfer ERC20.
public async void TransferErc20()
{
var mintResponse = await Web3Accessor.Web3.Erc20.Transfer(contractAddress, toAccount, amountTransfer);
var output = SampleOutputUtil.BuildOutputValue(mintResponse);
SampleOutputUtil.PrintResult(output, "ERC-20", nameof(Erc20Service.Transfer));
// You can make additional changes after this line
}
Now how to get the particular transaction status?
Which transaction's status the following code will give ?
public async void GetTransactionStatusCall()
{
var receipt = await Evm.GetTransactionStatus(Web3Accessor.Web3);
var output = $"Confirmations: {receipt.Confirmations}," +
$" Block Number: {receipt.BlockNumber}," +
$" Status {receipt.Status}";
SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.GetTransactionStatus));
// You can make additional changes after this line
}