Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. > var theDAOVotedEvent = theDAO.Voted({}, {fromBlock: 1614771, toBlock: 'latest'});
  2. undefined
  3. theDAOVotedEvent.watch(function(error, result){
  4. console.log(JSON.stringify(result));
  5. //call a contract's function. (this should called only one time)
  6. });
  7.  
  8. {"address":"0xbb9bc244d798123fde783fcc1c72d3bb8c189413","args":{"position":false,"proposalID":"11","voter":"0xebbf5d7d649aedde2c27a8b850a2a3862595eb53"},"blockHash":"0x69be968ce90c7e910c149cc80ab1e5f2ae6bdb45f142ee0e6fa181be9d1e106e","blockNumber":1614812,"event":"Voted","logIndex":0,"transactionHash":"0x6b5cab6f7987d7283fdde051c76ace98c9f080bda6dbdf720689fc0c3958005b","transactionIndex":2}
  9. ...
  10.  
  11. where_it_was_last_checked=`eth.syncing.currentBlock`;
  12. var theDAOVotedEvent = theDAO.Voted({}, {fromBlock:where_it_was_last_checked, toBlock: 'latest'});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement