> 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/event/event.source_code.md).

# Event.source\_code()

Returns the source code of the event.

`source_code() → str`

## Query Example

```python
from glider import *


def query():
  # Find contracts with the suffix "ERC20"
  contracts = Contracts().with_name_suffix("ERC20").exec(100)

  for c in contracts:
    for event in c.events().exec():
      # For each contract's event, print the event address
      print(event.source_code())

  return []
```

## Output Example

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2F12qvkmaYYqtGeoY7zoYy%2FScreenshot%202025-08-14%20at%201.46.50%E2%80%AFPM.png?alt=media&amp;token=a9e9abe2-deef-4303-bc20-e28b0a34af0d" alt=""><figcaption></figcaption></figure>
