Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Events. #17

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Phantasma.RPC.Sharp/Model/EventResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ public class EventResult
[DataMember(Name = "contract", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "contract")]
public string Contract { get; set; }

/// <summary>
/// Gets or Sets Contract
/// </summary>
[DataMember(Name = "name", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }

/// <summary>
/// Gets or Sets Kind
Expand All @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion Phantasma.RPC.Sharp/Phantasma.RPC.Sharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageProjectUrl>www.phantasma.io</PackageProjectUrl>
<PackageIcon>logo.png</PackageIcon>
<RepositoryUrl>https://github.com/phantasma-io/PhantasmaRpcClient</RepositoryUrl>
<Version>1.0.4</Version>
<Version>1.0.5</Version>
<PackageTags>Phantasma, blockchain, smartnfts</PackageTags>
</PropertyGroup>

Expand Down
10 changes: 10 additions & 0 deletions SampleClient/SampleClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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);
}
}
}
Loading