Is it possible to watch for event triggers when the actual event and trigger is defined in a library? I get no console output with the following code
library ObjectHistoryLib {
event SerialObjEvent(
bytes32 description,
bytes32 repair,
uint indexed serialIndex
);
function setObj(address _storageContract, uint serialId, bytes32 description, bytes32 repair) {
SerialObjEvent(description, repair, serialId);
}
}
I then place a watch on the "SerialObjEvent" using truffle web3 syntax
var histLib = ObjectHistoryLib.deployed();
var objQuery = histLib.SerialObjEvent({}, {fromBlock: 10, toBlock: 'latest' });
objQuery.watch(function (error, result) { console.log(JSON.stringify(result)); });
But I get no output when I call the setObj function