Flipside Docs
  • Welcome to Flipside!
    • Welcome to Flipside
    • Growth Services
    • Data
      • Choose your Flipside plan
        • Free
        • Builder
        • Pro
          • Get Started in Snowflake
          • Incremental Table Pattern
          • Copy Data from Snowflake to AWS
          • Copy Data from Snowflake to GCP
          • Copy Data from Snowflake to Azure
        • Snowflake Data Shares
          • Mounting a Snowflake Data Share
    • Earn
    • Community
  • Data
    • Flipside Data
      • Table Docs by Chain
      • Data Modeling Approach
      • Labels
        • Centralized Exchange Label Type
        • Decentralized Exchange Label Type
        • Operator Label Type
        • Chain Admin Label Type
        • Decentralized Finance Label Type
        • NonFungible Tokens Label Type
        • Games Label Type
        • Bridge Label Type
        • Decentralized Applications Label Type
        • Token Label Type
        • Flotsam Label Type
      • Tags
      • Table Freshness Targets
      • Contribute to Our Data
        • Contract Decoding & ABIs
        • How to Add Your Own Tags
        • Community Curation
          • Getting Started
            • Contribution Workflow
          • Model Standards
            • dbt Tips
          • PR Checklist
    • Data Products
      • Data Studio (SQL Analysts)
        • Get Started
          • Write/fork your first query
        • Flipside AI
        • Studio in Depth
          • Query Editor
            • Query Referencing
            • Pro Tips for Querying
            • Keyboard Shortcuts
            • Hex-to-Integer Function
          • Create a Chart
            • Advanced Visualization
          • Build a Dashboard
            • Markdown Reference
          • Team Accounts
        • Tutorials
          • How to Analyze Web3 Data
          • Video Tutorials
            • Overview of Schemas & Tables
            • Ethereum Tutorials
              • Getting Started with Decoded Ethereum Events
              • Getting Started with Ethereum Balances
              • Block Level and Daily Balances
              • Finding Centralized Exchange Flows
            • Solana Tutorials
              • Solana Schema & Tables: Video Walkthrough
              • Solana Specialty Tables: Video Walkthrough
              • Exploring Transactions in solana.events
            • THORChain Tutorials
              • THORChain Schema & Tables
              • Calculating IL for THORChain
          • More Tools & Resources
        • Get Inspired
      • LiveQuery
        • Get Started
        • LiveQuery in Depth
          • Functions
            • 🤝Partner Functions
            • 🧙‍♂️EVM Functions
              • 💡Seaport: Real-time Orders
              • 💡WETH Pool Balances
              • 💡General EVM Node Queries
            • 🤖API Functions
              • 💡Query TheGraph
              • 💡Query Defi Llama
            • ⚙️Utility Functions
              • 💡Hex Converters
              • 💡JSON RPC Request Builder
              • 💡EVM Logs Decoder
              • 💡Keccak256 Encoder
          • QuickNode Setup Guide
        • Secrets Manager
        • Get Inspired
      • Snowflake
      • API/SDK (Developers)
        • Get Started - Your first API call in < 2 min
        • SDK in Depth
          • JSON RPC methods
          • Run A Query
          • Query Results
          • Pagination
          • Sorting
          • Filtering
          • Query Seconds
          • Caching (maxAgeMinutes)
          • Rate Limits
          • Errors
          • More Examples
          • Archive
            • [ARCHIVED] JS/TS SDK
            • ShroomDK Migration Guide
            • [LEGACY] R
        • Tutorials
          • Have Questions?
        • Get Inspired
    • Insights and Tools
  • Earn
    • Flipside Earn
    • Onchain Rewards
      • Quests
    • Analyst Rewards
      • Top Dashboards
        • Top Dashboard Guidelines
        • Skill Tree
      • Ambassador Program
      • Direct to Analyst Commissions
    • Wallet Management
    • Tax Center
  • Support
    • General Support
    • Open a Ticket
      • That email doesn't look quite right
    • 🌟Product Special Releases
      • 2025
        • 2025-02-06 | EVM Blockchain Standardization
          • Table Change Overview
      • 2024
        • 2024-06-13 | Solana native and wrapped addresses
        • 2024-05-01 | Improvements to Pricing Data
          • Actions for Data Studio Users
          • Actions for API Users
          • Action for Data Share Users
    • 🗒️Release Notes
      • 2025
        • 2025-05-01 | Release Notes
        • 2025-04-17 | Release Notes
        • 2025-04-03 | Release Notes
        • 2025-03-20 | Release Notes
        • 2025-03-06 | Release Notes
        • 2025-02-20 | Release Notes
        • 2025-02-06 | Release Notes
        • 2025-01-23 | Release Notes
      • 2024
        • 2024-12-24 | Release Notes
        • 2024-12-12 | Release Notes
        • 2024-11-27 | Release Notes
        • 2024-11-14 | Release Notes
        • 2024-10-31 | Release Notes
        • 2024-10-03 | Release Notes
        • 2024-10-17 | Release Notes
        • 2024-09-19 | Release Notes
        • 2024-09-05 | Release Notes
        • 2024-08-22 | Release Notes
        • 2024-08-08 | Release Notes
        • 2024-07-25 | Release Notes
        • 2024-07-11 | Release Notes
        • 2024-06-27 | Release Notes
        • 2024-06-14 | Release Notes
        • 2024-05-30 | Release Notes
        • 2024-05-16 | Release Notes
        • 2024-05-02 | Release Notes
        • 2024-04-18 | Release Notes
        • 2024-04-05 | Release Notes
        • 2024-03-18 | Release Notes
        • 2024-03-05 | Release Notes
        • 2024-02-20 | Release Notes
        • 2024-02-05 | Release Notes
    • 📊Studio Change log
  • Flipside Community
    • Get Started
    • Ambassador Program
    • Join Our Discord
    • Join Our Guild
