Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

0

Hello welcome to SO community. web3.js documentation: https://web3j.readthedocs.io/en/latest/getting_started.html Few things: Sample code: A simple browser side implementation : GitHub Hope this helps


0

Install and use truffle-hdwallet-provider to create a provider using your mnemonic and the infura endpoint. You can then pass this provider while creating instance of Web3: const HDWalletProvider = require("truffle-hdwallet-provider"); const provider = new HDWalletProvider( mnemonic, 'https://ropsten.infura.io/v3/MY_API_KEY' ); const web3 = new Web3(...


0

I understand you problem, this is due to API version change between Infura and Web3. Please try to match the version of Web3 API with Infura.


0

Add a filter to the call with fromblock > 0: contract.getPastEvents("allEvents", { fromBlock: 1}).then(console.log);


0

I solved it by downgrading to web3.1.0.0-beta.37. This is the latest release I could find which doesn't have this problem.


Top 50 recent answers are included