Skip to content
Permalink
Browse files

subcribe when have new event

  • Loading branch information...
khaihkd committed Jul 21, 2018
1 parent daf6e86 commit 0735bdbacd41651410106371741401927486c13e
Showing with 10 additions and 0 deletions.
  1. +10 −0 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.
You can’t perform that action at this time.