> For the complete documentation index, see [llms.txt](https://superfluid.gitbook.io/superfluid/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://superfluid.gitbook.io/superfluid/developers/integration-guides/useful-queries-for-your-integration/super-token-events.md).

# Super Token Events

Query Super Token Event Data

## Super Token Events

`Transfer`: emitted when super tokens are transferred. Will *decrement* the super token balance of the from address (ie. the same as ERC20 transfer).

**Solidity Event:**

<figure><img src="https://422548309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKEcOOf_qoYMObicyRu%2Fuploads%2Fj8zXowShGtKRnQqgFm21%2FScreen%20Shot%202022-11-29%20at%209.58.15%20AM.png?alt=media&amp;token=331daf78-e5be-4c31-85fa-a27424f81d3d" alt=""><figcaption><p>This comes directly from the Open Zeppelin IERC20 implementation that Super Tokens inherit from</p></figcaption></figure>

**Sample Subgraph Query:**

```graphql
#get DAIx transfer events on goerli where "0xdcb..." is the sender  
query MyQuery {
  transferEvents(
    where: {from: "0xdcb45e4f6762c3d7c61a00e96fb94adb7cf27721", token: "0xf2d68898557ccb2cf4c10c3ef2b034b2a69dad00"}
  ) {
    timestamp
    to {
      id
    }
    value
    transactionHash
  }
}
```

`tokenUpgraded`: emitted when tokens are upgraded (i.e. wrapped). This will *increment* a user’s super token balance and *decrement* a user’s balance in the underlying token

[**Solidity Event:**](https://github.com/superfluid-finance/protocol-monorepo/blob/ace5c3186a8880df0e8d9f99db0d02c6fc941ae1/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol#L383)

<figure><img src="https://422548309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKEcOOf_qoYMObicyRu%2Fuploads%2F1mHDtul89jGuOBeWDE76%2FScreen%20Shot%202022-11-29%20at%209.59.13%20AM.png?alt=media&amp;token=e6a9b8dd-2955-45ed-984d-44cb610173ed" alt=""><figcaption></figcaption></figure>

**Sample Subgraph Query:**

```graphql
#query that will return all emitted DAIx upgrade events for "0xdcb…" on goerli
query MyQuery {
  tokenUpgradedEvents(
    where: {account: "0xdcb45e4f6762c3d7c61a00e96fb94adb7cf27721", token: "0xf2d68898557ccb2cf4c10c3ef2b034b2a69dad00"}
  ) {
    timestamp
    amount
  }
}
```

`tokenDowngraded`: emitted when tokens are downgraded (i.e. unwrapped). This will *decrement* a user’s super token balance, and *increment* their balance of the underlying token

[**Solidity Event:**](https://github.com/superfluid-finance/protocol-monorepo/blob/ace5c3186a8880df0e8d9f99db0d02c6fc941ae1/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol#L400)

<figure><img src="https://422548309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKEcOOf_qoYMObicyRu%2Fuploads%2F8QW9qbDFNFIFqOw8ts4y%2FScreen%20Shot%202022-11-29%20at%209.59.45%20AM.png?alt=media&amp;token=1d73a72b-93e2-4604-9cf5-3e64d2c0696d" alt=""><figcaption></figcaption></figure>

**Sample Subgraph Query:**

```graphql
#query that will return all emitted DAIx downgrade events for "0xdcb…" on goerli
query MyQuery {
  tokenDowngradedEvents(
    where: {account: "0xdcb45e4f6762c3d7c61a00e96fb94adb7cf27721", token: "0xf2d68898557ccb2cf4c10c3ef2b034b2a69dad00"}
  ) {
    timestamp
    amount
  }
}
```
