Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Updates Web3 to v1.x #572
Goals of this PR
This PR intends to update the Web3 dependency in ZeppelinOS from v0.x to v1.x. It does not intend to upgrade Truffle v4.x to v5.x tho, so you will see, especially in tests, that Web3 v0.x is coexisting with Web3 v1.x. If this sounds weird, it's because it is, but it's not that bad. Another PR that updates Truffle to v5 should remove this bizarre intermediate state. Also note that this PR simply attempts to "make the code run" with Web3 v1 and does not focus on design changes, i.e. it does not yet take advantage of several design optimizations that could be implemented because of the way Web3 v1 works, and how it's typed. Another PR should focus on this specifically and hopefully remove a lot of code that will no longer be needed.
Changes that you will see in the code:
This should be helpful for reviewing, and also should be very informative to understand what actually changed and how to use Web3 v1 in the code in the future.
@spalladino, to answer your question:
In this PR, it might complicate things. I'd say we do it in a different PR, or at least after all tests pass in this PR.
Rebased to master with some important changes to note:
A recent change from master, in Transactions.ts transformed checks like
Since Web3 uses checksummed addresses and that I had to checksum the addresses in Addresses.ts