upchain-web3-event-log

3.1.2 • Public • Published

Event log

Parses the ethereum blockchain transaction log for specific events

npm version Build Status npm

Browser

Require from CDN

<script src="https://cdn.rawgit.com/Upchain/upchain-web3-http-provider/v3.1.0/dist/bundle.js" ></script>

The JS code is stored in window.upchainWeb3EventLog.

// set it up
var resolveEvent = upchainWeb3EventLog(web3mock, [Loan, LoanRegistry]).resolveEvent;
 

Use the repo

Install for development

upcoming

npm install upchain-web3-event-log

Use

** We were not really sure all that i a good way. It worked for us, so we decided to document and release it**

//include it
var web3EventLog = require('../lib/upchain-web3-event-log');
// set it up
var resolveEvent = web3EventLog(web3mock, [Loan, LoanRegistry]).resolveEvent;
 
var loanRegistry = LoanRegistry.deployed();
loanRegistry
  .createLoan(notional,description,blobHex)
  .then(resolveEvent('NewLoan(Loan)')); // Pass the constructor and wait
  .then(function() {
    // your code goes here
  });
 

More

  • npm test - a bunch of mocha tests
  • a [.travis.yml] config is provided
  • we support all up from node 6.3.1 to 6.50

Readme

Keywords

none

Package Sidebar

Install

npm i upchain-web3-event-log

Weekly Downloads

0

Version

3.1.2

License

MIT

Last publish

Collaborators

  • sebs