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

Document querying our event store and setting up one #210

Open
andreipope opened this issue May 17, 2019 · 2 comments
Open

Document querying our event store and setting up one #210

andreipope opened this issue May 17, 2019 · 2 comments

Comments

@andreipope
Copy link
Collaborator

Document querying our event store and setting up one

@pathornteng
Copy link

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

@andreipope
Copy link
Collaborator Author

#214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants