How to use eth-block-tracker - 1 common examples

To help you get started, we’ve selected a few eth-block-tracker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kangarang / tcr-ui / src / sagas / udapp.js View on Github external
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,

eth-block-tracker

A block tracker for the Ethereum blockchain. Keeps track of the latest block.

MIT
Latest version published 6 months ago

Package Health Score

82 / 100
Full package analysis

Popular eth-block-tracker functions

Similar packages