All packages
aerodrome-v2

aerodrome-v2

Supeeerpower
v0.1.1/0 downloads/Repository

Package ref

aerodrome-v2@v0.1.1

Run package

CLI

Run map_events from the command line.

substreams run aerodrome-v2@v0.1.1 map_events -e base
Authenticate by running substreams auth or directly on thegraph.market (see docs).

README

aerodrome-v2

Aerodrome V2 Substreams for Base: factory PairCreated events and Sync events on those pairs.

Overview

This package indexes Aerodrome V2 on Base from block 3200559 (factory deployment, 2023-08-28 02:41 UTC). It decodes the factory PoolCreated event (Uniswap V2 PairCreated equivalent) and Sync events on those pairs, including creates and Sync in the same block. Output is typed protobuf for substreams run / GUI.

Factory: 0x420DD381b31aEf6683db6B902084cB0FFECe40Da. Aerodrome Sync is Sync(uint256,uint256), not Uniswap V2's Sync(uint112,uint112).

Modules

NameKindOutputDescription
map_pool_createdmapproto:aerodrome.v2.EventsFactory PoolCreated events (pair_created).
store_poolsstoreproto:aerodrome.v2.PairCreatedPair metadata keyed by pool:<address> for Sync filtering.
map_eventsmapproto:aerodrome.v2.EventsPairCreated plus Sync on those pairs, including same-block creates.

Prerequisites

  • Substreams CLI
  • Rust with wasm32-unknown-unknown (rustup target add wasm32-unknown-unknown)
  • A Substreams API key from The Graph Market (substreams auth or SUBSTREAMS_API_KEY)

Quick Start

# Build WASM into ./target (override CARGO_TARGET_DIR if your environment sets it)
CARGO_TARGET_DIR=./target cargo build --target wasm32-unknown-unknown --release
substreams pack

substreams run substreams.yaml map_events \
  --network base \
  -s 3200559 \
  -t +1000 \
  -o jsonl

Use map_pool_created to inspect factory creates only. substreams gui substreams.yaml map_events -s 3200559 is useful for browsing decoded events. The first PoolCreated is shortly after deployment (around block 3204872).

Modules

Execution graph

5 modules
Show 2 dependencies
map

eth_common:all_events

`all_events` gives you all the events in a block (from successful transactions), with basic block hash/number/timestamp and transaction hash

Output

sf.substreams.ethereum.v1.Events

blockIndex

eth_common:index_events

`index_events` sets the following keys on the block: * Event signatures evt_sig:0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef (signature in hex, prefixed by 0x) * Event address evt_addr:0x0123456789abcdef0123456789abcdef01234567 (address in hex, prefixed by 0x)

Output

sf.substreams.index.v1.Keys