Skip to content

Document querying our event store and setting up one #210

Description

@andreipope

Document querying our event store and setting up one

Activity

  1. pathornteng commented on May 21, 2019

    @pathornteng

    Event Store allows users to query events emitted from contracts running on our chain.

    The following is the config to enable Event Store

    EventStore:
      DBName: {{.EventStore.DBName}} // Set DB name (can be anything, default is events)
      DBBackend: {{.EventStore.DBBackend}} // Set DB type 'goleveldb' or 'cleveldb'
    {{end}}
    
    EventDispatcher:
      Dispatcher: {{.EventDispatcher.Dispatcher}} // Available dispatcher: "db_indexer" | "log" | "redis"
      # Redis will be use when Dispatcher is "redis"
      Redis:
        URI: "{{.EventDispatcher.Redis.URI}}"// Redis URI
    

    Config example

    EventDispatcher:
      Dispatcher: db_indexer
    
    EventStore:
      DBName: "event"
      DBBackend: "goleveldb"
    

    Now you can query emitted event fromBlock to toBlock

    https://plasma.dappchains.com/query/contractevents?fromBlock=5216332&toBlock=5216352

  2. self-assigned this
    on Jun 12, 2019
  3. andreipope commented on Jul 9, 2019

    @andreipope
    CollaboratorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions