Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gekctek committed Apr 17, 2023
1 parent 7444fa7 commit 041493f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions samples/Sample.CLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,19 @@ public static async Task Main()
ulong proposalId = 110174;
Console.WriteLine($"Getting info for proposal {proposalId}...");
OptionalValue<Sample.Shared.Governance.Models.ProposalInfo> proposalInfo = await client.GetProposalInfo(proposalId);

CandidTypedValue rawCandid = CandidTypedValue.FromObject(proposalInfo);
Console.WriteLine("ProposalInfo:\n" + rawCandid.Value.ToString());

Console.WriteLine();
Console.WriteLine($"Getting the state for the governance canister ({canisterId})...");
var paths = new List<StatePath>
{
};
ReadStateResponse readStateResponse = await agent.ReadStateAsync(canisterId, paths);

Console.WriteLine("State:\n" + readStateResponse.Certificate.Tree);

Console.WriteLine("Press ENTER to exit");
Console.ReadLine();
}
Expand Down

0 comments on commit 041493f

Please sign in to comment.