All packages
ekubo-swaps

ekubo-swaps

arnasgold
This is not the latest version — go to v0.1.3
v0.1.0/0 downloads

Package ref

ekubo-swaps@v0.1.0

Run package

CLI

Run map_ekubo_swaps from the command line.

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

README

test 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 Ekubo swap events on Starknet.

Example output:

{                                                                                                                                                                                                  
  "blockInfo": {                                                                                               
    "blockNumber": "1051675",                                                                                                                                                                                  
    "timestamp": "1736367583"                                                                                                                                                                                  
  },                                                                                                                                                                                                           
  "ekuboSwapEvents": [                                                                                                                                                                                         
    {                                                                                                                                                                                                          
      "from": "0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f",                                                                                                                             
      "tokenIn": "0xc530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007",                                                                                                                           
      "tokenOut": "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",                                                                                                                         
      "amountIn": "1678696077683670342",                                                                                                                                                                       
      "amountOut": "41666666666666",                                                                                                                                                                           
      "transactionHash": "0x3dca067a53a99be49f27b9ee1f8f7c2b39ae0eddb8e25f55ef5b02348e3fbb5"                                                                                                                   
    },                                                                                                                                                                                                         
    {                                                                                                                                                                                                          
      "from": "0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f",                                                                                                                             
      "tokenIn": "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d",                                                                                                                          
      "tokenOut": "0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",                                                                                                                         
      "amountIn": "137437305000000000000",                                                                                                                                                                     
      "amountOut": "60138910",                                                                                                                                                                                 
      "transactionHash": "0x42a43c67fee46efcc04fba2e3399e1ad92914fbbec98f9d8d0f94269d717107"                                                                                                                   
    }                                                                                                                                                                                                          
  ]                                                                                                                                                                                                            
} 

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