I have a dapp running on rinkeby at the moment, you can try it now on cryptogol.io, but I am facing a problem when reading events from the Blockchain. For example, yesterday I make the events happens
, so everyone can interact with the site. Here is the code for listening to the event (it is being ran every time someone opens the page at www.cryptogol.io/market.html:
listenForEvents: function() {
console.log("escuchando")
App.contracts.KickerADN.deployed().then(function(instance) {
instance.AdnCreated({}, {
fromBlock: 0,
toBlock: 'latest'
}).watch(function(error, event) {
App.loadBody(event.args._adn.toNumber());
});
});
}
When you open the page it can take more than 1 minute to load the event. The function is being called normally but the event is not getting it on time. Any idea?