> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# onTokenLifecycleEventsCreated

> Live-streamed token lifecycle events (mints and burns). onTokenLifecycleEventsCreated subscription reference: arguments and payload fields.

## GraphQL

```
type Subscription {
  # Requires a Growth or Enterprise plan.
  onTokenLifecycleEventsCreated(
    address: String
    networkId: Int
  ): AddTokenLifecycleEventsOutput!
}

enum TokenLifecycleEventType {
  MINT
  BURN
}

type TokenBurnEventData {
  amount: String!
  totalSupply: String
  circulatingSupply: String
}

type TokenMintEventData {
  amount: String!
  totalSupply: String
  circulatingSupply: String
}

union TokenLifecycleEventData = TokenBurnEventData | TokenMintEventData

type TokenLifecycleEvent {
  tokenAddress: String!
  networkId: Int!
  blockHash: String!
  blockNumber: Int!
  id: String!
  logIndex: Int!
  maker: String
  timestamp: Int!
  transactionHash: String!
  transactionIndex: Int!
  eventType: TokenLifecycleEventType!
  data: TokenLifecycleEventData!
}

type AddTokenLifecycleEventsOutput {
  id: String!
  events: [TokenLifecycleEvent!]!
}
```

### Example

[Test this query in the Explorer →](https://docs.codex.io/explore.md)

```graphql theme={null}
subscription {
  onTokenLifecycleEventsCreated(
    address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
    networkId: 1
  ) {
    id
    events {
      tokenAddress
      networkId
      eventType
      timestamp
      transactionHash
      data {
        ... on TokenMintEventData {
          amount
          totalSupply
        }
        ... on TokenBurnEventData {
          amount
          totalSupply
        }
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.