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

web3 external provider - Quicknode #7019

Open
wants to merge 26 commits into
base: 4.x
Choose a base branch
from
Open

Conversation

jdevcs
Copy link
Contributor

@jdevcs jdevcs commented Apr 30, 2024

Description

#6976

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run lint with success and extended the tests and types if necessary.
  • I ran npm run test:unit with success.
  • I ran npm run test:coverage and my test cases cover all the lines and branches of the added code.
  • I ran npm run build and tested dist/web3.min.js in a browser.
  • I have tested my code on the live network.
  • I have checked the Deploy Preview and it looks correct.
  • I have updated the CHANGELOG.md file in the root folder.
  • I have linked Issue(s) with this PR in "Linked Issues" menu.

Copy link

github-actions bot commented Apr 30, 2024

Bundle Stats

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
10 625.57 kB → 630.23 kB (+4.66 kB) +0.75%
Changeset
File Δ Size
../web3-rpc-providers/lib/commonjs/web3_provider.js 🆕 +4.66 kB 0 B → 4.66 kB
../web3-rpc-providers/lib/commonjs/web3_provider_quicknode.js 🆕 +3.9 kB 0 B → 3.9 kB
../web3-rpc-providers/lib/commonjs/index.js 🆕 +1.76 kB 0 B → 1.76 kB
../web3-rpc-providers/lib/commonjs/types.js 🆕 +1.76 kB 0 B → 1.76 kB
src/web3.ts 📈 +91 B (+1.12%) 7.96 kB → 8.05 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
web3.min.js 606.28 kB → 610.94 kB (+4.66 kB) +0.77%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
../lib/commonjs/index.d.ts 8.69 kB 0%
../lib/commonjs/accounts.d.ts 3.89 kB 0%
../lib/commonjs/types.d.ts 2.67 kB 0%
../lib/commonjs/web3.d.ts 1.35 kB 0%
../lib/commonjs/web3_eip6963.d.ts 1.2 kB 0%
../lib/commonjs/abi.d.ts 999 B 0%
../lib/commonjs/eth.exports.d.ts 280 B 0%
../lib/commonjs/providers.exports.d.ts 183 B 0%
../lib/commonjs/version.d.ts 60 B 0%

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: e8b76d6 Previous: 692987a Ratio
processingTx 9142 ops/sec (±4.03%) 8880 ops/sec (±3.76%) 0.97
processingContractDeploy 37170 ops/sec (±7.42%) 38813 ops/sec (±6.13%) 1.04
processingContractMethodSend 19404 ops/sec (±6.37%) 18943 ops/sec (±7.10%) 0.98
processingContractMethodCall 38963 ops/sec (±4.83%) 38006 ops/sec (±5.78%) 0.98
abiEncode 45518 ops/sec (±6.68%) 43737 ops/sec (±6.49%) 0.96
abiDecode 30506 ops/sec (±7.40%) 29525 ops/sec (±8.05%) 0.97
sign 1571 ops/sec (±0.78%) 1523 ops/sec (±3.37%) 0.97
verify 368 ops/sec (±0.68%) 371 ops/sec (±0.54%) 1.01

This comment was automatically generated by workflow using github-action-benchmark.

Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.19%. Comparing base (692987a) to head (e8b76d6).

Additional details and impacted files
@@            Coverage Diff             @@
##              4.x    #7019      +/-   ##
==========================================
- Coverage   92.21%   92.19%   -0.03%     
==========================================
  Files         215      215              
  Lines        8329     8330       +1     
  Branches     2296     2297       +1     
==========================================
- Hits         7681     7680       -1     
- Misses        648      650       +2     
Flag Coverage Δ
UnitTests 92.19% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
web3 ∅ <ø> (∅)
web3-core ∅ <ø> (∅)
web3-errors ∅ <ø> (∅)
web3-eth ∅ <ø> (∅)
web3-eth-abi ∅ <ø> (∅)
web3-eth-accounts ∅ <ø> (∅)
web3-eth-contract ∅ <ø> (∅)
web3-eth-ens ∅ <ø> (∅)
web3-eth-iban ∅ <ø> (∅)
web3-eth-personal ∅ <ø> (∅)
web3-net ∅ <ø> (∅)
web3-providers-http ∅ <ø> (∅)
web3-providers-ipc ∅ <ø> (∅)
web3-providers-ws ∅ <ø> (∅)
web3-rpc-methods ∅ <ø> (∅)
web3-utils ∅ <ø> (∅)
web3-validator ∅ <ø> (∅)

@jdevcs jdevcs marked this pull request as ready for review May 14, 2024 13:53
case Network.ETH_MAINNET:
host = isValid(_host) ? _host : "powerful-holy-bush.quiknode.pro";
token = isValid(_token) ? _token : "3240624a343867035925ff7561eb60dfdba2a668";
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it ok to have tokens here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, these are public tokens

Copy link
Contributor

@luu-alex luu-alex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some feedback.
Integration tests should be created before release of the package

@@ -0,0 +1,66 @@
{
"name": "web3-providers",
"version": "0.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we start at 0.1.0 that would that be considered alpha

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, 1.0.0 will be prod

@jdevcs jdevcs requested review from luu-alex and avkos May 21, 2024 11:00
@luu-alex
Copy link
Contributor

Failing testcases, otherwise it looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants