mysql - Solidity Event logs into HTML Table using Javascript -
i have 2 solidity events
event approved( address indexed from, bytes32 indexed _id, string status, uint timestamp ); event rejected( address indexed from, bytes32 indexed _id, string status, uint timestamp ); and i'm calling javascript
approve = contract.approved({_id: searchelement},{fromblock: 379000, toblock: 'latest'}); reject= contract.rejected({_id: searchelement},{fromblock: 379000, toblock: 'latest'}); and watching like
approve.watch(function(error, result){ if (!error) loadtotable(result); }); reject.watch(function(error, result){ if (!error) loadtotable(result); }); i have total of 3 separate contracts same events in each , call them above in js.
now, problem
1)how load table methods doesn't wait json response fetched, gives empty table have tried.
2) need json response --> 1 value(index:value) --> database operation -->then show in table.
*database operation : result value , search same in db , related column details , populate table.
3)event.allevents() method not working me related geth version ?
i use geth 1.4.11 , please don't suggest upgrade.
i tried dynamic table snippet worked in populating data not modify data.
i tried ajax,promise either used wrong or didn't work me.
thanks in advance
Comments
Post a Comment