Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Replace private _config with public config in web3_config.ts - #5950

Merged
Spacesai1or merged 5 commits into
4.xfrom
wyatt/4.x/5802-contract-web3context
Mar 28, 2023
Merged

Replace private _config with public config in web3_config.ts#5950
Spacesai1or merged 5 commits into
4.xfrom
wyatt/4.x/5802-contract-web3context

Conversation

@Spacesai1or

@Spacesai1or Spacesai1or commented Mar 24, 2023

Copy link
Copy Markdown
Contributor

Issue #5802 was fixed by making Web3Config.config a public property instead of forcing the use of the getter method getConfig (addresses the issue brought up in the beginning of this comment). I think ideally we'd want to keep Web3Config.config private and replace getConfig and setConfig with a standard getter and setter, but this wouldn't fix #5802 because Contract spreads the provided Web3Context which causes providerOrContext to be a simple object rather than an instance of Web3Config where the getter for _config would be available. This could be accounted for, but in doing so a substantial amount of changes were needed and I opted to go the route of fewer changes to fix #5802


Removed

web3-core

closes #5802

@Spacesai1or Spacesai1or added the 4.x 4.0 related label Mar 24, 2023
@Spacesai1or Spacesai1or self-assigned this Mar 24, 2023
@github-actions

github-actions Bot commented Mar 24, 2023

Copy link
Copy Markdown

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

Asset Old size New size Diff Diff %
Total 1.06 MB 1.06 MB 851 bytes 0.08%
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 Old size New size Diff Diff %
web3.min.js 1.05 MB 1.05 MB 851 bytes 0.08%
../lib/accounts.d.ts 3.42 KB 3.42 KB 0 0.00%
../lib/types.d.ts 1.68 KB 1.68 KB 0 0.00%
../lib/types.d.ts.map 1.51 KB 1.51 KB 0 0.00%
../lib/abi.d.ts 999 bytes 999 bytes 0 0.00%
../lib/index.d.ts.map 919 bytes 919 bytes 0 0.00%
../lib/index.d.ts 899 bytes 899 bytes 0 0.00%
../lib/web3.d.ts 842 bytes 842 bytes 0 0.00%
../lib/web3.d.ts.map 694 bytes 694 bytes 0 0.00%
../lib/accounts.d.ts.map 528 bytes 528 bytes 0 0.00%
../lib/eth.exports.d.ts.map 358 bytes 358 bytes 0 0.00%
../lib/eth.exports.d.ts 321 bytes 321 bytes 0 0.00%
../lib/providers.exports.d.ts.map 292 bytes 292 bytes 0 0.00%
../lib/providers.exports.d.ts 238 bytes 238 bytes 0 0.00%
../lib/version.d.ts.map 140 bytes 140 bytes 0 0.00%
../lib/abi.d.ts.map 124 bytes 124 bytes 0 0.00%
../lib/version.d.ts 97 bytes 97 bytes 0 0.00%

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 24, 2023

Copy link
Copy Markdown

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 39b5f2e
Status: ✅  Deploy successful!
Preview URL: https://3bba7b24.web3-js-docs.pages.dev
Branch Preview URL: https://wyatt-4-x-5802-contract-web3.web3-js-docs.pages.dev

View logs

@codecov

codecov Bot commented Mar 24, 2023

Copy link
Copy Markdown

Codecov Report

Merging #5950 (39b5f2e) into 4.x (9e3f3c0) will increase coverage by 0.09%.
The diff coverage is 77.04%.

Additional details and impacted files
@@            Coverage Diff             @@
##              4.x    #5950      +/-   ##
==========================================
+ Coverage   82.04%   82.14%   +0.09%     
==========================================
  Files         137      137              
  Lines        5983     5981       -2     
  Branches     1572     1572              
==========================================
+ Hits         4909     4913       +4     
+ Misses       1074     1068       -6     
Flag Coverage Δ
UnitTests 82.14% <77.04%> (+0.09%) ⬆️

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

@Spacesai1or
Spacesai1or merged commit dd33e17 into 4.x Mar 28, 2023
@Spacesai1or
Spacesai1or deleted the wyatt/4.x/5802-contract-web3context branch March 28, 2023 03:27
@jdevcs jdevcs mentioned this pull request Apr 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

4.x 4.0 related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants