> ## Documentation Index
> Fetch the complete documentation index at: https://tonutils.ness.uz/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Contract Information

> Retrieve contract balance, state, code, data, and last transaction metadata.

This example shows how to retrieve full contract details, including balance, state, code, data, and last transaction metadata, using the `get_info` method available on every client.

## Example

```python theme={"theme":{"light":"github-light-default","dark":"dark-plus"}}
from ton_core import NetworkGlobalID

from tonutils.clients import ToncenterClient

# Contract address to inspect
CONTRACT_ADDRESS = "EQ..."


async def main() -> None:
    client = ToncenterClient(network=NetworkGlobalID.MAINNET)
    await client.connect()

    info = await client.get_info(CONTRACT_ADDRESS)

    print(f"Balance: {info.balance}")
    print(f"State: {info.state}")
    print(f"Has code: {info.code is not None}")
    print(f"Has data: {info.data is not None}")
    print(f"Last Transaction LT: {info.last_transaction_lt}")
    print(f"Last Transaction Hash: {info.last_transaction_hash}")

    await client.close()


if __name__ == "__main__":
    import asyncio

    asyncio.run(main())
```

## ContractInfo Fields Overview

| Field | Type | Description |
| - | - | - |
| `code_raw` | `str \| None` | Hex-encoded BoC of the contract code, or `None` if absent. |
| `data_raw` | `str \| None` | Hex-encoded BoC of the contract data, or `None` if absent. |
| `balance` | `int` | Current balance of the contract in nanotons. |
| `state` | `ContractState` | Contract lifecycle state (enum from `ton_core`): `ACTIVE` (deployed and operational), `FROZEN` (frozen due to storage-fee debt), `UNINIT` (address exists but code is not deployed), `NONEXIST` (no balance or state). |
| `code` | `Cell \| None` | Contract code parsed from `code_raw`, or `None` if absent (property). |
| `data` | `Cell \| None` | Contract data parsed from `data_raw`, or `None` if absent (property). |
| `last_transaction_lt` | `int \| None` | Logical time (LT) of the most recent transaction, or `None`. |
| `last_transaction_hash` | `str \| None` | Hash of the most recent transaction, or `None`. |
| `state_init` | `StateInit` | `StateInit` combining `code` and `data` (property). |


## Related topics

- [Wallet Operations](/guide/examples/wallet-operations.md)
- [Get Contract Code and Data](/how-to/get-contract-code-and-data.md)
- [Get NFT Item Address](/how-to/get-nft-item-address.md)
- [Get Jetton Wallet Address](/how-to/get-jetton-wallet-address.md)
- [Usage Scenarios](/guide/usage-scenarios.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.