Powered by GitBook
On this page
  • Table Functions
  • Contract Event Examples
  • Balance Examples
  • UDF Primitives
  • Generic RPC Call Examples

Was this helpful?

  1. Data
  2. Data Products
  3. LiveQuery
  4. LiveQuery in Depth
  5. Functions

EVM Functions

High Level Functions for Querying EVM-compatible network

PreviousPartner FunctionsNextSeaport: Real-time Orders

Last updated 1 year ago

Was this helpful?

EVM functions are custom-built to query EVM-compatible networks and exist as an abstraction over Flipside's API functions. These functions are deployed on specific chain/network schemas under the livequery database, for example: ethereum_mainnet , ethereum_goerli, polygon_mainnet, etc. Flipside automatically defaults all queries to the livequery database so you do not need to specify the livequery db when writing your queries.

View the full documentation within Data Studio on available functions and blockchains/networks.

EVM functions require you to associate a node provider with your Flipside Account. See the of the documentation for details on adding a node provider to your Flipside Account.

Two types of EVM Functions Exist:

  1. Table Functions, prefixed with tf_

    1. These functions must be wrapped in a table() function

  2. User Defined functions, prefixed with udf_

    1. These functions are used in a select statement

Table Functions

Contract Event Examples

The following examples show off how to fetch the latest events/logs for a contract/set of contracts. Available event functions include:

  • <chain>_<network>.tf_latest_contract_events

  • <chain>_<network>.tf_latest_contract_events_decoded

  • <chain>_<network>.tf_all_contract_events

  • <chain>_<network>.tf_all_contract_events_decoded

Balance Examples

The following examples show off how to fetch balances. Available balance functions include:

  • <chain>_<network>.tf_latest_token_balance

  • <chain>_<network>.tf_latest_native_balance

  • <chain>_<network>.tf_historical_token_balance

  • <chain>_<network>.tf_historical_native_balance

UDF Primitives

These functions are a set of UDFs (user defined functions) designed to make interacting with EVM nodes as easy as possible in Snowflake SQL. They are more dynamic than the EVM table functions because they allow you to call any JSON RPC methods supported by our partners. However, this flexibility comes with a tradeoff - the data returned from these calls will be in a much more raw format. In most cases, you will likely need apply some sort of decoding. The functions in our utils schema are designed to help with these types of decoding and transformations.

Due to the need to apply decoding and transformations, these functions are mainly recommend for more advanced users that are comfortable working with data from EVM nodes. Available functions include:

  • <chain>_<network>.udf_rpc

  • <chain>_<network>.udf_rpc_eth_call

  • <chain>_<network>.udf_rpc_eth_get_logs

  • <chain>_<network>.udf_rpc_eth_get_balance

  • <chain>_<network>.udf_get_token_balance

Generic RPC Call Examples

🧙‍♂️
Add-Ons section
💡Seaport: Real-time Orders
💡WETH Pool Balances
💡General EVM Node Queries