
The Meteora Comprehensive Substreams Package contains a set of modules that allow you to easily retrieve and analyze data from Meteora's key programs on the Solana blockchain, including Dynamic Vault, Farm, and Zap programs.
The substreams.toml file defines all the different modules available, and also provides you with documentation about the usage of every module.
In your substreams.yaml,
imports:
  meteora: https://spkg.io/your-username/meteora-comprehensive-v1.0.0.spkg
Replace any source: sf.solana.type.v1.Block input with map: meteora:meteora_instructions (you will be getting the same protobuf object, but with Meteora-specific data already processed)
Add block filtering to your "entry modules" (any module reading blocks or transactions before emitting your custom types):
If you know the instruction program ID of all transactions that you want, use the program-specific modules like this:
    blockFilter:
      module: meteora:meteora_vault_events
      query:
        string: "program:24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi"
In your substreams.yaml,
imports:
  meteora: https://spkg.io/your-username/meteora-comprehensive-v1.0.0.spkg
  - name: my_cool_module
    kind: map
    inputs:
      - source: sf.substreams.v1.Clock
      - map: meteora:meteora_vault_events
params:
  meteora:meteora_vault_events: "program:24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi"
  meteora:meteora_farm_events: "program:FarmuwXPWXvefWUeqFAa5w6rifLkq5X6E8bimYvrhCB1"
  meteora:meteora_zap_events: "program:zapvX9M3uf5pvy4wRPAbQgdQsM1xmuiFnkfHKPvwMiz"
substreams protogen against your substreams.yaml to create the rust bindings of the protobuf definition inside the substreams.meteora_instructions (map)meteora_vault_events (map)24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi). It tracks:
Use it to get blocks that contain Dynamic Vault Program instructions:
  - name: my_module
    ...
    blockFilter:
      module: meteora_vault_events
      query:
        string: "program:24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi"
meteora_farm_events (map)FarmuwXPWXvefWUeqFAa5w6rifLkq5X6E8bimYvrhCB1). It tracks:
Use it to get blocks that contain Farm Program instructions:
  - name: my_module
    ...
    blockFilter:
      module: meteora_farm_events
      query:
        string: "program:FarmuwXPWXvefWUeqFAa5w6rifLkq5X6E8bimYvrhCB1"
meteora_zap_events (map)zapvX9M3uf5pvy4wRPAbQgdQsM1xmuiFnkfHKPvwMiz). It tracks:
Use it to get blocks that contain Zap Program instructions:
  - name: my_module
    ...
    blockFilter:
      module: meteora_zap_events
      query:
        string: "program:zapvX9M3uf5pvy4wRPAbQgdQsM1xmuiFnkfHKPvwMiz"
meteora_analytics (store)The following Meteora program IDs are supported:
24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTiFarmuwXPWXvefWUeqFAa5w6rifLkq5X6E8bimYvrhCB1zapvX9M3uf5pvy4wRPAbQgdQsM1xmuiFnkfHKPvwMizThe package recognizes the following instruction types:
initialize - Program initializationdeposit - Deposit operationswithdraw - Withdrawal operationsrebalance - Vault rebalancingclaim_rewards - Reward claimsstake - Staking operationsunstake - Unstaking operationszap_in - Zap in transactionszap_out - Zap out transactions# Install Substreams CLI
curl -sSL https://substreams.dev/install.sh | bash
# Clone and build
git clone <repository-url>
cd meteora-substreams
substreams build
# Run all Meteora instructions
substreams run meteora_instructions
# Run specific program events
substreams run meteora_vault_events
substreams run meteora_farm_events
substreams run meteora_zap_events
# Run analytics
substreams run meteora_analytics
# Filter by specific program
substreams run meteora_vault_events --params meteora:meteora_vault_events="program:24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi"
# Filter by multiple programs
substreams run meteora_instructions --params meteora:meteora_instructions="program:24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi || program:FarmuwXPWXvefWUeqFAa5w6rifLkq5X6E8bimYvrhCB1"
# Output to JSON
substreams run meteora_vault_events --output json
# Output to Parquet
substreams run meteora_analytics --output parquet
# Stream to database
substreams run meteora_farm_events --sink postgres://user:pass@localhost/db
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Total Downloads: 0 (New Package)
Published: Just Now
Network: Solana
Publisher: Your Name
substreams gui meteora-comprehensive@v1.0.0 map_block