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

fix(docs): mastering providers #7070

Merged
merged 4 commits into from
May 30, 2024
Merged

fix(docs): mastering providers #7070

merged 4 commits into from
May 30, 2024

Conversation

danforbes
Copy link
Contributor

@danforbes danforbes commented May 28, 2024

Improvements to Mastering Provider section

Copy link

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 630.38 kB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
web3.min.js 611.09 kB 0%
../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: eac41c9 Previous: b63af9f Ratio
processingTx 8847 ops/sec (±4.34%) 8492 ops/sec (±5.07%) 0.96
processingContractDeploy 40102 ops/sec (±6.18%) 39518 ops/sec (±6.31%) 0.99
processingContractMethodSend 19153 ops/sec (±8.25%) 18741 ops/sec (±7.77%) 0.98
processingContractMethodCall 39816 ops/sec (±6.13%) 39031 ops/sec (±6.06%) 0.98
abiEncode 43558 ops/sec (±7.32%) 43800 ops/sec (±6.74%) 1.01
abiDecode 30143 ops/sec (±7.61%) 29194 ops/sec (±8.15%) 0.97
sign 1535 ops/sec (±3.45%) 1549 ops/sec (±0.87%) 1.01
verify 374 ops/sec (±0.48%) 368 ops/sec (±0.60%) 0.98

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

@danforbes danforbes changed the title fix(docs): providers fix(docs): mastering providers May 29, 2024
@danforbes danforbes marked this pull request as ready for review May 29, 2024 18:43
Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.17%. Comparing base (b63af9f) to head (5012b56).

Current head 5012b56 differs from pull request most recent head eac41c9

Please upload reports for the commit eac41c9 to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##              4.x    #7070   +/-   ##
=======================================
  Coverage   92.17%   92.17%           
=======================================
  Files         215      215           
  Lines        8335     8335           
  Branches     2301     2301           
=======================================
  Hits         7683     7683           
  Misses        652      652           
Flag Coverage Δ
UnitTests 92.17% <ø> (ø)

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 ∅ <ø> (∅)

@danforbes danforbes merged commit 9086b98 into 4.x May 30, 2024
17 of 18 checks passed
@danforbes danforbes deleted the fix/docs/providers branch May 30, 2024 13:22
``` ts title='Initialize WS Provider'
import { Web3, WebSocketProvider } from 'web3';

//supply a WebSocket provider as a URL string
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
//supply a WebSocket provider as a URL string
// supply a WebSocket provider as a URL string

nitpick: comments should always have a space before the text

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, I completely agree 💯 That doesn't seem to be the case in most of the existing docs, though, so I chose to stay consistent. My next PR will be various formatting nitpicks like that 👍🏻

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.

3 participants