Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function startApp(provider) {
const ethQuery = global.ethQuery = new EthQuery(provider)
const blockTracker = new EthBlockTracker({ provider })
blockTracker.on('block', (block) => console.log('block #' + Number(block.number)))
blockTracker.start()
// setup eth-store (blockchain state)
const ethStore = global.ethStore = new EthStore(blockTracker, provider)
global.ethStore = ethStore
// abi-store
const abiStore = global.abiStore = new ObsStore()
// view store (in query params)
const viewStore = global.viewStore = new ObsStore()
// auxillary data store (not in query params)
const auxStore = global.auxStore = new ObsStore({
fromAddress: undefined,