> 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/callable/callable.get_contract.md).

# Callable.get\_contract()

`get_contract() →` [`Contract`](/glider-ide/api/contract.md) `| NoneObject`

The function may return NoneObject in cases where it does not belong to any contract and is a global function, as Solidity supports that type of functions.

## Example

```python
from glider import *
def query():
  functions = Functions().without_modifier_names(["onlyOwner"]).exec(100)

  contracts = []
  for function in functions:
    # For each function without an "onlyOwner" modifier, return the contract
    contracts.append(function.get_contract())

  return contracts
```

## Example output

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