Giter Club home page Giter Club logo

indexooor-stack's Introduction

๐Ÿค– 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:

  • ๐Ÿš€ 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!

๐Ÿ› ๏ธ Setup

Core

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

Queriooor

To setup the Queriooor submodel, follow there steps:

  • Have python3 and PostgreSQL installed on your machine

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:

  • 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!

๐Ÿ“ข 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.

indexooor-stack's People

Contributors

kaushal1011 avatar manav2401 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.