warp-contracts-evaluation-progress-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.17 • Public • Published

Warp Contracts Evaluation Progress Plugin

This plugin allows to listen for contract evaluation progress events.
Compatible only with node.js env.
Requires Warp Contracts SDK ver. min. 1.2.27.

Installation

yarn add warp-contracts-evaluation-progress-plugin

const eventEmitter = new EventEmitter();
eventEmitter.on('progress-notification', (message) => {
  console.log('From listener', message);
});

// will notify every 500 evaluated interactions
module.exports = WarpFactory.forMainnet()
  .use(new EvaluationProgressPlugin(eventEmitter, 500));

The message format is:

{
  "contractTxId": "Daj-MNSnH55TDfxqC7v4eq0lKzVIwh98srUaWqyuZtY",
  "message": "[Daj-MNSnH55TDfxqC7v4eq0lKzVIwh98srUaWqyuZtY]: 7500/9835 [0ms]"
}

Readme

Keywords

none

Package Sidebar

Install

npm i warp-contracts-evaluation-progress-plugin

Weekly Downloads

1

Version

1.0.17

License

MIT

Unpacked Size

5.38 kB

Total Files

10

Last publish

Collaborators

  • redstone-finance