Options
All
  • Public
  • Public/Protected
  • All
Menu

Module view/pages/LogPage

Type aliases

EventsAction

EventsAction: object

Type representing newly loaded events

Type declaration

  • newEvents: EventLog<any, string>[]

    Array of newly loaded events

  • newFromBlock: number

    Number of block from which the new events were loaded

EventsLog

EventsLog: object

Type representing currently loaded events

Type declaration

  • events: EventLog<any, string>[]

    Array of loaded events

  • fromBlock: number

    Number of block from which there are all events loaded

Functions

Const LogPage

  • LogPage(): Element
  • React Component representing separate page (different than default GamePage), which shows log of actions taken by all the players in recent time. Older actions can be loaded by clicking the appropriate button.

    Returns Element

Const eventsReducer

  • eventsReducer(__namedParameters: object, __namedParameters: object): EventsLog
  • Reducer function which concatenates old array of events with the new one, and updates number of block from which there are all relevant events loaded.

    Parameters

    • __namedParameters: object
      • events: EventLog<any, string>[]
      • fromBlock: number
    • __namedParameters: object
      • newEvents: EventLog<any, string>[]
      • newFromBlock: number

    Returns EventsLog

Const parseEvent

  • parseEvent(event: EventLog<any, string>): object
  • Helper function for parsing event data from the blockchain to the presentable form.

    Parameters

    • event: EventLog<any, string>

      Event data as obtained from MetaMask

    Returns object

    • address: string
    • blockNumber: number
    • description: string
    • id: null | string
    • transaction: string

Generated using TypeDoc