24 releases (4 breaking)

new 0.5.6 Oct 29, 2025
0.4.6 Sep 25, 2025
0.4.5 Jun 7, 2025
0.1.3 Mar 21, 2025

#829 in Magic Beans

Download history 19/week @ 2025-07-15 1/week @ 2025-07-22 49/week @ 2025-08-12 18/week @ 2025-08-19 8/week @ 2025-08-26 59/week @ 2025-09-02 44/week @ 2025-09-09 102/week @ 2025-09-16 155/week @ 2025-09-23 320/week @ 2025-09-30 22/week @ 2025-10-07 52/week @ 2025-10-14 327/week @ 2025-10-21 305/week @ 2025-10-28

740 downloads per month

MIT license

6MB
162K SLoC

Substreams ABIs

This directory contains standard ABIs for the various blockchains that Substreams supports.

EVM

Ethereum, Base, BSC, ArbOne, Polygon,...

  • ERC-20
  • ERC-721
  • ERC-1155
  • ERC-2981
  • ERC-4626
  • ERC-777
  • ERC-3643

EVM Tokens

  • SAI/DAI
  • USDC
  • USDT
  • WETH
  • WBTC
  • stETH

EVM Contracts

  • Uniswap V2
    • Pair
    • Factory
  • Uniswap V3
    • Pool
    • Factory
  • Uniswap V4
    • PoolManager
  • ENS V1
    • ENSRegistry
    • EthRegistrarController
    • PublicResolver
    • ReverseRegistrar
    • NameWrapper
  • Seaport
    • OrderFulfilled
    • OrderCancelled
    • OrderValidated
    • OrdersMatched

NFTs Collections

  • Azuki
  • BoredApeYachtClub
  • Doodles
  • LilPudgys
  • MutantApeYachtClub
  • PudgyPenguins

Tron EVM

  • SunSwap
  • JustSwap

SunSwap V2

  • Factory: TKWJdrQkqHisa1X8HUdHEfREvTzw4pMAaY
  • Pair contract (for USDT/TRX pair): TFGDbUyP8xez44C76fin3bn3Ss6jugoUwJ
  • Router: TKzxdSv2FZKQrEqkKVgp5DcwEXBEKMg2Ax
  • Smart routing (aggregator): TJ4NNy8xZEqsowCBhLvZ45LCqPdGjkET5j

JustSwap V1

  • Exchange: TPavNqt8xhoBp4NNBSdEx3FBP24NBfVRxU

How to contribute?

  • Compile the ABI from the source code.
  • Add the ABI to the corresponding directory.
    • Only include abi section in the JSON file.
    • Name the file as the contract name (ex: evm/token/ERC20.json).
  • Build cargo build
  • Update/add new contract to mod.rs file(s).
  • Run cargo test to ensure everything is working.
  • Create a PR.

Quickstart

...
use substreams_abi::evm::token::erc20::events::Transfer;

// Iterates over successful transactions
for trx in block.transactions() {
  // Iterates over all logs in the transaction, excluding those from calls that were not recorded to the chain's state.
  // The logs are sorted by their ordinal and returned as pairs of (log, call) where call is the call that produced the log.
  for (log, call_view) in trx.logs_with_calls() {
    // -- Transfer --
    let transfer = match Transfer::decode(&log) {
        Some(transfer) => transfer,
        None => continue,
    };
    // transfer.from => 6D1D1ebe7dA598194293784252659e862d55b52c
    // transfer.to => c7bBeC68d12a0d1830360F8Ec58fA599bA1b0e9b
    // transfer.value => 3400000000
  }
}

Dependencies

~9–12MB
~205K SLoC