Skip to content

The Midgard Public API queries THORChain and any chains linked via the Bifröst and prepares information about the network to be readily available for public users. The API parses event data from THORChain. Midgard does not hold critical information.

Notifications You must be signed in to change notification settings

thorjealousy/midgard

Repository files navigation

pipeline status

Midgard API


Mirror

This repo mirrors from THORChain Gitlab to Github. To contribute, please contact the team and commit to the Gitlab repo:

https://gitlab.com/thorchain/midgard


=============

Run Midgard API

To run Midgard you will need two terminal windows or tabs. In the first tab, run...

make pg
# create an user (if you have not already done it before)
make create-user
# create a database (if you have not already done it before)
make create-database

In the second tab, run...

make install run

Run mock server

To use a mock server run everything as described in Run Midgard API. After that, run following command in another terminal:

make run-thormock

Run generated specs locally

First, run everything as described in Run chain service and Run mock server by using different terminals.

Open http://127.0.0.1:8080/v1/doc in your browser.

Testing

make test

For rapid testing, in one terminal tab...

make pg

In another tab, run...

make test-internal

If you'd like to run tests everytime there is a change to a go file...

make test-watch

Short Testing

You can run unit tests and omit the ones that require a running instance of timescale running on top of postgres

make test-short

Linting

make lint

About

The Midgard Public API queries THORChain and any chains linked via the Bifröst and prepares information about the network to be readily available for public users. The API parses event data from THORChain. Midgard does not hold critical information.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages