Всем добрый вечер, а может кто-нибудь подсказать в чем у меня заминка с прослушкой ивентов в солидити?
SOL file:
event HeroWasBought(uint heroId);
function buyHero(uint _heroId) public {
HeroWasBought(_heroId);
}
JS file:
App.contracts.Heroes.HeroWasBought().watch((error, result) => {
console.log('RESULT = ', error, result)
});
That watcher is called here in bind method:
App.contractsService.getContractJson('Heroes').then((contractJson) => {
const heroesContract = web3.eth.contract(contractJson.abi);
App.contracts.Heroes =
heroesContract.at(App.heroContractAddress);
App.bindContractsEvents();
});
консоль пустая, ошибок тоже никаких (