Subsquid Network
Note
Examples below are for Ethereum mainnet. For other supported networks, see EVM Networks.DipDup uses Subsquid Network as a source of historical data for EVM-compatible blockchains.
Configure the datasource in your project config:
dipdup.yaml
datasources:
subsquid:
kind: evm.subsquid
url: ${SUBSQUID_URL:-https://v2.archive.subsquid.io/network/ethereum-mainnet}
You can also set node
field to one or more evm.node
datasources to allow realtime indexing:
dipdup.yaml
datasources:
subsquid:
kind: evm.subsquid
url: ${SUBSQUID_URL:-https://v2.archive.subsquid.io/network/ethereum-mainnet}
node: evm_node
etherscan:
kind: abi.etherscan
url: ${ETHERSCAN_URL:-https://api.etherscan.io/api}
api_key: ${ETHERSCAN_API_KEY:-''}
evm_node:
kind: evm.node
url: ${NODE_URL:-https://eth-mainnet.g.alchemy.com/v2}/${NODE_API_KEY:-''}
ws_url: ${NODE_WS_URL:-wss://eth-mainnet.g.alchemy.com/v2}/${NODE_API_KEY:-''}
Now, use this datasource in EVM index definitions:
dipdup.yaml
indexes:
eth_usdt_events:
kind: evm.subsquid.events
datasource: subsquid
handlers:
- callback: on_transfer
contract: eth_usdt
name: Transfer
Help and tips -> Join our Discord
Ideas or suggestions -> Issue Tracker