Skip to content

Commit

Permalink
oops, forgot to push haha
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalsine85 committed Jul 22, 2021
1 parent 3ac778d commit ffca752
Show file tree
Hide file tree
Showing 40 changed files with 508 additions and 470 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# DXstats

Transaction and liquidity pool stats for [Honeyswap](https://app.honeyswap.org).
Transaction and liquidity pool stats for [Baoswap](https://www.baoswap.xyz/).

Check it out live: [https://dxstats.eth.link](https://info.honeyswap.org).
Check it out live: [https://dxstats.eth.link](https://info.baoswap.org).

### To Start Development

Expand Down
41 changes: 22 additions & 19 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<!--

<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<script src="https://unpkg.com/react/umd/react.production.min.js" crossorigin></script>
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<script src="https://unpkg.com/react/umd/react.production.min.js" crossorigin></script>

<script src="https://unpkg.com/react-dom/umd/react-dom.production.min.js" crossorigin></script>
<script src="https://unpkg.com/react-dom/umd/react-dom.production.min.js" crossorigin></script>

<script src="https://unpkg.com/react-bootstrap@next/dist/react-bootstrap.min.js" crossorigin></script>
<!--
<script src="https://unpkg.com/react-bootstrap@next/dist/react-bootstrap.min.js" crossorigin></script>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Expand All @@ -24,12 +25,13 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Honeyswap Analytics</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root" />
<!--
<title>Baoswap Analytics</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root" />
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand All @@ -39,5 +41,6 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
</body>

</html>
4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "Honeyswap Analytics",
"name": "View statistics for Honeyswap exchanges.",
"short_name": "Baoswap Analytics",
"name": "View statistics for Baoswap exchanges.",
"icons": [
{
"src": "favicon.ico",
Expand Down
31 changes: 16 additions & 15 deletions src/Theme/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,31 @@ const theme = (darkMode, color) => ({
shadowColor: darkMode ? "#000" : "#2F80ED",
mercuryGray: darkMode ? "#333333" : "#E1E1E1",

text1: darkMode ? "#FAFAFA" : "#1F1F1F",
text2: darkMode ? "#C3C5CB" : "#565A69",
text3: darkMode ? "#6C7284" : "#888D9B",
text4: darkMode ? "#565A69" : "#C3C5CB",
text1: darkMode ? "#50251c" : "#1F1F1F",
text2: darkMode ? "#C3C5CB" : "#50251c",
text3: darkMode ? "#a29b91" : "#888D9B",
text4: darkMode ? "#ce6509" : "#C3C5CB",
text5: darkMode ? "#2C2F36" : "#EDEEF2",

// special case text types
white: "#FFFFFF",

// backgrounds / greys
bg1: darkMode ? "#212429" : "#FAFAFA",
bg1: darkMode ? "rgb(240, 233, 231)" : "#FAFAFA",
bg2: darkMode ? "#2C2F36" : "#F7F8FA",
bg3: darkMode ? "#40444F" : "#EDEEF2",
bg4: darkMode ? "#565A69" : "#CED0D9",
bg5: darkMode ? "#565A69" : "#888D9B",
bg6: darkMode ? "#000" : "#FFFFFF",
bg3: darkMode ? "#a29b91" : "#EDEEF2",
bg4: darkMode ? "#50251c" : "#CED0D9",
bg5: darkMode ? "#50251c" : "#888D9B",
bg6: darkMode ? "rgb(240, 233, 231)" : "#FFFFFF",

//specialty colors
modalBG: darkMode ? "rgba(0,0,0,0.85)" : "rgba(0,0,0,0.6)",
advancedBG: darkMode ? "rgba(0,0,0,0.1)" : "rgba(255,255,255,0.4)",
onlyLight: darkMode ? "#22242a" : "transparent",
advancedBG: darkMode ? "rgb(240, 233, 231)" : "rgba(255,255,255,0.4)",
onlyLight: darkMode ? "#fff8ee" : "transparent",
divider: darkMode ? "rgba(43, 43, 43, 0.435)" : "rgba(43, 43, 43, 0.035)",

//primary colors
primary1: darkMode ? "#2172E5" : "#7CE0D6",
primary1: darkMode ? "#ce6509" : "#7CE0D6",
primary2: darkMode ? "#3680E7" : "#FF8CC3",
primary3: darkMode ? "#4D8FEA" : "#FF99C9",
primary4: darkMode ? "#376bad70" : "#F6DDE8",
Expand All @@ -68,7 +68,7 @@ const theme = (darkMode, color) => ({
primaryText1: darkMode ? "#6da8ff" : "#7CE0D6",

// secondary colors
secondary1: darkMode ? "#2172E5" : "#7CE0D6",
secondary1: darkMode ? "#ce6509" : "#7CE0D6",
secondary2: darkMode ? "#17000b26" : "#F6DDE8",
secondary3: darkMode ? "#17000b26" : "#FDEAF1",

Expand All @@ -79,7 +79,7 @@ const theme = (darkMode, color) => ({
green1: "#27AE60",
yellow1: "#FFE270",
yellow2: "#F3841E",
link: "#2172E5",
link: "#ce6509",
blue: "2f80ed",

background: darkMode
Expand Down Expand Up @@ -247,8 +247,9 @@ export const GlobalStyle = createGlobalStyle`
html {
font-size: 1rem;
font-size: 1em;
font-variant: none;
font-family: 'Montserrat',sans-serif;
color: 'black';
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
Expand Down
4 changes: 2 additions & 2 deletions src/apollo/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ export const clients = {
// }),
[SupportedNetwork.XDAI]: new ApolloClient({
link: new HttpLink({
uri: "https://api.thegraph.com/subgraphs/name/1hive/honeyswap-xdai",
uri: "https://api.thegraph.com/subgraphs/name/vitalsine85/baoswap",
}),
cache: new InMemoryCache(),
shouldBatch: true,
}),
[SupportedNetwork.MATIC]: new ApolloClient({
link: new HttpLink({
uri: "https://api.thegraph.com/subgraphs/name/1hive/honeyswap-polygon",
uri: "https://api.thegraph.com/subgraphs/name/1hive/baoswap-polygon",
}),
cache: new InMemoryCache(),
shouldBatch: true,
Expand Down
45 changes: 20 additions & 25 deletions src/apollo/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { BUNDLE_ID, FACTORY_ADDRESS, SupportedNetwork } from "../constants";

const FACTORY_STARTING_BLOCK = {
// [FACTORY_ADDRESS[SupportedNetwork.MAINNET]]: 10000000,
[FACTORY_ADDRESS[SupportedNetwork.XDAI]]: 11813490,
[FACTORY_ADDRESS[SupportedNetwork.MATIC]]: 14599890,
[FACTORY_ADDRESS[SupportedNetwork.XDAI]]: 14515972,
// [FACTORY_ADDRESS[SupportedNetwork.MATIC]]: 14599890,
};

export const SUBGRAPH_HEALTH = gql`
query health {
indexingStatusForCurrentVersion(subgraphName: "1hive/honeyswap-xdai") {
indexingStatusForCurrentVersion(subgraphName: "vitalsine85/baoswap") {
synced
health
chains {
Expand Down Expand Up @@ -42,9 +42,8 @@ export const GET_BLOCK = gql`
export const GET_BLOCKS = (timestamps) => {
let queryString = "query blocks {";
queryString += timestamps.map((timestamp) => {
return `t${timestamp}:blocks(first: 1, orderBy: timestamp, orderDirection: desc, where: { timestamp_gt: ${timestamp}, timestamp_lt: ${
timestamp + 600
} }) {
return `t${timestamp}:blocks(first: 1, orderBy: timestamp, orderDirection: desc, where: { timestamp_gt: ${timestamp}, timestamp_lt: ${timestamp + 600
} }) {
number
}`;
});
Expand Down Expand Up @@ -405,8 +404,8 @@ export const PAIR_DAY_DATA_BULK = (pairs, startTimestamp) => {
};

export const GLOBAL_CHART = gql`
query honeyswapDayDatas($startTime: Int!, $skip: Int!) {
honeyswapDayDatas(
query baoswapDayDatas($startTime: Int!, $skip: Int!) {
baoswapDayDatas(
first: 1000
skip: $skip
where: { date_gt: $startTime }
Expand All @@ -425,17 +424,15 @@ export const GLOBAL_CHART = gql`
`;

export const GLOBAL_DATA = (factoryAddress, block) => {
const queryString = ` query honeyswapFactories {
honeyswapFactories(
${
block
? `block: { number: ${
block > FACTORY_STARTING_BLOCK[factoryAddress]
? block
: FACTORY_STARTING_BLOCK[factoryAddress]
}}`
: ``
}
const queryString = ` query baoswapFactories {
baoswapFactories(
${block
? `block: { number: ${block > FACTORY_STARTING_BLOCK[factoryAddress]
? block
: FACTORY_STARTING_BLOCK[factoryAddress]
}}`
: ``
}
where: { id: "${factoryAddress}" }) {
id
totalVolumeUSD
Expand Down Expand Up @@ -682,9 +679,8 @@ export const PAIR_DATA = (pairAddress, block) => {
const queryString = `
${PairFields}
query pairs {
pairs(${
block ? `block: {number: ${block}}` : ``
} where: { id: "${pairAddress}"} ) {
pairs(${block ? `block: {number: ${block}}` : ``
} where: { id: "${pairAddress}"} ) {
...PairFields
}
}`;
Expand Down Expand Up @@ -809,9 +805,8 @@ export const TOKEN_DATA = (tokenAddress, block) => {
const queryString = `
${TokenFields}
query tokens {
tokens(${
block ? `block : {number: ${block}}` : ``
} where: {id:"${tokenAddress}"}) {
tokens(${block ? `block : {number: ${block}}` : ``
} where: {id:"${tokenAddress}"}) {
...TokenFields
}
pairs0: pairs(where: {token0: "${tokenAddress}"}, first: 50, orderBy: reserveUSD, orderDirection: desc){
Expand Down
Binary file added src/assets/bao-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/bao.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/baoswap-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 0 additions & 11 deletions src/assets/bee.svg

This file was deleted.

Binary file removed src/assets/hny-logo.png
Binary file not shown.
Loading

0 comments on commit ffca752

Please sign in to comment.