Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Added Conflicts and OracleResponse attributes to show tx
Browse files Browse the repository at this point in the history
  • Loading branch information
cschuchardt88 committed Nov 16, 2023
1 parent f6a6cd6 commit 6ddb50c
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions neo-cli/CLI/MainService.Blockchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,25 @@ public void OnShowTransactionCommand(UInt256 hash)
{
foreach (var attribute in tx.Transaction.Attributes)
{
ConsoleHelper.Info("", " Type: ", $"{attribute.Type}");
ConsoleHelper.Info("", " AllowMultiple: ", $"{attribute.AllowMultiple}");
ConsoleHelper.Info("", " Size: ", $"{attribute.Size} Byte(s)");
if (attribute is Conflicts c)
{
ConsoleHelper.Info("", " Type: ", $"{c.Type}");
ConsoleHelper.Info("", " Hash: ", $"{c.Hash}");
ConsoleHelper.Info("", " Size: ", $"{c.Size} Byte(s)");
}
else if (attribute is OracleResponse o)
{
ConsoleHelper.Info("", " Type: ", $"{o.Type}");
ConsoleHelper.Info("", " Id: ", $"{o.Id}");
ConsoleHelper.Info("", " Code: ", $"{o.Code}");
ConsoleHelper.Info("", " Result: ", $"{Convert.ToBase64String(o.Result.Span)}");
ConsoleHelper.Info("", " Size: ", $"{o.Size} Byte(s)");
}
else
{
ConsoleHelper.Info("", " Type: ", $"{attribute.Type}");
ConsoleHelper.Info("", " Size: ", $"{attribute.Size} Byte(s)");
}
}
}
ConsoleHelper.Info();
Expand Down

0 comments on commit 6ddb50c

Please sign in to comment.