• Stars
    star
    143
  • Rank 257,007 (Top 6 %)
  • Language
    Kotlin
  • License
    GNU General Publi...
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ethereum indexer and APIs

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

Order diagrams

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.

More Repositories

1

protocol-contracts

Interfaces for smart contracts used by Rarible
JavaScript
386
star
2

sdk

TypeScript
76
star
3

protocol

Issues, Questions, Feature requests for Rarible Protocol
58
star
4

ethereum-sdk

TypeScript
52
star
5

ethereum-example

TypeScript
31
star
6

nft-license

30
star
7

example

TypeScript
23
star
8

subgraph

TypeScript
15
star
9

rixio

TypeScript
13
star
10

solana-indexer

Kotlin
11
star
11

flow-indexer

Kotlin
10
star
12

tezos-protocol-contracts

Interfaces for Tezos smart contracts used by Rarible
JavaScript
9
star
13

protocol-documentation

9
star
14

service-core

Kotlin
8
star
15

flow-contracts

Cadence
7
star
16

union-service

Kotlin
6
star
17

ethereum-core

Kotlin
6
star
18

order-manager

Tool to find inactive orders and cancel them
TypeScript
6
star
19

ethereum-openapi

Kotlin
6
star
20

rarible-docs

6
star
21

gen-art-tool-contracts

Solidity
5
star
22

blockchain-scanner

Blockchain scanner
Kotlin
5
star
23

model-generator

Custom domain model generator for rarible apis
Kotlin
5
star
24

opensea-client

Kotlin
4
star
25

flow-sdk

TypeScript
4
star
26

public-assets

4
star
27

ethereum-e2e-tests

TypeScript
3
star
28

tezos-api

Kotlin
3
star
29

union-openapi

Kotlin
3
star
30

trezor-provider

Trezor Provider to use with Truffle (for migrations, usage from console)
JavaScript
3
star
31

tezos-sdk

TypeScript
3
star
32

immutable-x-sdk

SDK for immutable x
TypeScript
2
star
33

tezos-indexer

Kotlin
2
star
34

rarible-links

1
star
35

scala-rpc

Scala
1
star
36

landing-pages

1
star
37

legacy-rarible-backend

OCaml
1
star
38

scalether-maven-plugin

Maven plugin for generation of contract wrappers
Java
1
star
39

ts-common

Common typescript libraries
TypeScript
1
star
40

ethereum-contracts

Scala
1
star
41

tezos-marketplace-indexer

Python
1
star
42

solana-openapi

Public API of Solana blockchain indexer
Kotlin
1
star
43

mystery-box-tool-contracts

Mystery Box generating tool, a random surprise NFT token to reveal.
1
star
44

server-codegen

Openapi codegen for rarible server components
Mustache
1
star
45

client-codegen

Kotlin client openapi codegen for rarible services
Mustache
1
star
46

solana-sdk

TypeScript
1
star
47

test

1
star
48

x2y2-client

Kotlin
1
star
49

sdk-react

React components and hooks for use with Rarible SDK
TypeScript
1
star