WAX Unity Web3 Suite
Hyperion
Hyperion
  • Getting Started
  • Installation
    • WebGL Installation
  • Examples
    • AccountsClient
      • AccountsClientExample1
      • AccountsClientExample2
      • AccountsClientExample3
    • ChainClientExample
    • HistoryClientExample
    • StatsClientExample
    • SystemClientExample
  • API Docs
    • Clients
      • AccountsClient
      • ChainClient
      • HistoryClient
      • StatsClient
      • StatusClient
    • Models
      • Abi
      • Account
      • Account2
      • AccountRamDelta
      • Act
      • Action
      • Action2
      • Action3
      • Action4
      • Action5
      • Action6
      • Action7
      • ActionTrace
      • ActivatedProtocolFeature
      • ActivatedProtocolFeatures
      • ActiveSchedule
      • ApiException
      • AuthSequence
      • Authorization
      • Authorization2
      • BlockrootMerkle
      • Body
      • ClientExtensions
      • Cpu
      • CpuLimit
      • Data
      • Delta
      • Event
      • ExtendedAct
      • ExtendedLink
      • Features
      • Field
      • GetAbiResponse
      • Header
      • Health
      • Link
      • Net
      • NetLimit
      • PendingSchedule
      • Percentiles
      • Permission
      • Permission2
      • Producer
      • Producer2
      • ProducerRow
      • Proposal
      • ProvidedApproval
      • Receipt
      • RequestedApproval
      • RequiredAuth
      • RicardianClaus
      • Schedule
      • ServiceData
      • SimpleAction
      • Specification
      • Stats
      • StdDeviationBounds
      • Streaming
      • Struct
      • SubjectiveCpuBillLimit
      • Table
      • TableByScopeRow
      • Tables
      • Token
      • Total
      • TotalResources
      • Transaction
      • Transaction2
      • Transaction3
      • Trx
      • Voter
      • VoterInfo
    • Responses
      • GetAccountResponse
      • GetAccountResponse2
      • GetActionUsageResponse
      • GetActionsResponse
      • GetActionsResponse2
      • GetActivatedProtocolFeaturesBody
      • GetActivatedProtocolFeaturesResponse
      • GetApiSnapshotResponse
      • GetBlockHeaderStateResponse
      • GetBlockResponse
      • GetBlockResponse2
      • GetCodeResponse
      • GetControlledAccountsResponse
      • GetCreatedAccountsResponse
      • GetCreatorResponse
      • GetDeltasResponse
      • GetHealthResponse
      • GetInfoResponse
      • GetKeyAccountsResponse
      • GetKeyAccountsWithPermissionsResponse
      • GetLinksResponse
      • GetMissedBlocksResponse
      • GetProducersResponse
      • GetProposalsResponse
      • GetResourceUsageResponse
      • GetScheduleResponse
      • GetTableByScopeResponse
      • GetTokensResponse
      • GetTransactionResponse
      • GetVotersResponse
Powered by GitBook
On this page
Edit on GitHub
  1. Examples

HistoryClientExample

Example showing how to use the HistoryClient

public async Task HistoryClientExample()
{
    var historyClient = new HistoryClient(new HttpHandler());

    // Query historical Actions of an Account
    var actions = await historyClient.GetActionsAsync(account: "someaccount", limit: 10, cancellationToken: CancellationToken.None);

    // Print diverse Data related to these Actions
    foreach (var action in actions.Actions)
    {
        Console.WriteLine(action.BlockNum);
        Console.WriteLine(action.TrxId);
        Console.WriteLine(action.Act.Name);
        Console.WriteLine(action.Act.Account);
        Console.WriteLine(action.CpuUsageUs);
        Console.WriteLine(action.ActionOrdinal);
        Console.WriteLine(action.CreatorActionOrdinal);
        Console.WriteLine(action.GlobalSequence);
        Console.WriteLine(action.Parent);
        Console.WriteLine(action.Producer);
        Console.WriteLine(action.Receiver);
        Console.WriteLine(action.NetUsageWords);
        Console.WriteLine(action.Timestamp);

        foreach (var notified in action.Notified)
        {
            Console.Write(notified);
        }

        foreach (var accountRamDelta in action.AccountRamDeltas)
        {
            Console.WriteLine(accountRamDelta.Account);
            Console.WriteLine(accountRamDelta.Delta);
        }
    }
}
PreviousChainClientExampleNextStatsClientExample

Last updated 2 years ago

Page cover image