()
| 297 | /// Register popular Ethereum networks |
| 298 | function registerEth(name, chainId, options) { |
| 299 | const func = function () { |
| 300 | const network = new Network(name, chainId); |
| 301 | // We use 0 to disable ENS |
| 302 | if (options.ensNetwork != null) { |
| 303 | network.attachPlugin(new EnsPlugin(null, options.ensNetwork)); |
| 304 | } |
| 305 | network.attachPlugin(new GasCostPlugin()); |
| 306 | (options.plugins || []).forEach((plugin) => { |
| 307 | network.attachPlugin(plugin); |
| 308 | }); |
| 309 | return network; |
| 310 | }; |
| 311 | // Register the network by name and chain ID |
| 312 | Network.register(name, func); |
| 313 | Network.register(chainId, func); |
no test coverage detected