> 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()

Filter functions/modifiers satisfying the given expression of global variables.

`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="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2FWSGWKSqxJDxoGE0C5Gtn%2FScreenshot%202025-08-28%20at%203.03.39%E2%80%AFPM.png?alt=media&amp;token=e5733000-f87e-42f7-9951-2dc1d98f7683" alt=""><figcaption></figcaption></figure>
