The Wayback Machine - https://web.archive.org/web/20230210071521/https://github.com/DODOEX/dodoex_v2_subgraph
Skip to content

DODOEX/dodoex_v2_subgraph

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
April 25, 2021 12:09
October 28, 2022 10:48
October 28, 2022 10:48
October 13, 2022 16:48
October 28, 2022 10:48
September 15, 2022 08:29
November 27, 2020 02:11

Subgraph for dodoex.io

The Graph exposes a GraphQL endpoint to query the events and entities within the DODOex ecosystem.

Go to thegraph playground : DODOEX

Go to thegraph playground : vDODO

Go to thegraph playground : ERC20Token

1、 Introduce

Attention

  • In Pair entities,there is a virtual pool type,this is what we use when we do data statistics. In fact, DODO does not have these Pools. Please exclude the Pairs of type 'VIRTUAL'.

What is in OrderHistory

  • Each OrderHistory event emit by DODOSmartRoute contract,if swap goes into the dodo liquidity pool, pool swap event will be ignored.
  • If swap tx isn't from DODOSmartRoute, swap event from each dodo liquidity pool will be record as OrderHistory.

What is in Swap

  • Each swap event emit from dodo liquidity pool

Where to find pool information

  • In Pair we track pool status.

Endpoints

2、 Graphql Examples

  • to get user info
{
  user(id:"0x8982a82a77eaf1cd6f490b67ad982304ecc590af"){
    id
    txCount
    tradingRewardRecieved
  }
}

  • to get pair data for statistics use pairDayData、pairHourData
{
  pairDayDatas(first:100,orderBy:date,orderDirection:desc){
    date
    volumeBase
    volumeQuote
    feeBase
    feeQuote
    baseToken{
      symbol
    }
    quoteToken{
      symbol
    }
  }
}
  • to get crowdpooling info
{
  crowdPoolingDayDatas{
    date
    crowdPooling {
      id
      creator
      baseToken{
        symbol
      }
      quoteToken{
        symbol
      }
    }
    investedQuote
    investCount
    newcome
    poolQuote
  }
  
}