GithubHelp home page GithubHelp logo

dotbithq / das-account-indexer Goto Github PK

View Code? Open in Web Editor NEW
25.0 6.0 4.0 8.55 MB

Mapping relationship between multi-chain's addresses and accounts

License: MIT License

Makefile 0.42% Go 99.26% Dockerfile 0.32%
data-analysis server nervos golang docker

das-account-indexer's Introduction

Das-Account-Indexer

This repo introduces a simple server, which provided some APIs for search DAS account's records or reverse records

Prerequisites

  • Ubuntu >= 18.04
  • MYSQL >= 8.0
  • go version >= 1.21.3
  • Redis >= 5.0 (for cache, not necessary)
  • ckb-node (Must be synced to latest height and add Indexer module to ckb.toml)
  • If the version of the dependency package is too low, please install gcc-multilib (apt install gcc-multilib)
  • Machine configuration: 4c8g200G

Install & Run

Source Compile

# get the code
git clone https://github.com/dotbitHQ/das-account-indexer.git

# init config/config.yaml for your own convenient
cp config/config.example.yaml config/config.yaml

# create mysql database
mysql -uroot -p
> create database das_account_indexer;
> quit;

# compile and run
cd das-account-indexer
make default
./das_account_indexer_server --config=config/config.yaml
# it will take about 3 hours to synchronize to the latest data(Dec 15, 2021)

Docker

  • docker >= 20.10
  • docker-compose >= 2.2.2
sudo curl -L "https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose up -d

if you already have a mysql installed, just run

docker run -dp 8122:8122 -v $PWD/config/config.yaml:/app/config/config.yaml --name das-indexer-server admindid/das-account-indexer:latest

API Usage

Here are the APIs details.

  • If you are a newcomer, just read API List
  • If you are come from das_account_indexer, you probably need do nothing, the new APIs are compatible with the old ones. More details see deprecated-api-list, but we still suggest you replace with the corresponding new APIs

Others

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.