Mercury Documentation
  • Get Started with Mercury
    • Pricing
    • Endpoints
    • Authentication
  • The Definitive Guide to Understanding The Mercury's Stack Vision
  • Retroshades
    • Introduction to Retroshades
    • Get Started
      • Importing the Retroshades SDK
      • Writing and Emitting Retroshades
      • Deploying to Mercury Retroshades
      • Querying Retroshades
  • Zephyr: Full Customization
    • Introduction
    • General concepts
      • Zephyr Programs
      • Accessing the Ledger: Contract Entries
      • Accessing the Ledger Meta: Contract Events
      • Database Interactions
      • Create Custom Callable APIs: Serverless Functions
      • Catchups
      • Using Soroban inside Zephyr
    • Quickstart
    • Learn
      • Introduction to Mercury's Cloud and the Zephyr Stack
      • Get Started: Set Up and Manage the Project
        • Create the Project
        • Writing the Program
        • Local Testing
        • Deploy
        • Data catchups/backfill
        • Monitor Execution
        • Querying
      • Database Interactions
        • Zephyr.toml: Define the Tables Structure
        • Understanding Database Interactions
        • Database Operations
      • Accessing the Ledger
      • Accessing Ledger Transition: Soroban Events
      • Working with Contract Custom Types
      • Working with Soroban SDK Types
      • Web Requests, Automation and Alerts.
      • Zephyr.toml Extensions: Indexes And Dashboard
      • Reading From Indexes/External Tables
      • Custom APIs - Serverless Functions
        • General Concepts
        • Custom RPC-alike Endpoints
        • Querying APIs for Composable Data
      • Data Catchups/Backfill
      • Custom Dashboards
        • Creating the Dashboard
        • Plotting: Simple
        • Complex Plotting
    • Support
  • Mercury "Classic"
    • Subscriptions
      • API Definition
    • Queries
      • Contract Events
      • Contract Data Entry Updates
      • Stellar Operations, Balances, and Account Objects
  • TUTORIALS
    • Zephyr
      • Self-hosting Zephyr
      • No-RPC Dapp
      • Indexing a DeFi liquidity pool (Blend)
      • Building a Secure DeFi Real-Time Bot Through Smart Accounts
      • Monitoring Large Deposits with Zephyr and Sending Web Alerts
    • Mercury Classic
      • Index and query contract events
Powered by GitBook
On this page
  • Working with contract types
  • Invoking contracts
  1. Zephyr: Full Customization
  2. General concepts

Using Soroban inside Zephyr

It was already mentioned that we have hardwired Soroban within the Zephyr Virtual Machine. But what does it actually mean in practical terms?

Working with contract types

On one hand, this integration allows you to use the same Soroban SDK you use for writing smart contracts to also develop Zephyr indexing programs! This introduces innovative tools and unique potential use cases for indexing, enhancing the experience of working with the chain's contract data types like never before.

In a few words, this feature allows developers to deal with on-chain data as they would when writing smart contracts, which is way better than accessing the nested types that result once this data is translated into its format for consensus. This is true for ScVals but also custom contracttype structures, which are much more complex to parse. Using Zephyr, everything is abstracted!

Invoking contracts

Another amazing feature that Zephyr enables thanks to Soroban host and VM abstraction is the possibility of invoking smart contracts, directly from your program. Integrating this feature in your program's flow enables limitless innovation in the development of off-chain blockchain data services as we know them. So many use cases for monitoring, automation, and more can be enabled.

PreviousCatchupsNextQuickstart

Last updated 10 months ago