Skip to content

Commit

Permalink
subcribe when have new event
Browse files Browse the repository at this point in the history
  • Loading branch information
khaihkd committed Jul 21, 2018
1 parent daf6e86 commit 0735bdb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions subscribe.js
@@ -0,0 +1,10 @@
'use strict'

const db = require('./models/mongodb')
const q = require('./queues')
const web3 = require('./models/blockchain/chain')


web3.eth.subscribe('logs', {address: config.get('tomoAddress')}, {}, function (error, sync) {
console.log(error, sync)
})

0 comments on commit 0735bdb

Please sign in to comment.