SuperblocksHQ / ethereum-studio

Official Ethereum Studio project repository. And IDE specially tailored to make it as simple as possible to onboard new users into the Ethereum ecosystem
https://ethereum.org/build/
GNU General Public License v3.0
186 stars 103 forks source link

Update to a more modern web3 library #236

Open samajammin opened 4 years ago

samajammin commented 4 years ago

Summary

The app currently uses v0.20.7 of web3.js. We should upgrade this to use a more modern web3 library (0.20 has been superseded by 1.2 for a long time, and it has a nicer interface).

Motivation

Since Ethereum Studio's core purpose is to onboard Ethereum developers, we should be using the latest & best (stable) tools available. We shouldn't teach approaches & patterns that will change when they go to set up a local dev environment.

Describe alternatives you've considered

Should we also consider using ethers.js? It's adoption has grown significantly & is now recommended as the convenience library of choice by some wallet projects (like MetaMask).

Additional context

ChrisChinchilla commented 4 years ago

@samajammin I am about to start work on the docs for ethers, might be a good time to refactor our tutorials to use it…

samajammin commented 4 years ago

@ChrisChinchilla as in you'll be working to update the ethers docs?

ChrisChinchilla commented 4 years ago

@samajammin yup

ChrisChinchilla commented 4 years ago

And then we can rework the templates to use it, but the library is about to have a major new release, so might as well wait for that first I guess. I can use the templates as guidance and examples while I rewrite the docs too, that's a nice idea.

samajammin commented 4 years ago

@javier-tarazaga I'm curious to hear your thoughts on this. From a quick glance through the codebase, it looks like there's many areas that web3.js interacts with.

Do you have any sense of how big of an undertaking these would be: A) Upgrading the project to use web3 v1.2? B) Upgrading the project to use ethers?

The difficulty of the 2 options may help guide the decision here.

javier-tarazaga commented 4 years ago

Yeap makes total sense to update this version. The one we are currently using internally it is SUPER old and should be updated to the latest working version.

lovrobiljeskovic commented 4 years ago

@samajammin I am currently working on this and I tried bumping the web3.js to latest on a remote branch, so far I can tell that at least the templates will have to be updated, but that shouldnt be too big of a deal I think.