/ Docs
7.0
/

evm.subsquid.events index

This index allows indexing events emitted by Ethereum smart contracts. You can define a handler for each contract/tag pair. Only necessary events are processed.

RPC node is optional for this index. If not specified, the index will lack real-time data and will be able to process only historical data provided by Subsquid Archives API.

This is a basic config for USDt token contract. You can use this demo as a template for your project choosing demo_evm_events in dipdup new command.

dipdup.yaml
spec_version: 2.0
package: demo_evm_events
datasources:
  ethscan:
    kind: abi.etherscan
  mainnet_node:
    kind: evm.node
    url: https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY:-''}
    ws_url: wss://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY:-''}
  mainnet_subsquid:
    kind: evm.subsquid
    url: ${ARCHIVE_URL:-https://v2.archive.subsquid.io/network/ethereum-mainnet}
    node: mainnet_node
contracts:
  eth_usdt:
    kind: evm
    address: 0xdac17f958d2ee523a2206206994597c13d831ec7
    typename: eth_usdt
indexes:
  eth_usdt_events:
    kind: evm.subsquid.events
    datasource: mainnet_subsquid
    handlers:
      - callback: on_transfer
        contract: eth_usdt
        name: Transfer
Help and tips -> Join our Discord
Ideas or suggestions -> Issue Tracker