Skip to content

Commit

Permalink
update README, add event log processor info
Browse files Browse the repository at this point in the history
  • Loading branch information
classicalliu committed Sep 6, 2018
1 parent 3cad25b commit 3e7a155
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ $ rails daemons:sync:start
# run `rails daemons:sync:status` to see status
```
## Event Log Processor
Create a yaml file with `.yml` suffix in `config/customs`, see `config/customs/event_log.yml.sample` for more detail. For example, your file name is `contracts.yml`, you can run `bundle exec rake event_log:create[contracts]` to create your table and now restart sync task `bundle exec rake daemons:sync:restart` to listen your contact 😝
We'll both use `address` and `topics` to select the logs by jsonrpc interface [`getLogs`](https://docs.nervos.org/cita/#/rpc_guide/rpc?id=getlogs)
## Deploy
You can deploy this via [mina](https://github.com/mina-deploy/mina)
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/event_log.rake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace :event_log do
desc "create a event log model and migration"
task :create, [:file_name] => :environment do |task, args|
puts EventLogProcess.new(args[:file_name]).create_table
puts EventLogProcessor.new(args[:file_name]).create_table
end
end

0 comments on commit 3e7a155

Please sign in to comment.