> 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/callables/callables.with_globals.md).

# Callables.with\_globals()

`with_globals(`*`expr: Any`*`) → Callables`

Returns a list of Callables given a list of [global filters](/glider-ide/api/filters/globalfilters.md).&#x20;

The argument represents an expression of GlobalFilter constants and is a bitmask of flags. For example, to find Functions that call msg.value, we will need to pass in the `GlobalFilters.MSG_VALUE` expression:

```python
Functions().with_globals(GlobalFilters.MSG_VALUE).exec(1)
```

If we want to find Functions that call msg.value *and* msg.sender, we will need to pass in the `GlobalFilters.MSG_VALUE & GlobalFilters.MSG_SENDER` expression:

```python
Functions().with_globals(GlobalFilters.MSG_VALUE & GlobalFilters.MSG_SENDER).exec(1)
```

If we want to find Functions that call msg.data *but not* msg.sender, we will need to pass in the following  `GlobalFilters.MSG_DATA & ~GlobalFilters.MSG_SENDER` expression:

```python
Functions().with_globals(GlobalFilters.MSG_DATA & ~GlobalFilters.MSG_SENDER).exec(1)
```

Finally, if we want to find functions that *either* call msg.sender or tx.origin, we will need to pass in the following `GlobalFilters.TX_ORIGIN | GlobalFilters.MSG_SENDER` expression:

```python
Functions().with_globals(GlobalFilters.TX_ORIGIN | GlobalFilters.MSG_SENDER).exec(1)
```

## Example Query

```python
from glider import *


def query():
  functions = Functions().with_globals(GlobalFilters.TX_ORIGIN).exec(1,2)
  
  return functions
```

## Query Output

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