We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged


Since solidity 0.5 keccak256 is expecting bytes as input and you are passing an uint. You can use abi.encodePacked to convert an arbitrary input to bytes. keccak256(abi.encodePacked( (rw() / (10**20) ) % (10**12) ) )


I'm not the strongest player in this dialect, but this looks familier: await instance.purchaseTokens.call('12'); Try adding transaction arguments (gas, gasPrice, value) like this: await instance.purchaseTokens.call({value: <amount>}); call is probably wrong, so: `await instance.purchaseTokens({value: }); Hope it helps. p.s. If there are ...


I had the same issue, in my case the problem was that I was using a wrong API key. In you Infura dashboard check if you are using the correct one, the one for the Ropsten network. And as jfviray said pass the Infura API url with https.

Top 50 recent answers are included