0.0.1 • Published 6 years ago

@xlnt/scry-one v0.0.1

Weekly downloads
1
License
Apache-2.0
Repository
-
Last release
6 years ago

scry-one

A Magic the Gathering themed ethereum event awaiter that supports confirmations and is very resilient against geth/parity irregularities.

Usage

npm install --save @xlnt/scry-one
new Watcher(
    'http://127.0.0.1:8545',  // your
    [/* An array of ABIs that you might be searching against. */],
    2,   // how many confirmations do you need?
    500  // the interval with which you'd like to poll your node
)

and then give it a txHash somehow

const log = await watcher.scry(txHash, 'MyEvent')

console.log(`
    Found log:      ${log.fullName}
    with arguments: ${JSON.stringify(log.args)}
    in txHash:      ${txHash}
`)

... that's about it.

See examples/test.js for more info.