Metamask-extension: Web3 will be deprecated

Created on 30 Aug 2017  Â·  5Comments  Â·  Source: MetaMask/metamask-extension

Adding Web3 to a Javascript program displays the following message in the Chrome console:
"MetaMask: web3 will be deprecated in the near future in favor of the ethereumProvider"

Why should I use this extension to create a website, if it's going to be deprecated in the near future?

Also, it appears that the web3.eth.compile.solidity method has been deprecated. Is there any other way that contracts can be dynamically created client-side?

L01-injection L04-backencore T03-discussion

Most helpful comment

The message is a little confusing. Click the link from the error message and read up on it. web3.js will no longer be injected by metamask, this will have to be provided by the dev. Metamask will provide a provider to plug into to your web3.js instance.

All 5 comments

The message is a little confusing. Click the link from the error message and read up on it. web3.js will no longer be injected by metamask, this will have to be provided by the dev. Metamask will provide a provider to plug into to your web3.js instance.

My javascript code uses the following command to create the web3 object
(after the user has logged into their MetaMask account):
window.web3 = new Web3(web3.currentProvider)
My javascript code then only uses that web3 object, and does not refer to
Web3.
Will I have to make any changes to my code when this deprecation occurs?

On Fri, Sep 1, 2017 at 6:43 PM, Coury Ditch notifications@github.com
wrote:

The message is a little confusing. Click the link from the error message
and read up on it. web3.js will no longer be injected by metamask, this
will have to be provided by the dev. Metamask will provide a provider to
plug into to your web3.js instance.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MetaMask/metamask-extension/issues/1991#issuecomment-326705411,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEyNC6XLUcmi84AhweVOK-Ug8V0wVUScks5seJaygaJpZM4PGucu
.

According to the documentation (https://github.com/ethereum/mist/releases/tag/v0.9.0) what you have there will work.

See the Note for DApp developers! in that link.

I received a conflicting answer on another post (
https://ethereum.stackexchange.com/questions/25651/what-is-the-metamask-workaround-if-web3-is-deprecated),
which indicated that I have to import the Web3 class, and include it with
my own code

Please confirm that I don't have to do anything other than have the user
logged into MetaMask, and create a web3 object in Javascript with the
following command: "window.web3 = new Web3(web3.currentProvider)". Confirm
that I don't have to import any other classes, or do anything else.

On Fri, Sep 1, 2017 at 7:15 PM, Coury Ditch notifications@github.com
wrote:

According to the documentation (https://github.com/ethereum/
mist/releases/tag/v0.9.0) what you have there will work.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MetaMask/metamask-extension/issues/1991#issuecomment-326708493,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEyNC-nPp2_G4rtqBnFaubCterqYDElxks5seJ4agaJpZM4PGucu
.

Closing, as related to #2014

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johnerfx picture johnerfx  Â·  4Comments

kumavis picture kumavis  Â·  3Comments

kumavis picture kumavis  Â·  3Comments

danfinlay picture danfinlay  Â·  3Comments

1blockologist picture 1blockologist  Â·  3Comments