CryptoFly.us | CRYPTOCURRENCY BITCOIN SHIRTS CLOTHING APPAREL HATS

CRYPTO NEWS

Altcoin Roundup: Holding Bitcoin? Here’s how to put it to work in DeFi

BTC is back at all-time highs, meaning it’s even easier for holders to capitalize on the lucrative yield opportunities DeFi offers to investors who are willing to stake their tokens.

Solidity event function not appearing in web3

I have a contract with the following event (using 0.4.24): event UpdateProgress(bool _gameInProgress); I am registering the contract like this: import Web3 from ‘web3’; import address from ‘./address’; const web3 = new Web3(window.web3.currentProvider); const abi = [{…}} // Access to our contract that exists on the blockchain. export default new web3.eth.Contract(abi, address); When I call::Listen

I have a contract with the following event (using 0.4.24):

event UpdateProgress(bool _gameInProgress); 

I am registering the contract like this:

import Web3 from 'web3'; import address from './address';  const web3 = new Web3(window.web3.currentProvider); const abi = [{...}}   // Access to our contract that exists on the blockchain. export default new web3.eth.Contract(abi, address); 

When I call the events object in my JS:

// Contract import leaderboard from './leaderboard';   console.log(leaderboard.events.allEvents()); 

All events is empty. What am I doing incorrect here?

Altcoin Roundup: Holding Bitcoin? Here’s how to put it to work in DeFi

Shopping cart
There are no products in the cart!
Continue shopping
0