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
AlchemyName: Identifies the API identifiers (Alchemy) associated with each network.
36
+
AlchemyNetworkId: Identifies the API identifiers (Alchemy) associated with each network.
37
37
38
38
```
39
-
export enum AlchemyName {
39
+
export enum AlchemyNetworkId {
40
40
Ethereum = "eth",
41
41
Arbitrum = "arb",
42
42
Base = "base",
43
43
}
44
44
```
45
45
46
+
InfuraNetworkId: Identifies the API identifiers (Infura) associated with each network.
47
+
48
+
```
49
+
export enum InfuraNetworkId {
50
+
Arbitrum = "arbitrum",
51
+
Base = "base",
52
+
}
53
+
```
54
+
46
55
NetworkType: Classifies networks based on whether they are Mainnet or Testnet.
47
56
48
57
```
@@ -63,7 +72,7 @@ export enum Layer {
63
72
64
73
Network List Definition
65
74
66
-
The networks.ts file in utils defines an array of Network objects, where each network is described by its chain ID, name, layer, network type, and Alchemy identifier. This array serves as the central configuration point for supported networks.
75
+
The networks.ts file in utils defines an array of Network objects, where each network is described by its chain ID, name, layer, network type, and RPC service identifier (Alchemy or Infura). This array serves as the central configuration point for supported networks.
67
76
68
77
Example Network Configuration
69
78
@@ -73,67 +82,36 @@ Below is an example network configuration, which includes key properties for eac
- Update the SupportedChainIds enum: Add the new chain ID with a unique identifier.
129
107
- Add a corresponding entry in networks.ts: Create a new network object with the required properties such as name, layer, networkType, and alchemyName (if applicable).
130
-
- Define the Alchemy name (if needed): If the new network is supported by Alchemy, add its API identifier to the AlchemyName enum.
108
+
- Define the RPC network Id (if needed): If the new network is supported by Alchemy or Infura, add its API identifier to the AlchemyNetworkId or InfuraNetworkId.
131
109
132
110
Removing a Network
133
111
134
112
- Remove the chain ID from SupportedChainIds.
135
113
- Delete the network entry from networks.ts.
136
-
- Remove its corresponding entry from the AlchemyName enum if no longer needed.
114
+
- Remove its corresponding entry from the AlchemyNetworkId or InfuraNetworkId enum if no longer needed.
0 commit comments