LogoLogo
  • 🌊Superfluid
  • Protocol Overview
    • 💡What is Superfluid?
    • 📄In-Depth Overview
      • Super Tokens
      • Super Agreements
        • 🚰Money Streaming (CFA)
        • ✳️Distributions (IDA)
        • 🌊Streaming Distributions
      • Super Apps
      • Superfluid Host
    • 🧠Use Cases
      • Recurring Payments
      • DeFi
      • Social & Community
      • Gaming
    • 📔Glossary of Terms
  • Developers
    • 🏃Quickstart
    • 🪙Super Tokens
      • Super Tokens - Solidity
      • Super Tokens - SDK Core
      • Super Tokens - Frontend Examples
      • Types of Super Tokens
      • Deploy a Super Token
        • Deploying a Wrapper Super Token
        • Deploying a Self Governed Super Token
        • Deploying a Pure Super Token
      • In-Depth
        • Tracking Super Token Balances
        • ERC777 in Super Tokens
      • Test Super Token Faucet
    • 🌊Money Streaming (CFA)
      • Solidity
        • Read Methods
          • getFlowInfo
          • getFlowRate
          • getNetFlowRate
        • Write Methods
          • createFlow
          • updateFlow
          • deleteFlow
          • With User Data
          • With Context
      • SDK Core
        • Read Methods
          • getFlow
          • getNetFlow
          • getAccountFlowInfo
        • Write Methods
          • createFlow
          • updateFlow
          • deleteFlow
      • Access Control List (ACL)
        • Solidity
          • createFlowFrom
          • updateFlowFrom
          • deleteFlowFrom
          • setFlowPermissions
          • setMaxFlowPermissions
          • revokeFlowPermissions
          • increaseFlowRateAllowanceWithPermissions
          • decreaseFlowRateAllowanceWithPermissions
          • getFlowPermissions
        • SDK Core
          • createFlowByOperator
          • updateFlowByOperator
          • deleteFlowByOperator
          • updateFlowOperatorPermissions
          • revokeFlowOperatorPermissions
          • increaseFlowRateAllowanceWithPermissions
          • getFlowOperatorData
      • Frontend Examples
      • More...
        • Flow Rate Time Frames
        • Building Batched Streams in Safe
        • Flow NFTs
    • ✳️Distributions (IDA)
      • IDA - Solidity
      • IDA - SDK Core
      • IDA - Frontend Examples
    • 🤖Super Apps
      • Super Apps in Depth
      • Super App Callbacks
        • Calling Agreements In Super Apps
      • User Data
        • NFT Billboard Example
      • SuperAppBaseFlow
      • Super App Examples
      • Super App Deployment Guide
    • 🧺Batch Calls
      • Batch Calls - SDK Core
      • Batch Calls - Frontend Examples
    • ⚙️Automations
      • Auto-Wrap
        • Dev Guide
      • Stream Scheduler
        • Dev Guide
      • Vesting Scheduler
        • Dev Guide
      • Stream Accounting API
        • Dev Guide
      • Automation Subgraphs
        • Stream Scheduler Subgraph
        • Vesting Scheduler Subgraph
        • Auto Wrap Subgraph
    • 🏗️Integration Guides
      • For Your Integration: The Basics
        • Supporting Super Tokens
        • Supporting Money Streams
        • Supporting Instant Distributions
      • Gating with Superfluid Subscriptions & Guild.xyz
      • Displaying Token Balances
      • Useful Queries for Your Integration
        • Instant Distribution Events
        • Money Streaming Events
        • Super Token Events
        • Other Helpful Queries
      • Constructing Links to The Superfluid Dashboard
    • 🔁Superfluid Subscriptions
      • Superfluid Checkout Widget
      • Implementing Subscriptions in your App
    • SDK Core General
      • Initialization
      • Functionality
      • Getting Data
      • Resolver
      • Reference Docs
    • Solidity General
      • Calling Super Agreements
      • Libraries
      • Resolver
    • Testing Guide
      • Hardhat Testing
      • Foundry Testing
      • In-Depth
        • Hardhat Mainnet Fork Testing
        • Super App Testing on Mainnet Forks
    • Subgraph
    • Reference
      • Deploying The Framework
      • EVM Contracts
      • SDK Redux
      • Superfluid Console
      • Superfluid Protocol Addresses
    • Contract Addresses
  • Sentinels
    • 🥅Liquidations & TOGA
    • 🤖Running a Sentinel
    • 🗺️Solvency Dashboard
  • Resources
    • 🌊Superfluid Wave Pool
    • 📜Superfluid on Ethereum Mainnet
    • 💰Bounty Program
    • 🛡️Security & Bug Bounties
    • 💡Project Ideas
    • 🗳️Token Dashboard Submission
    • 🎥Videos
    • Superfluid Deployment Guide
    • Learn about Ethereum
    • Code of Conduct
Powered by GitBook
On this page

Was this helpful?

  1. Developers
  2. Integration Guides
  3. Useful Queries for Your Integration

Super Token Events

Query Super Token Event Data

PreviousMoney Streaming EventsNextOther Helpful Queries

Last updated 2 years ago

Was this helpful?

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:

Sample Subgraph Query:

#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

Sample Subgraph Query:

#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

Sample Subgraph Query:

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

🏗️
Solidity Event:
Solidity Event:
This comes directly from the Open Zeppelin IERC20 implementation that Super Tokens inherit from