No Longer Injecting web3.js

Bobby Dresser
Oct 31 · 1 min read

This is one of the breaking changes we’re making on January 13, 2020. Click here for more details.

As of January 13, 2020, MetaMask will no longer inject the web3.js API. You can still bring your own web3.js or similar library and use it with MetaMask. We will simply stop injecting a particular version of web3.js for you.

We’ve primarily included web3.js as a convenience alongside MetaMask’s core Ethereum provider API, which wraps the JSON-RPC API and is documented here.

Removing web3.js is part of an effort to simplify MetaMask’s API and provide the safest, most stable experience possible.

Why are we doing this? What does this mean for you?

MetaMask currently injects web3@0.20.x, which is no longer receiving fixes or updates. The 0.20.x version also lacks some safety validations that have caused trouble for our users.

While upgrading web3.js to 1.0.x is an option, the upgrade would require breaking changes.

Furthermore, web3@2.0.0 is already a scheduled breaking change, so rather than subject our users to a series of breaking changes, we are finally putting version choice firmly in the hands of developers so we can minimize the number of breaking changes in the future.

You can still bring your own convenience library and use it with the MetaMask inpage provider, whether ethers.js, web3.js, or something else.

Conclusion

Removing our injected version of web3.js will help us continue to provide a safe, performant experience for developers while managing our maintenance costs. Starting January 13, 2020, dapps will have to bring their own convenience library of they want to use one.

MetaMask

MetaMask is a bridge that allows you to visit the distributed web of tomorrow in your browser today. It allows you to run Ethereum dApps right in your browser without running a full Ethereum node.

Bobby Dresser

Written by

den sweeper @ MetaMask 🦊

MetaMask

MetaMask

MetaMask is a bridge that allows you to visit the distributed web of tomorrow in your browser today. It allows you to run Ethereum dApps right in your browser without running a full Ethereum node.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade