-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Init web3-rpc-methods
package
#5441
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Your Render PR Server URL is https://web3js-docs-pr-5441.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-cch7slqrrk02bi4tu4l0. |
spacesailor24
requested review from
jdevcs,
nikoulai,
avkos,
luu-alex and
Muhammad-Altabba
September 16, 2022 00:25
spacesailor24
commented
Sep 16, 2022
spacesailor24
commented
Sep 16, 2022
spacesailor24
commented
Sep 16, 2022
spacesailor24
commented
Sep 16, 2022
spacesailor24
commented
Sep 16, 2022
spacesailor24
commented
Sep 16, 2022
avkos
approved these changes
Sep 19, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great 💪
luu-alex
reviewed
Sep 20, 2022
luu-alex
approved these changes
Sep 20, 2022
Co-authored-by: Alex <alex.luu@mail.utoronto.ca>
nikoulai
approved these changes
Sep 23, 2022
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note There are a huge amount of files changed, but most of these files are tests where the only change was an import change to
import { ethRpcMethods } from 'web3-rpc-methods';
This PR pulls out necessary changes for #5426 into a separate PR to reduce the amount of changes that need to be reviewed in a single PR
Why This PR Exists
One of the first problems I ran into when working on #5426 was circular dependencies. This was primarily because certain test utils (e.g. creating and funding accounts) needed to send RPC request to fetch accounts and send transactions (imported via
web3-eth
). Naturally, the test utils that currently exist and the refactor (#5426) are intended to be used by packages such asweb3-eth
, and this is where the circular dependencies start to show up:web3-test-utils -> web3-eth -> web3-test-utils
(Note circular dependencies currently exist with current test utils, they just aren't reported via Lerna/Yarn because the test utils are symlinked into each package instead of actually being apart of each package with their dependencies declared viapackage.json
). This PR alone does not address all the circular dependency issues I discovered while working on #5426, there will be a subsequent PR that depends on this one that will address other issues via aweb3-transaction-utils
packageWhat This PR Does
CHANGELOG.md
s with specific changes are provided below, but as a high level overview:rpc_method_wrappers.ts
that provide niceties such as formatting) are moved from packages:web3-eth
,web3-eth-net
, andweb3-eth-personal
to a new package:web3-rpc-methods
web3-test-utils
from Initweb3-test-utils
Package #5426) to use the RPC method wrappers without having to import packages such asweb3-eth
or having to write one-off RPC method wrappers like so)EthPersonalAPI
Web3EthExecutionAPI
Web3NetAPI
into
web3-types
from their original packages (web3-eth-personal
,web3-eth
, andweb3-net
respectively)web3-eth-ens
Changed
Web3NetAPI
is now imported fromweb3-types
instead ofweb3-types
(Initweb3-rpc-methods
package #5441)web3-eth-personal
Added
web3-rpc-methods
dependency (Initweb3-rpc-methods
package #5441)Changed
EthPersonalAPI
fromweb3-types
instead of local import (Initweb3-rpc-methods
package #5441)rcp_methods.ts
withpersonalRpcMethods
imports fromweb3-rpc-methods
(Initweb3-rpc-methods
package #5441)EthPersonalAPIManager
withWeb3RequestManager<EthPersonalAPI>
(Initweb3-rpc-methods
package #5441)Removed
EthPersonalAPIManager
,EthPersonalAPI
is not exported viaweb3-types
(Initweb3-rpc-methods
package #5441)web3-eth
Added
web3-rpc-methods
dependency (Initweb3-rpc-methods
package #5441)Changed
Web3EthExecutionAPI
is now imported viaweb3-types
instead ofweb3_eth_execution_api.ts
(Initweb3-rpc-methods
package #5441)rpc_methods.ts
withethRpcMethods
imports fromweb3-rpc-methods
(Initweb3-rpc-methods
package #5441)Web3NetAPI
is now imported fromweb3-types
instead ofweb3-net
(Initweb3-rpc-methods
package #5441)rpc_methods
tests toweb3-rpc-methods
(Initweb3-rpc-methods
package #5441)web3-net
Added
web3-rpc-methods
dependency (Initweb3-rpc-methods
package #5441)Changed
Web3NetAPI
is now imported fromweb3-types
instead ofweb3_net_api.ts
(Initweb3-rpc-methods
package #5441)rpc_methods.ts
withnetRpcMethods
imports fromweb3-rpc-methods
(Initweb3-rpc-methods
package #5441)Removed
rpcMethods
export, these methods are now exported viaweb3-rpc-methods
asnetRpcMethods
(Initweb3-rpc-methods
package #5441)Web3NetAPI
export, now exported viaweb3-types
asWeb3NetAPI
(Initweb3-rpc-methods
package #5441)web3-types
Added
Web3EthExecutionAPI
export (Initweb3-rpc-methods
package #5441)Web3NetAPI
export (Initweb3-rpc-methods
package #5441)EthPersonalAPI
export (Initweb3-rpc-methods
package #5441)