0

When creating a site with MetaMask, you also want that other users who do not have MetaMask can use this site. To do this, you want to use the same library MetaMask uses - which is 0.20.3 currently.

I cannot find 0.20.3. I checked GitHub releases. Version 1.0.0-beta is up, and older versions do not hit 0.20.3

Where can I find this web3 version?

0

Metamask injects in the page web3 and you can use this one without including any web3 scripts in your page.

web3 = new Web3(web3.currentProvider);

You can check for metamask and alert message to the user if he donesn't have.

if (typeof web3 !== 'undefined') {
    web3 = new Web3(web3.currentProvider);
} else {
    alert('Please install metamask', 'Metamask!');
}
| improve this answer | |
  • I have this already, thanks. However, I want that people who do NOT have MetaMask installed also being able to use web3. This means that they can VIEW data in a contract, but not interact with it since they have not connected an account. – JBrouwer Mar 19 '18 at 16:06
  • 1
    Ok then you can try with NPM. Type in terminal "npm install web3@0.20.1" – Ivan Abadzhiev Mar 19 '18 at 16:12
  • Neat, that works! – JBrouwer Mar 20 '18 at 1:17
  • We want 1.0rc is it fine to use? – Eddie Feb 12 '19 at 1:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.