upchain-web3-event-log
v3.1.2
Published
Parses a web3 transaction log for specific events
Downloads
4
Readme
Event log
Parses the ethereum blockchain transaction log for specific events
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