indexooor-stack

🤖 Indexooor Stack

📚 indexooor stack: the next gen dev tool for indexing smart contract data 🫶

📄 Repository Setup

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

😃 About

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:

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!

🛠️ Setup

Core

To set up the Core submodule, follow these steps:

Once this is done refer core-setup

Queriooor

To setup the Queriooor submodel, follow there steps:

Once this is done refer queriooor-setup

Goooi-querioor

This is a vanilla vite project, follow the instruction for the same or use our deployment

Simulatooor

Add instructions

Op-geth

Refer Op-Geth Readme

🚀 Getting Started

Now that you’ve set up each submodule of the Indexooor Stack, let’s learn how to use them.

Indexing with Core

  1. Start the indexer giving rpc, contractAddresses and startBlock, where rpc is the rpc url of your node, contractAddresses is , delimited list of your contracts and startBlock is the block number where you want to start indexing from.

Querying with Qeuriooor

To query a variable in a smart contract using the Queriooor submodule, follow these steps:

  1. 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.
  2. To query a variable, make a POST request to ``/queriooor/getVariable` with the contract’s address, the variable name, and key/deep key information.
  3. 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.

Querying with Goooi-queriooor

To query a variable in a smart contract using the Goooi-queriooor web-app, follow these steps:

  1. Start the Queriooor service
  2. Start the Goooi-Queriooor after doing the setup using npm run dev or visit our hosted webapp.
  3. Add queriooor url, contract address, variable name and key information.

Running Indexooor with OP-Geth Node

Add instructions

📚 Documentation

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.

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!

🤝 Contributing

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!

📞 Contact

If you have any questions or feedback about the Indexooor Stack, you can reach us through the following channels:

We’d love to hear from you and answer any questions you may have about the Indexooor Stack. Don’t hesitate to reach out!

🙏 Acknowledgements

We would like to thank the following people and organizations for their contributions to the Indexooor Stack:

Thank you all for your support and contributions!

📢 Spread the Word

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:

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!

🚀 Contributing Guidelines

We welcome contributions to the Indexooor Stack! If you’re interested in contributing, please follow these guidelines:

  1. Fork the repository and create a new branch for your contribution.
  2. Make your changes and write tests to ensure that they work as expected.
  3. Run the existing tests to make sure you didn’t break anything.
  4. Commit your changes and push them to your fork.
  5. Open a pull request to our repository with a clear description of your changes.
  6. 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!

🤝 Indexooor vs The Graph

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.