> For the complete documentation index, see [llms.txt](https://docs.satoshiterminal.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.satoshiterminal.io/resources/copy-of-defi-analytics/governance-analytics/smart-contract-dependency-tracking.md).

# Smart Contract Dependency Tracking

**Implementation Details**

**Class Names**

| Model Name                 | Parameters Class              | Data Class             |
| -------------------------- | ----------------------------- | ---------------------- |
| ContractDependencyTracking | ContractDependencyQueryParams | ContractDependencyData |

**Import Statement**

```python
pythonCopyEditfrom satoshi_terminal.models.smart_contract_dependency_tracking import (
    ContractDependencyTracking,
    ContractDependencyQueryParams,
    ContractDependencyData,
)
```

***

**Parameters**

| Name              | Type                    | Description                                                 | Default | Optional |
| ----------------- | ----------------------- | ----------------------------------------------------------- | ------- | -------- |
| contract\_address | Union\[str, List\[str]] | Address(es) of smart contracts to analyze for dependencies. | None    | False    |
| dependency\_depth | int                     | Depth of dependency mapping for smart contracts.            | 3       | True     |
| include\_indirect | bool                    | Include indirect dependencies in the analysis.              | True    | True     |

***

**Data**

| Name                     | Type       | Description                                                |
| ------------------------ | ---------- | ---------------------------------------------------------- |
| contract\_address        | str        | Address of the contract analyzed.                          |
| dependency\_map          | dict       | Visual-ready map of contract dependencies.                 |
| critical\_dependencies   | List\[str] | List of critical dependencies and their risk levels.       |
| risk\_propagation\_score | float      | Estimated risk score based on dependency failures (0-100). |
| timestamp                | datetime   | Timestamp of the dependency analysis.                      |

***

**Key Features**

* **Visual Dependency Mapping:** Provides a clear visualization of smart contract interdependencies.
* **Risk Propagation Modeling:** Simulates the cascading effects of a dependency failure.
* **Depth Customization:** Allows users to define how deeply dependencies should be mapped.
