All packages
ekubo-swaps

ekubo-swaps

arnasgold
v0.1.3/4 downloads

Package ref

ekubo-swaps@v0.1.3

Run package

CLI

Run map_ekubo_swaps from the command line.

substreams run ekubo-swaps@v0.1.3 map_ekubo_swaps -e starknet-mainnet --start-block -1
Authenticate by running substreams auth or directly on thegraph.market (see docs).

README

Ekubo Swaps Substreams modules

This package was initialized via substreams init, using the starknet-events template.

Usage

substreams build
substreams auth
substreams gui       			  # Get streaming!
substreams registry login         # Login to substreams.dev
substreams registry publish       # Publish your Substreams to substreams.dev

Modules

map_ekubo_swaps

This module filters out Ekubo swap events on Starknet. Outputs all swap events routed through Ekubo.

Example output:

  "ekuboSwapEvents": [                                                                                                                                                                                      
    {                                                                                                                                                                                                       
      "from": "0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f",                                                                                                                          
      "tokenA": "0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",                                                                                                                        
      "tokenB": "0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",                                                                                                                        
      "amountA": "40008552913",                                                                                                                                                                             
      "amountASign": false,                                                                                                                                                                                 
      "amountB": "40008288743",                                                                                                                                                                             
      "amountBSign": true,                                                                                                                                                                                  
      "transactionHash": "0x1dc354cbc9e5fd9d04e081a159f13eb5137e7ea65b4dc0758400b874886d7e3",                                                                                                               
      "blockNumber": "1079147",                                                                                                                                                                             
      "timestamp": "1737237552"                                                                                                                                                                             
    },                                                                                                                                                                                                      
    {                                                                                                                                                                                                       
      "from": "0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f",                                                                                                                          
      "tokenA": "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",                                                                                                                        
      "tokenB": "0x75afe6402ad5a5c20dd25e10ec3b3986acaa647b77e4ae24b0cbc9a54a27a87",                                                                                                                        
      "amountA": "96905138888888888",                                                                                                                                                                       
      "amountASign": false,                                                                                                                                                                                 
      "amountB": "12948439747647171",                                                                                                                                                                       
      "amountBSign": true,                                                                                                                                                                                  
      "transactionHash": "0x706a832c36a6f20d1d7064f8b252b2f7843eab0c29baa555a361aa56a265fef",                                                                                                               
      "blockNumber": "1079147",                                                                                                                                                                             
      "timestamp": "1737237552"                                                                                                                                                                             
    }

Modules

Execution graph

4 modules
Show 3 dependencies
map

starknet:all_transactions

`all_transaction` reads from the `sf.starknet.type.v1.Block` source and outputs a list of all transactions in the block.

Output

sf.substreams.starknet.type.v1.Transactions

map

starknet:filtered_transactions

`filtered_transactions` reads from `all_transactions` and applies a filter on keys, only outputting the transactions that match the filter. Example usage: `(tx:class_hash:0x0000000 && rc:type:0)`

Output

sf.substreams.starknet.type.v1.Transactions

blockIndex

starknet:index_transactions

`index_events` sets the keys corresponding to all event 'types' and 'attribute keys' in the block

Output

sf.substreams.index.v1.Keys