Constructors
new Network()
name
and chainId
.
Parameters
Parameter | Type | Description |
---|---|---|
name | string | The network name. |
chainId | BigNumberish | The network chain ID. |
Returns
Network
Source
providers/network.ts:48Accessors
chainId
Parameters
Parameter | Type | Description |
---|---|---|
value | BigNumberish | The new network chain ID. |
Returns
bigint
The network chain ID.
Source
providers/network.ts:87name
Parameters
Parameter | Type | Description |
---|---|---|
value | string | The new network name. |
Returns
string
The network name.
Source
providers/network.ts:69Methods
clone()
Returns
Network
A new Network instance.
Source
providers/network.ts:153toJSON()
Returns
any
The JSON representation of the network.
Source
providers/network.ts:58from()
network
name or chainId.
Parameters
Parameter | Type | Description |
---|---|---|
network ? | Networkish | The network to get. |
Returns
Network
The Network instance.
Throws
If the network is invalid.Source
providers/network.ts:165register()
nameOrChainId
with a function which returns an instance of a Network representing that chain.
Parameters
Parameter | Type | Description |
---|---|---|
nameOrChainId | string | number | bigint | The name or chain ID to register. |
networkFunc | () => Network | The function to create the Network. |
Returns
void
Throws
If a network is already registered fornameOrChainId
.