prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Consider adding Chain Id to library
  * Version: 4.0.0-b
  * Python: 3.6.3
  * OS: linux
  
  ### What was wrong?
  
  No clear way to access known chain ids.
  
  ### How can it be fixed?
  
  Proposed syntax
  
  ```
  >>> from web3 import Chains
  >>> Chains.Ropsten.id
  3
  ```
  
  I ran into issues here: https://web3py.readthedocs.io/en/latest/web3.eth.account.html#sign-a-contract-transaction as `buildTransaction()` requires a `chainId`.  I didn't even know the chains had ids.
  
  ```
  >>> unicorn_txn = unicorns.functions.transfer(
  ...     '0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359',
  ...     1,
  ... ).buildTransaction({
  ...     'chainId': 1,
  ...     'gas': 70000,
  ...     'gasPrice': w3.toWei('1', 'gwei'),
  ...     'nonce': nonce,
  ... })
  ```
  
  ### Maybe this will help others
  
  According to this answer https://ethereum.stackexchange.com/a/17101/7187 the chain ids are as follows:
  
  0: Olympic, Ethereum public pre-release testnet
  1: Frontier, Homestead, Metropolis, the Ethereum public main network
  1: Classic, the (un)forked public Ethereum Classic main network, chain ID 61
  1: Expanse, an alternative Ethereum implementation, chain ID 2
  2: Morden, the public Ethereum testnet, now Ethereum Classic testnet
  3: Ropsten, the public cross-client Ethereum testnet
  4: Rinkeby, the public Geth PoA testnet
  42: Kovan, the public Parity PoA testnet
  77: Sokol, the public POA Network testnet
  99: Core, the public POA Network main network
  7762959: Musicoin, the music blockchain
  
  Consider adding Chain Id to library
  * Version: 4.0.0-b
  * Python: 3.6.3
  * OS: linux
  
  ### What was wrong?
  
  No clear way to access known chain ids.
  
  ### How can it be fixed?
  
  Proposed syntax
  
  ```
  >>> from web3 import Chains
  >>> Chains.Ropsten.id
  3
  ```
  
  I ran into issues here: https://web3py.readthedocs.io/en/latest/web3.eth.account.html#sign-a-contract-transaction as `buildTransaction()` requires a `chainId`.  I didn't even know the chains had ids.
  
  ```
  >>> unicorn_txn = unicorns.functions.transfer(
  ...     '0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359',
  ...     1,
  ... ).buildTransaction({
  ...     'chainId': 1,
  ...     'gas': 70000,
  ...     'gasPrice': w3.toWei('1', 'gwei'),
  ...     'nonce': nonce,
  ... })
  ```
  
  ### Maybe this will help others
  
  According to this answer https://ethereum.stackexchange.com/a/17101/7187 the chain ids are as follows:
  
  0: Olympic, Ethereum public pre-release testnet
  1: Frontier, Homestead, Metropolis, the Ethereum public main network
  1: Classic, the (un)forked public Ethereum Classic main network, chain ID 61
  1: Expanse, an alternative Ethereum implementation, chain ID 2
  2: Morden, the public Ethereum testnet, now Ethereum Classic testnet
  3: Ropsten, the public cross-client Ethereum testnet
  4: Rinkeby, the public Geth PoA testnet
  42: Kovan, the public Parity PoA testnet
  77: Sokol, the public POA Network testnet
  99: Core, the public POA Network main network
  7762959: Musicoin, the music blockchain
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `web3/net.py`
  Content:
  ```
  1 from web3.module import (
  2     Module,
  3 )
  4 
  5 
  6 class Net(Module):
  7     @property
  8     def listening(self):
  9         return self.web3.manager.request_blocking("net_listening", [])
  10 
  11     @property
  12     def peerCount(self):
  13         return self.web3.manager.request_blocking("net_peerCount", [])
  14 
  15     @property
  16     def version(self):
  17         return self.web3.manager.request_blocking("net_version", [])
  18
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/web3/net.py b/web3/net.py
  --- a/web3/net.py
  +++ b/web3/net.py
  @@ -12,6 +12,10 @@
       def peerCount(self):
           return self.web3.manager.request_blocking("net_peerCount", [])
   
  +    @property
  +    def chainId(self):
  +        return self.version
  +
       @property
       def version(self):
           return self.web3.manager.request_blocking("net_version", [])
  
verification_info: {"golden_diff": "diff --git a/web3/net.py b/web3/net.py\n--- a/web3/net.py\n+++ b/web3/net.py\n@@ -12,6 +12,10 @@\n     def peerCount(self):\n         return self.web3.manager.request_blocking(\"net_peerCount\", [])\n \n+    @property\n+    def chainId(self):\n+        return self.version\n+\n     @property\n     def version(self):\n         return self.web3.manager.request_blocking(\"net_version\", [])\n", "issue": "Consider adding Chain Id to library\n* Version: 4.0.0-b\r\n* Python: 3.6.3\r\n* OS: linux\r\n\r\n### What was wrong?\r\n\r\nNo clear way to access known chain ids.\r\n\r\n### How can it be fixed?\r\n\r\nProposed syntax\r\n\r\n```\r\n>>> from web3 import Chains\r\n>>> Chains.Ropsten.id\r\n3\r\n```\r\n\r\nI ran into issues here: https://web3py.readthedocs.io/en/latest/web3.eth.account.html#sign-a-contract-transaction as `buildTransaction()` requires a `chainId`.  I didn't even know the chains had ids.\r\n\r\n```\r\n>>> unicorn_txn = unicorns.functions.transfer(\r\n...     '0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359',\r\n...     1,\r\n... ).buildTransaction({\r\n...     'chainId': 1,\r\n...     'gas': 70000,\r\n...     'gasPrice': w3.toWei('1', 'gwei'),\r\n...     'nonce': nonce,\r\n... })\r\n```\r\n\r\n### Maybe this will help others\r\n\r\nAccording to this answer https://ethereum.stackexchange.com/a/17101/7187 the chain ids are as follows:\r\n\r\n0: Olympic, Ethereum public pre-release testnet\r\n1: Frontier, Homestead, Metropolis, the Ethereum public main network\r\n1: Classic, the (un)forked public Ethereum Classic main network, chain ID 61\r\n1: Expanse, an alternative Ethereum implementation, chain ID 2\r\n2: Morden, the public Ethereum testnet, now Ethereum Classic testnet\r\n3: Ropsten, the public cross-client Ethereum testnet\r\n4: Rinkeby, the public Geth PoA testnet\r\n42: Kovan, the public Parity PoA testnet\r\n77: Sokol, the public POA Network testnet\r\n99: Core, the public POA Network main network\r\n7762959: Musicoin, the music blockchain\r\n\nConsider adding Chain Id to library\n* Version: 4.0.0-b\r\n* Python: 3.6.3\r\n* OS: linux\r\n\r\n### What was wrong?\r\n\r\nNo clear way to access known chain ids.\r\n\r\n### How can it be fixed?\r\n\r\nProposed syntax\r\n\r\n```\r\n>>> from web3 import Chains\r\n>>> Chains.Ropsten.id\r\n3\r\n```\r\n\r\nI ran into issues here: https://web3py.readthedocs.io/en/latest/web3.eth.account.html#sign-a-contract-transaction as `buildTransaction()` requires a `chainId`.  I didn't even know the chains had ids.\r\n\r\n```\r\n>>> unicorn_txn = unicorns.functions.transfer(\r\n...     '0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359',\r\n...     1,\r\n... ).buildTransaction({\r\n...     'chainId': 1,\r\n...     'gas': 70000,\r\n...     'gasPrice': w3.toWei('1', 'gwei'),\r\n...     'nonce': nonce,\r\n... })\r\n```\r\n\r\n### Maybe this will help others\r\n\r\nAccording to this answer https://ethereum.stackexchange.com/a/17101/7187 the chain ids are as follows:\r\n\r\n0: Olympic, Ethereum public pre-release testnet\r\n1: Frontier, Homestead, Metropolis, the Ethereum public main network\r\n1: Classic, the (un)forked public Ethereum Classic main network, chain ID 61\r\n1: Expanse, an alternative Ethereum implementation, chain ID 2\r\n2: Morden, the public Ethereum testnet, now Ethereum Classic testnet\r\n3: Ropsten, the public cross-client Ethereum testnet\r\n4: Rinkeby, the public Geth PoA testnet\r\n42: Kovan, the public Parity PoA testnet\r\n77: Sokol, the public POA Network testnet\r\n99: Core, the public POA Network main network\r\n7762959: Musicoin, the music blockchain\r\n\n", "before_files": [{"content": "from web3.module import (\n    Module,\n)\n\n\nclass Net(Module):\n    @property\n    def listening(self):\n        return self.web3.manager.request_blocking(\"net_listening\", [])\n\n    @property\n    def peerCount(self):\n        return self.web3.manager.request_blocking(\"net_peerCount\", [])\n\n    @property\n    def version(self):\n        return self.web3.manager.request_blocking(\"net_version\", [])\n", "path": "web3/net.py"}], "after_files": [{"content": "from web3.module import (\n    Module,\n)\n\n\nclass Net(Module):\n    @property\n    def listening(self):\n        return self.web3.manager.request_blocking(\"net_listening\", [])\n\n    @property\n    def peerCount(self):\n        return self.web3.manager.request_blocking(\"net_peerCount\", [])\n\n    @property\n    def chainId(self):\n        return self.version\n\n    @property\n    def version(self):\n        return self.web3.manager.request_blocking(\"net_version\", [])\n", "path": "web3/net.py"}]}