diff --git a/Phantasma.RPC.Sharp/Model/EventResult.cs b/Phantasma.RPC.Sharp/Model/EventResult.cs index add52ba..205b7ef 100644 --- a/Phantasma.RPC.Sharp/Model/EventResult.cs +++ b/Phantasma.RPC.Sharp/Model/EventResult.cs @@ -23,6 +23,13 @@ public class EventResult [DataMember(Name = "contract", EmitDefaultValue = false)] [JsonProperty(PropertyName = "contract")] public string Contract { get; set; } + + /// + /// Gets or Sets Contract + /// + [DataMember(Name = "name", EmitDefaultValue = false)] + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } /// /// Gets or Sets Kind @@ -49,6 +56,7 @@ public override string ToString() sb.Append("class EventResult {\n"); sb.Append(" Address: ").Append(Address).Append("\n"); sb.Append(" Contract: ").Append(Contract).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Kind: ").Append(Kind).Append("\n"); sb.Append(" Data: ").Append(Data).Append("\n"); sb.Append("}\n"); diff --git a/Phantasma.RPC.Sharp/Phantasma.RPC.Sharp.csproj b/Phantasma.RPC.Sharp/Phantasma.RPC.Sharp.csproj index ec7bd68..b471379 100644 --- a/Phantasma.RPC.Sharp/Phantasma.RPC.Sharp.csproj +++ b/Phantasma.RPC.Sharp/Phantasma.RPC.Sharp.csproj @@ -10,7 +10,7 @@ www.phantasma.io logo.png https://github.com/phantasma-io/PhantasmaRpcClient - 1.0.4 + 1.0.5 Phantasma, blockchain, smartnfts diff --git a/SampleClient/SampleClient.cs b/SampleClient/SampleClient.cs index f542b58..280a1a6 100644 --- a/SampleClient/SampleClient.cs +++ b/SampleClient/SampleClient.cs @@ -43,6 +43,7 @@ static void Main(string[] args) var account = accountAPI.GetAccount("P2K9zmyFDNGN6n6hHiTUAz6jqn29s5G1SWLiXwCVQcpHcQb"); + GetTransaction(client); Console.WriteLine("Result: " + account.Name); foreach (var balance in account.Balances) { @@ -51,5 +52,14 @@ static void Main(string[] args) Console.WriteLine($"{amount} {balance.Symbol}"); } } + + static void GetTransaction(ApiClient client) + { + var transactionApi = new TransactionApi(client); + var transaction = + transactionApi.GetTransaction("59B903FAE1864EBE9CBA0C767C1D1568138652A97D522FA7B3AE0F38CC6D1CD0"); + + Console.WriteLine("Result: " + transaction); + } } } \ No newline at end of file