Skip to content

subsquid/ape-subsquid

Repository files navigation

Quick Start

This plugin allows to use subsquid data lake as a backend for ApeWorX query engine. Full documentation

Dependencies

Installation

via ape plugins

ape plugins install "ape-subsquid@git+https://github.com/subsquid/ape-subsquid.git@main"

via pip locally

You can clone the repository and install the plugin locally:

git clone https://github.com/subsquid/ape-subsquid.git
pip install ./ape-subsquid

Quick Usage

If we want to be sure that subsquid engine is used then we have to specify it explicitly. Otherwise other query engines might be preferred depending on their estimated time.

The following queries can be executed via ApeWorX interactive console. Use ape console --network ethereum:mainnet:geth to run a console session.

# BlockQuery
chain.blocks.query("*", start_block=18_000_000, stop_block=18_000_010, engine_to_use='subsquid')

# ContractEventQuery
contract = Contract('0xdac17f958d2ee523a2206206994597c13d831ec7', abi='<USDT_ABI>')
contract.Transfer.query('*', start_block=18_000_000, stop_block=18_000_100, engine_to_use='subsquid')

Supported queries are: BlockQuery, AccountTransactionQuery, ContractCreationQuery, ContractEventQuery. More info about querying data can be found in the corresponding guide.

Development

Please see the contributing guide to learn more how to contribute to this project. Comments, questions, criticisms and pull requests are welcomed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages