Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially replace the use of eth-lib #4390

Merged
merged 6 commits into from
Sep 26, 2021
Merged

Conversation

spacesailor24
Copy link
Contributor

We're making an effort to replace the usage of one-off libraries with official @ethereumjs libraries, and we're doing it one library at a time to reduce the chance of breaking changes

In this PR we're partially replacing the use of eth-lib, by updating the hashing methods, but keeping the methods used for account generation and signatures. We'll need to have further discussion around these since there's no replacement provided by @ethereumjs

@spacesailor24 spacesailor24 added the 1.x 1.0 related issues label Sep 26, 2021
@spacesailor24 spacesailor24 self-assigned this Sep 26, 2021
@render
Copy link

render bot commented Sep 26, 2021

@lgtm-com
Copy link

lgtm-com bot commented Sep 26, 2021

This pull request introduces 1 alert when merging dfa23a0 into 977f0f9 - view on LGTM.com

new alerts:

  • 1 for Missing variable declaration

@coveralls
Copy link

coveralls commented Sep 26, 2021

Pull Request Test Coverage Report for Build 1274222255

  • 3 of 9 (33.33%) changed or added relevant lines in 2 files are covered.
  • 416 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-2.4%) to 72.545%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/web3-eth-accounts/src/index.js 1 3 33.33%
packages/web3-utils/src/utils.js 2 6 33.33%
Files with Coverage Reduction New Missed Lines %
packages/web3-core-requestmanager/src/jsonrpc.js 1 88.0%
packages/web3-core-helpers/src/formatters.js 23 81.4%
packages/web3-core-helpers/src/errors.js 31 4.41%
packages/web3-utils/src/soliditySha3.js 55 5.13%
packages/web3-utils/src/index.js 62 29.31%
packages/web3-utils/src/utils.js 83 12.86%
packages/web3-eth-accounts/src/index.js 161 23.77%
Totals Coverage Status
Change from base Build 1268465223: -2.4%
Covered Lines: 3355
Relevant Lines: 4367

💛 - Coveralls

@spacesailor24 spacesailor24 merged commit 2279a67 into 1.x Sep 26, 2021
@spacesailor24 spacesailor24 deleted the wyatt/replace-eth-lib branch September 26, 2021 02:31
spacesailor24 added a commit that referenced this pull request Sep 26, 2021
* Replace usage of eth-lib with etheruemjs-util for hashing in web3-eth-accounts

* Replace usafe of eth-lib with etheruemjs-util for hashing in web3-utils

* Update web3.utils tests

* Add etheruemjs-util as dev dependency for use in tests

* Update CHANGELOG

* Fix typo in packages/web3-utils/src/utils.js
@spacesailor24 spacesailor24 mentioned this pull request Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants