Giter Club home page Giter Club logo

rarible-ethereum-indexer's Introduction

Rarible Protocol Ethereum Indexers

On Rarible, we have several types of indexers:

NFT indexer — is used to index all history of NFTs related actions, i.e., mint, transfer, and burn. Indexer gets logs from an Ethereum network, and accordingly creates NFT items in a NoSQL database. Especially, it listens to a change of a state of an NFT item ownership.

ERC-20 indexer — is responsible for tracking user balances. If we mapped it to the Rarible usage, it checks if a user has enough of a given currency to make a bid. It handles all the information about a user's wallet status.

Order indexer — aggregates data about Orders from different platforms. In order to properly display order information (order means intent, e.g., intent to sell, or in simpler words, intent to sell an NFT for a given price), we need an order price in addition to other properties.

Architecture

Every indexer listens to a specific part of the Ethereum blockchain, users can use these indexers to query data about the blockchain state. Also, indexers emit events when state changes.

Indexers were built using Spring Framework and use these external services:

  • MongoDB for main data storage
  • Kafka for handling events

Running Indexer with Docker Compose

Requirements

The recommended requirements for running the Indexer via Docker Compose are listed below:

Get started

  1. Clone the project:

    git clone https://github.com/rarible/ethereum-indexer.git
  2. Go to the project folder and run Maven command:

    mvn clean package -DskipTests
  3. Go to the docker folder and run build command:

    cd docker/
    docker-compose build
  4. To start docker compose, run up command:

    docker-compose up

Now you can see how the indexer works.

This is convenient for testing. For example, you can deploy a contract in a test node, configure the SDK for it and see how the information in the indexer will be updated after minting.

OpenAPI

Indexers use OpenAPI to describe APIs (and events). Clients (Kotlin, TypeScript etc.) and server controller interfaces are generated automatically using YAML OpenAPI files.

See more information on Rarible Ethereum Protocol OpenAPI repository.

Ethereum OpenAPI docs: https://ethereum-api.rarible.org/v0.1/doc

Suggestions

You are welcome to suggest features and report bugs found!

Contributing

The codebase is maintained using the "contributor workflow" where everyone without exception contributes patch proposals using "pull requests" (PRs). This facilitates social contribution, easy testing, and peer review.

See more information on CONTRIBUTING.md.

License

GPL v3 license is used for all services and other parts of the indexer.

rarible-ethereum-indexer's People

Contributors

sanufriev avatar serejke avatar yakischik avatar mystdeim avatar evgenynacu avatar rtserg avatar augur avatar nikolay-ryabinin-rarible avatar sherbakovama avatar mazinden avatar zhalninde avatar qkoshelev avatar atapin avatar zolt avatar tgenman avatar winchell avatar varuzam 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.