All packages
gantry

gantry

wildanrhmn
v0.1.0/0 downloads/Repository

Package ref

gantry@v0.1.0

Run package

CLI

Run graph_out from the command line.

substreams run gantry@v0.1.0 graph_out -e mainnet
Authenticate by running substreams auth or directly on thegraph.market (see docs).

README

gantry substreams

Extracts Uniswap v4 swaps and finds sandwiches in them.

map_swaps is deliberately generic, so any v4 pipeline can reuse it. map_sandwiches consumes its output and looks for one address opening and closing a position around somebody else's trade inside a single block and pool.

Authentication

Substreams streams come from The Graph Market.

  1. Create an account and an API key at https://thegraph.market
  2. substreams auth - opens a browser, fetches the key over the API and exchanges it for a JWT, then writes .substreams.env
  3. . ./.substreams.env

substreams auth --paste accepts an existing JWT if the browser flow is awkward. The variable is SUBSTREAMS_API_TOKEN. .substreams.env is gitignored.

Run

substreams gui substreams.yaml map_sandwiches -e mainnet.eth.streamingfast.io:443 \
  --start-block 21000000 --stop-block +1000

Modules

Execution graph

9 modules
store

store_first_block

from #25900000

Store value

int64

Update policy

set_if_not_exists

Inputs

store

store_last_block

from #25900000

Store value

int64

Update policy

set

Inputs

store

store_seen_originators

from #25900000

Store value

int64

Update policy

set_if_not_exists

Inputs