You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a list of potential improvements for the network-manager plugin, broken down into key areas for clarity. Request modifiers aren’t covered in this issue.
Types
Align types with Hardhat v2 for easier migration. HttpNetwork types seem fine, but EDRNetwork types should be double-checked.
Don’t expose Undici.Dispatcher, even in tests. Maybe we could create a custom type for the dispatcher.
Emit Hardhat network events.
Cleanup the overloads in fetchJsonRpcResponse.
NetworkManager Implementation
Fix: reassigning this.#hookManager shouldn’t be necessary.
Reevaluate how networkConfigOverride works in the connect function.
General Cleanup
Rename networkConfig.type to networkConfig.connectionType and use constants for values.
Use constants for the chainType values.
Update readonly properties in network and provider classes to use Readonly<T>.
Improve typing for getRequestParams (currently returns any[]).
There are some utilities in network-manager/rpc that are used by the request-modifiers. We should analyze if it's worth moving any of this to hardhat-utils.
Decide if anything needs to be done for the console logger.
Address comments in utils/convert-to-edr.
The text was updated successfully, but these errors were encountered:
Here's a list of potential improvements for the
network-manager
plugin, broken down into key areas for clarity. Request modifiers aren’t covered in this issue.Types
HttpNetwork
types seem fine, butEDRNetwork
types should be double-checked.PR: #6031
Config Validation
z
schemas match their defined types.configOverrides
in theNetworkManager.connect()
method, we should remove all the user schemas.sensitiveUrlSchema
when needed (covered in Type Mismatch in Network Fields UsingconfigVariable
#5907).Config Resolution
EDR
config (covered in Improve EDR config resolution #5961):hardfork
.forkConfig
.PR: #6031
EDR Provider
NetworkManager
class and add a hook to allow plugins to register new factories."l1"
is passed to EDR (currently limited to"generic"
or"optimism"
).send
andsendAsync
to avoid duplication.close()
to avoid memory leaks (covered in EDR garbage collection in multi-chain cases #5962).Http Provider
Undici.Dispatcher
, even in tests. Maybe we could create a custom type for the dispatcher.fetchJsonRpcResponse
.NetworkManager Implementation
this.#hookManager
shouldn’t be necessary.networkConfigOverride
works in theconnect
function.General Cleanup
networkConfig.type
tonetworkConfig.connectionType
and use constants for values.chainType
values.readonly
properties innetwork
andprovider
classes to useReadonly<T>
.getRequestParams
(currently returnsany[]
).network-manager/rpc
that are used by the request-modifiers. We should analyze if it's worth moving any of this tohardhat-utils
.console logger
.utils/convert-to-edr
.The text was updated successfully, but these errors were encountered: