diff --git a/README.md b/README.md index 5b33e2e..40ca981 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/lib/tasks/event_log.rake b/lib/tasks/event_log.rake index 2ea6721..399c9a4 100644 --- a/lib/tasks/event_log.rake +++ b/lib/tasks/event_log.rake @@ -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