๐ indexooor stack: the next gen dev tool for indexing smart contract data ๐ซถ
To fetch all modules use git submodule update --init --recursive
. If you want to use modules seperately, use the equivivalent git command.
To update submodules to remote use git submodule update --remote
Welcome to the Indexooor Stack, an open-source project for indexing and querying smart contract data. Our unique database schema allows for complex join queries and fetching full arrays and mappings from smart contracts, without the need for smart contracts to emit events.
Refer our comparison with the graph to get a better idea of what we can do and why!
The stack is composed of several submodules, each serving a specific purpose:
- ๐ Core: Our core indexing service, written in Go, indexes smart contract slot data using a lightweight algorithm that detects slot changes for a contract in each block. All slot data is stored in a PostgreSQL database.
- ๐ Queriooor: Our querying service, written in Python using FastAPI, allows developers to upload a storage layout for their contract address and query variables by their name. The service finds the slot and data type of the variable, fetches data, and decodes it before returning it to the user.
- ๐ฅ๏ธ Goooi-queriooor: Our UI web-app, built using Vite, simplifies querying by allowing developers to query in the browser instead of calling a REST API.
- ๐ฎ Simulatooor: Our simulator service, written in Go, simulates all our services and demonstrates the workings of the Indexooor Stack.
- ๐ Op-geth: Our version of the Optimism Go Ethereum, which has the Indexooor Core integrated into the node for indexing smart contract data. This makes things easier for developers, who can then run an extra querier connecting their database with it for users to query data!
Our stack is lightweight and easy to run, making it accessible for developers of all levels. In this README, we'll explain how to set up and use each submodule of the stack. Let's get started!
To set up the Core submodule, follow these steps:
- Install Go and PostgreSQL on your machine.
- Clone the Indexooor Stack repository and navigate to the core directory.
Once this is done refer core-setup
To setup the Queriooor submodel, follow there steps:
- Have
python3
and PostgreSQL installed on your machine
Once this is done refer queriooor-setup
This is a vanilla vite project, follow the instruction for the same or use our deployment
Add instructions
Refer Op-Geth Readme
Now that you've set up each submodule of the Indexooor Stack, let's learn how to use them.
- Start the indexer giving
rpc
,contractAddresses
andstartBlock
, whererpc
is the rpc url of your node,contractAddresses
is,
delimited list of your contracts andstartBlock
is the block number where you want to start indexing from.
To query a variable in a smart contract using the Queriooor submodule, follow these steps:
- Upload the storage layout for the smart contract you want to query by making a POST request to
/queriooor/setStorageLayout
with the contract's address and the storage layout as the body of the request. - To query a variable, make a POST request to ``/queriooor/getVariable` with the contract's address, the variable name, and key/deep key information.
- Other API calls can be viewed in the swagger doc at
/docs
Queriooor will find the slot and data type of the variable, fetch its data from the PostgreSQL database, and return the decoded value.
To query a variable in a smart contract using the Goooi-queriooor web-app, follow these steps:
- Start the Queriooor service
- Start the Goooi-Queriooor after doing the setup using
npm run dev
or visit our hosted webapp. - Add queriooor url, contract address, variable name and key information.
Add instructions
If you're looking for more detailed information on how to use the Indexooor Stack, check out our documentation. We have comprehensive guides on each submodule as well as a glossary of terms.
- Indexooor Core documentation
- Queriooor documentation
- Goooi-queriooor documentation
- Simulatooor documentation
- Indexooor Stack glossary
If you have any questions or issues while using the Indexooor Stack, feel free to open an issue on our GitHub repository. We're happy to help!
We welcome contributions from the community! If you'd like to contribute to the Indexooor Stack, please take a look at our contributing guidelines to get started.
We use GitHub issues and pull requests for all contributions. If you'd like to report a bug or suggest a feature, please open an issue on our GitHub repository. If you'd like to submit a code change, please fork our repository and submit a pull request.
All contributions are appreciated, no matter how small. We're grateful for any help in making the Indexooor Stack even better!
If you have any questions or feedback about the Indexooor Stack, you can reach us through the following channels:
- Email: kaushalpatil10@gmail.com
- Twitter: Coming Soon
- Discord: Coming Soon
We'd love to hear from you and answer any questions you may have about the Indexooor Stack. Don't hesitate to reach out!
We would like to thank the following people and organizations for their contributions to the Indexooor Stack:
- The developers of Solc, Geth, PostgreSQL, FastAPI, and Vite for creating and maintaining the tools we use in our stack.
- Special thanks to developers of projects such as slither and heimdall-rs which were refered heavily during this build.
- The contributors to the open source community for providing valuable feedback and contributions to the projects we depend on.
- Our users for providing feedback and support as we continue to develop and improve the Indexooor Stack.
- The entire Ethereum community for advancing the state of the art in blockchain technology and inspiring us to build better tools.
Thank you all for your support and contributions!
If you find the Indexooor Stack useful, we encourage you to share it with others in the blockchain development community. Here are some ways you can help spread the word:
- Star our GitHub repository and follow us on GitHub.
- Tweet about the Indexooor Stack and mention us
@kau5hal10
,@manav24_
,@MeetModi_
,@PARAMS704
,@nisarg1499
- Share the Indexooor Stack with your friends and colleagues who are interested in blockchain development.
- Write a blog post or tutorial about how you've used the Indexooor Stack in your own projects.
By helping us spread the word, you'll be helping us reach more developers and grow the Indexooor Stack community. Thank you for your support!
We welcome contributions to the Indexooor Stack! If you're interested in contributing, please follow these guidelines:
- Fork the repository and create a new branch for your contribution.
- Make your changes and write tests to ensure that they work as expected.
- Run the existing tests to make sure you didn't break anything.
- Commit your changes and push them to your fork.
- Open a pull request to our repository with a clear description of your changes.
- We'll review your changes and work with you to get them merged into the main repository. By contributing to the Indexooor Stack, you'll be helping to make blockchain development easier and more accessible for everyone.
Thank you for your interest in contributing to the Indexooor Stack!
The Graph is a popular indexing and querying solution for Ethereum and IPFS, but how does it compare to Indexooor? Let's take a look:
Feature | Indexooor | The Graph |
---|---|---|
Can query all contract variables? | Yes | No, only emitted data is indexed |
Stack weight | Light | Heavy |
Smart contract indexing | Yes | Yes |
Querying smart contract data | Yes | Yes |
Full array and mapping support | WIP (Simple types work) | Yes |
Complex join queries | WIP (No as of today) | Yes |
No need for smart contract events | Yes | No |
Language support | Go, Python | TypeScript, AssemblyScript |
Web UI | Yes | Yes |
Simulating services | Yes | N/A |
Integrated indexing in node | Yes | Yes |
Community-driven | Yes | Yes |
Limitations | Requires storage layout Cannot index complex types as of today |
Requires subgraph deployment Higher learning curve |
As you can see, Indexooor is a lighter weight solution that offers many of the same features as The Graph, but with some important differences. While The Graph requires developers to deploy and manage a subgraph, Indexooor allows developers to simply upload the storage layout of their contracts and start indexing immediately. Additionally, Indexooor does not require smart contracts to emit events, making it easier to use with legacy contracts. On the other hand, The Graph offers more language support, including TypeScript and AssemblyScript, and has a more established community and learning resources.
Ultimately, the choice between Indexooor and The Graph will depend on your specific needs and preferences. We encourage you to try both solutions and see which one works best for you.