> For the complete documentation index, see [llms.txt](https://docs.r.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.r.xyz/glider-ide/api/contract/contract.chain_id.md).

# Contract.chain\_id()

`chain_id() → int`

## Example query

```python
from glider import *

def query():
  contracts = Contracts().exec(5)

  for contract in contracts:
    print(contract.chain_id())

  return contracts
```

## Example output

<figure><img src="/files/JNR0Dk6XDtdiozEqQtW1" alt=""><figcaption></figcaption></figure>
