Skip to content

XLNT/scry-one

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 node url
    [/* 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.

About

A really resilient Ethereum log awaiter in typescript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published