@@ -50,8 +50,8 @@ export default function Transactions({ transactions, txCount }) {
{
key: "__typename",
label: "Type",
- render: (row) => {
- console.log(row)
+ render: (row) => {
+ // console.log(row)
return (
{row.__typename}{" "}
diff --git a/src/core/api/bury-bone.js b/src/core/api/bury-bone.js
new file mode 100644
index 0000000..9092e61
--- /dev/null
+++ b/src/core/api/bury-bone.js
@@ -0,0 +1,60 @@
+import { buryBoneHistoriesQuery, buryBoneQuery, buryBoneUserQuery } from "../queries/bury-bone";
+
+import { getApollo } from "../apollo";
+
+export async function getBuryBone(client = getApollo()) {
+ const { data } = await client.query({
+ query: buryBoneQuery,
+ context: {
+ clientName: "buryBone",
+ },
+ });
+
+ await client.cache.writeQuery({
+ query: buryBoneQuery,
+ data,
+ });
+
+ return await client.cache.readQuery({
+ query: buryBoneQuery,
+ });
+}
+
+export async function getBuryBoneHistories(client = getApollo()) {
+ const { data } = await client.query({
+ query: buryBoneHistoriesQuery,
+ context: {
+ clientName: "buryBone",
+ },
+ });
+
+ await client.cache.writeQuery({
+ query: buryBoneHistoriesQuery,
+ data,
+ });
+
+ return await client.cache.readQuery({
+ query: buryBoneHistoriesQuery,
+ });
+}
+
+export async function getBuryBoneUser(id, client = getApollo()) {
+ const { data } = await client.query({
+ query: buryBoneUserQuery,
+ variables: {
+ id,
+ },
+ context: {
+ clientName: "buryBone",
+ },
+ });
+
+ await client.cache.writeQuery({
+ query: buryBoneUserQuery,
+ data,
+ });
+
+ return await client.cache.readQuery({
+ query: buryBoneUserQuery,
+ });
+}
diff --git a/src/core/api/bury-leash.js b/src/core/api/bury-leash.js
new file mode 100644
index 0000000..6998bf4
--- /dev/null
+++ b/src/core/api/bury-leash.js
@@ -0,0 +1,60 @@
+import { buryLeashHistoriesQuery, buryLeashQuery, buryLeashUserQuery } from "../queries/bury-leash";
+
+import { getApollo } from "../apollo";
+
+export async function getBuryLeash(client = getApollo()) {
+ const { data } = await client.query({
+ query: buryLeashQuery,
+ context: {
+ clientName: "buryLeash",
+ },
+ });
+
+ await client.cache.writeQuery({
+ query: buryLeashQuery,
+ data,
+ });
+
+ return await client.cache.readQuery({
+ query: buryLeashQuery,
+ });
+}
+
+export async function getBuryLeashHistories(client = getApollo()) {
+ const { data } = await client.query({
+ query: buryLeashHistoriesQuery,
+ context: {
+ clientName: "buryLeash",
+ },
+ });
+
+ await client.cache.writeQuery({
+ query: buryLeashHistoriesQuery,
+ data,
+ });
+
+ return await client.cache.readQuery({
+ query: buryLeashHistoriesQuery,
+ });
+}
+
+export async function getBuryLeashUser(id, client = getApollo()) {
+ const { data } = await client.query({
+ query: buryLeashUserQuery,
+ variables: {
+ id,
+ },
+ context: {
+ clientName: "buryLeash",
+ },
+ });
+
+ await client.cache.writeQuery({
+ query: buryLeashUserQuery,
+ data,
+ });
+
+ return await client.cache.readQuery({
+ query: buryLeashUserQuery,
+ });
+}
diff --git a/src/core/api/bury-shib.js b/src/core/api/bury-shib.js
new file mode 100644
index 0000000..216f2c3
--- /dev/null
+++ b/src/core/api/bury-shib.js
@@ -0,0 +1,60 @@
+import { buryShibHistoriesQuery, buryShibQuery, buryShibUserQuery } from "../queries/bury-shib";
+
+import { getApollo } from "../apollo";
+
+export async function getBuryShib(client = getApollo()) {
+ const { data } = await client.query({
+ query: buryShibQuery,
+ context: {
+ clientName: "buryShib",
+ },
+ });
+
+ await client.cache.writeQuery({
+ query: buryShibQuery,
+ data,
+ });
+
+ return await client.cache.readQuery({
+ query: buryShibQuery,
+ });
+}
+
+export async function getBuryShibHistories(client = getApollo()) {
+ const { data } = await client.query({
+ query: buryShibHistoriesQuery,
+ context: {
+ clientName: "buryShib",
+ },
+ });
+
+ await client.cache.writeQuery({
+ query: buryShibHistoriesQuery,
+ data,
+ });
+
+ return await client.cache.readQuery({
+ query: buryShibHistoriesQuery,
+ });
+}
+
+export async function getBuryShibUser(id, client = getApollo()) {
+ const { data } = await client.query({
+ query: buryShibUserQuery,
+ variables: {
+ id,
+ },
+ context: {
+ clientName: "buryShib",
+ },
+ });
+
+ await client.cache.writeQuery({
+ query: buryShibUserQuery,
+ data,
+ });
+
+ return await client.cache.readQuery({
+ query: buryShibUserQuery,
+ });
+}
diff --git a/src/core/api/exchange.js b/src/core/api/exchange.js
index cf1c70b..6fa9093 100644
--- a/src/core/api/exchange.js
+++ b/src/core/api/exchange.js
@@ -14,6 +14,7 @@ import {
} from "../api/blocks";
import { getApollo } from "../apollo";
+import {BONE_TOKEN_ADDRESS} from "app/core/constants";
export async function getFactory(client = getApollo()) {
const {
@@ -57,7 +58,19 @@ export async function getFactory(client = getApollo()) {
}
export async function getSushiToken(client = getApollo()) {
- return await getToken("0x6b3595068778dd592e39a122f4f5a5cf09c90fe2", client);
+ return await getToken(BONE_TOKEN_ADDRESS, client);
+}
+
+export async function getShibToken(client = getApollo()) {
+ return await getToken("0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce", client);
+}
+
+export async function getBoneToken(client = getApollo()) {
+ return await getToken(BONE_TOKEN_ADDRESS, client);
+}
+
+export async function getLeashToken(client = getApollo()) {
+ return await getToken("0x27c70cd1946795b66be9d954418546998b546634", client);
}
export async function getDayData(client = getApollo()) {
diff --git a/src/core/api/index.js b/src/core/api/index.js
index a68f2e6..c0050b2 100644
--- a/src/core/api/index.js
+++ b/src/core/api/index.js
@@ -15,6 +15,9 @@ import {
} from "app/core";
export * from "./bar";
+export * from "./bury-shib";
+export * from "./bury-leash";
+export * from "./bury-bone";
export * from "./blocks";
export * from "./exchange";
export * from "./masterchef";
diff --git a/src/core/api/masterchef.js b/src/core/api/masterchef.js
index 17ae6d5..b51fe49 100644
--- a/src/core/api/masterchef.js
+++ b/src/core/api/masterchef.js
@@ -12,7 +12,7 @@ import {
poolsQuery,
} from "../queries/masterchef";
-import { POOL_DENY } from "app/core/constants";
+import {BONE_TOKEN_ADDRESS, POOL_DENY, TOPDOG_ADDRESS} from "app/core/constants";
import { getApollo } from "../apollo";
import { sub } from "date-fns";
@@ -155,17 +155,17 @@ export async function getPools(client = getApollo()) {
const ethPrice = bundles[0].ethPrice;
const { token } = await getToken(
- "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2"
+ BONE_TOKEN_ADDRESS
);
- const sushiPrice = ethPrice * token.derivedETH;
+ const bonePrice = ethPrice * token.derivedETH;
// MASTERCHEF
const {
data: { liquidityPositions },
} = await client.query({
query: liquidityPositionSubsetQuery,
- variables: { user: "0xc2edad668740f1aa35e4d8f227fb8e17dca888cd" },
+ variables: { user: TOPDOG_ADDRESS },
});
await client.cache.writeQuery({
@@ -176,7 +176,7 @@ export async function getPools(client = getApollo()) {
(pool) =>
!POOL_DENY.includes(pool.id) &&
pool.allocPoint !== "0" &&
- pool.accSushiPerShare !== "0" &&
+ pool.accBonePerShare !== "0" &&
pairs.find((pair) => pair?.id === pool.pair)
)
.map((pool) => {
@@ -205,11 +205,11 @@ export async function getPools(client = getApollo()) {
const rewardPerBlock =
((pool.allocPoint / pool.owner.totalAllocPoint) *
- pool.owner.sushiPerBlock) /
+ pool.owner.bonePerBlock) /
1e18;
- const roiPerBlock = (rewardPerBlock * sushiPrice) / balanceUSD;
+ const roiPerBlock = (rewardPerBlock * bonePrice) / balanceUSD;
const roiPerHour = roiPerBlock * blocksPerHour;
@@ -227,7 +227,7 @@ export async function getPools(client = getApollo()) {
roiPerDay,
roiPerMonth,
roiPerYear,
- rewardPerThousand: 1 * roiPerDay * (1000 / sushiPrice),
+ rewardPerThousand: 1 * roiPerDay * (1000 / bonePrice),
tvl:
(pair.reserveUSD / pair.totalSupply) *
liquidityPosition.liquidityTokenBalance,
diff --git a/src/core/apollo/link.js b/src/core/apollo/link.js
index 10df95d..9149eeb 100644
--- a/src/core/apollo/link.js
+++ b/src/core/apollo/link.js
@@ -3,7 +3,15 @@ import { HttpLink, from, split } from "@apollo/client";
import { RetryLink } from "@apollo/client/link/retry";
export const uniswap = from([
- new RetryLink(),
+ new RetryLink({
+ delay: (count, operation, error) => {
+ return count * 1000 * Math.random();
+ },
+ attempts: {
+ max: 5,
+ retryIf: (error, _operation) => !!error
+ }
+ }),
new HttpLink({
uri: "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2",
shouldBatch: true,
@@ -11,7 +19,15 @@ export const uniswap = from([
]);
export const bar = from([
- new RetryLink(),
+ new RetryLink({
+ delay: (count, operation, error) => {
+ return count * 1000 * Math.random();
+ },
+ attempts: {
+ max: 5,
+ retryIf: (error, _operation) => !!error
+ }
+ }),
new HttpLink({
uri: "https://api.thegraph.com/subgraphs/name/matthewlilley/bar",
shouldBatch: true,
@@ -19,23 +35,47 @@ export const bar = from([
]);
export const masterchef = from([
- new RetryLink(),
+ new RetryLink({
+ delay: (count, operation, error) => {
+ return count * 1000 * Math.random();
+ },
+ attempts: {
+ max: 5,
+ retryIf: (error, _operation) => !!error
+ }
+ }),
new HttpLink({
- uri: "https://api.thegraph.com/subgraphs/name/sushiswap/master-chef",
+ uri: "https://api.thegraph.com/subgraphs/name/shibaswaparmy/topdog",
shouldBatch: true,
}),
]);
export const exchange = from([
- new RetryLink(),
+ new RetryLink({
+ delay: (count, operation, error) => {
+ return count * 1000 * Math.random();
+ },
+ attempts: {
+ max: 5,
+ retryIf: (error, _operation) => !!error
+ }
+ }),
new HttpLink({
- uri: "https://api.thegraph.com/subgraphs/name/sushiswap/exchange",
+ uri: "https://api.thegraph.com/subgraphs/name/shibaswaparmy/exchange",
shouldBatch: true,
}),
]);
export const blocklytics = from([
- new RetryLink(),
+ new RetryLink({
+ delay: (count, operation, error) => {
+ return count * 1000 * Math.random();
+ },
+ attempts: {
+ max: 5,
+ retryIf: (error, _operation) => !!error
+ }
+ }),
new HttpLink({
uri: "https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks",
shouldBatch: true,
@@ -43,13 +83,104 @@ export const blocklytics = from([
]);
export const lockup = from([
- new RetryLink(),
+ new RetryLink({
+ delay: (count, operation, error) => {
+ return count * 1000 * Math.random();
+ },
+ attempts: {
+ max: 5,
+ retryIf: (error, _operation) => !!error
+ }
+ }),
new HttpLink({
uri: "https://api.thegraph.com/subgraphs/name/matthewlilley/lockup",
shouldBatch: true,
}),
]);
+
+export const buryShib = from([
+ new RetryLink({
+ delay: (count, operation, error) => {
+ return count * 1000 * Math.random();
+ },
+ attempts: {
+ max: 5,
+ retryIf: (error, _operation) => !!error
+ }
+ }),
+ new HttpLink({
+ uri: "https://api.thegraph.com/subgraphs/name/shibaswaparmy/buryshib",
+ shouldBatch: true,
+ }),
+]);
+
+export const buryLeash = from([
+ new RetryLink({
+ delay: (count, operation, error) => {
+ return count * 1000 * Math.random();
+ },
+ attempts: {
+ max: 5,
+ retryIf: (error, _operation) => !!error
+ }
+ }),
+ new HttpLink({
+ uri: "https://api.thegraph.com/subgraphs/name/shibaswaparmy/buryleash",
+ shouldBatch: true,
+ }),
+]);
+
+
+export const buryBone = from([
+ new RetryLink({
+ delay: (count, operation, error) => {
+ return count * 1000 * Math.random();
+ },
+ attempts: {
+ max: 5,
+ retryIf: (error, _operation) => !!error
+ }
+ }),
+ new HttpLink({
+ uri: "https://api.thegraph.com/subgraphs/name/shibaswaparmy/burybone",
+ shouldBatch: true,
+ }),
+]);
+
+export const topDog = from([
+ new RetryLink({
+ delay: (count, operation, error) => {
+ return count * 1000 * Math.random();
+ },
+ attempts: {
+ max: 5,
+ retryIf: (error, _operation) => !!error
+ }
+ }),
+ new HttpLink({
+ uri: "https://api.thegraph.com/subgraphs/name/shibaswaparmy/topdog",
+ shouldBatch: true,
+ }),
+]);
+
+export const shibaSwapExchange = from([
+ new RetryLink({
+ delay: (count, operation, error) => {
+ return count * 1000 * Math.random();
+ },
+ attempts: {
+ max: 5,
+ retryIf: (error, _operation) => !!error
+ }
+ }),
+ new HttpLink({
+ uri: "https://api.thegraph.com/subgraphs/name/shibaswaparmy/exchange",
+ shouldBatch: true,
+ }),
+]);
+
+
export default split(
(operation) => {
return operation.getContext().clientName === "blocklytics";
@@ -70,8 +201,28 @@ export default split(
return operation.getContext().clientName === "lockup";
},
lockup,
- exchange
+ split(
+ (operation) => {
+ return operation.getContext().clientName === "buryShib";
+ },
+ buryShib,
+ split(
+ (operation) => {
+ return operation.getContext().clientName === "buryLeash";
+ },
+ buryLeash,
+ split(
+ (operation) => {
+ return operation.getContext().clientName === "buryBone";
+ },
+ buryBone,
+ exchange
+ )
+ )
+ ),
)
)
)
);
+
+
diff --git a/src/core/constants.js b/src/core/constants.js
index 410bc94..7fd19c9 100644
--- a/src/core/constants.js
+++ b/src/core/constants.js
@@ -5,10 +5,17 @@ export const TOKEN_DENY = [
"0xfc989fbb6b3024de5ca0144dc23c18a063942ac1",
];
-export const PAIR_DENY = ["0xb6a741f37d6e455ebcc9f17e2c16d0586c3f57a5"];
+export const PAIR_DENY = []; //"0xb6a741f37d6e455ebcc9f17e2c16d0586c3f57a5"
export const EXCHANGE_CREATED_TIMESTAMP = 1599214239;
-export const POOL_DENY = ["14", "29", "45", "30"];
+export const POOL_DENY = []; //"14", "29", "45", "30"
-export const SUSHI_TOKEN = "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2";
+export const BONE_TOKEN_ADDRESS = "0x9813037ee2218799597d83d4a5b6f3b6778218d9";
+export const LEASH_TOKEN_ADDRESS = "0x27c70cd1946795b66be9d954418546998b546634";
+export const SHIB_TOKEN_ADDRESS = "0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce";
+
+export const BURY_SHIB_ADDRESS = "0xb4a81261b16b92af0b9f7c4a83f1e885132d81e4";
+export const BURY_LEASH_ADDRESS = "0xa57d319b3cf3ad0e4d19770f71e63cf847263a0b";
+export const BURY_BONE_ADDRESS = "0xf7a0383750fef5abace57cc4c9ff98e3790202b3";
+export const TOPDOG_ADDRESS = "0x94235659cf8b805b2c658f9ea2d6d6ddbb17c8d7";
diff --git a/src/core/queries/bury-bone.js b/src/core/queries/bury-bone.js
new file mode 100644
index 0000000..2ac6f83
--- /dev/null
+++ b/src/core/queries/bury-bone.js
@@ -0,0 +1,93 @@
+import gql from "graphql-tag";
+
+export const buryBoneQuery = gql`
+ query buryBoneQuery($id: String! = "0xf7a0383750fef5abace57cc4c9ff98e3790202b3") {
+ bury(id: $id) {
+ id
+ totalSupply
+ ratio
+ tBoneMinted
+ tBoneBurned
+ boneStaked
+ boneStakedUSD
+ boneHarvested
+ boneHarvestedUSD
+ tBoneAge
+ tBoneAgeDestroyed
+ }
+ }
+`;
+
+export const buryBoneHistoriesQuery = gql`
+ query buryBoneHistoriesQuery {
+ histories(first: 1000) {
+ id
+ date
+ timeframe
+ boneStaked
+ boneStakedUSD
+ boneHarvested
+ boneHarvestedUSD
+ tBoneAge
+ tBoneAgeDestroyed
+ tBoneMinted
+ tBoneBurned
+ tBoneSupply
+ ratio
+ }
+ }
+`;
+
+export const buryBoneUserQuery1 = gql`
+ query buryBoneUserQuery($id: String!) {
+ user(id: $id) {
+ id
+ buries {
+ totalSupply
+ boneStaked
+ }
+ tBone
+ boneStaked
+ boneStakedUSD
+ boneHarvested
+ boneHarvestedUSD
+ tBoneIn
+ tBoneOut
+ tBoneOffset
+ tBoneMinted
+ tBoneBurned
+ boneIn
+ boneOut
+ usdIn
+ usdOut
+ createdAt
+ createdAtBlock
+ }
+ }
+`;
+
+export const buryBoneUserQuery = gql`
+ query buryBoneUserQuery($id: String!) {
+ user(id: $id) {
+ id
+ bury{
+ totalSupply
+ boneStaked
+ }
+ tBone
+ boneStaked
+ boneStakedUSD
+ boneHarvested
+ boneHarvestedUSD
+ tBoneIn
+ tBoneOut
+ tBoneOffset
+ tBoneMinted
+ tBoneBurned
+ boneIn
+ boneOut
+ usdIn
+ usdOut
+ }
+ }
+`;
diff --git a/src/core/queries/bury-leash.js b/src/core/queries/bury-leash.js
new file mode 100644
index 0000000..633bc8a
--- /dev/null
+++ b/src/core/queries/bury-leash.js
@@ -0,0 +1,67 @@
+import gql from "graphql-tag";
+
+export const buryLeashQuery = gql`
+ query buryLeashQuery($id: String! = "0xa57d319b3cf3ad0e4d19770f71e63cf847263a0b") {
+ bury(id: $id) {
+ id
+ totalSupply
+ ratio
+ xLeashMinted
+ xLeashBurned
+ leashStaked
+ leashStakedUSD
+ leashHarvested
+ leashHarvestedUSD
+ xLeashAge
+ xLeashAgeDestroyed
+ }
+ }
+`;
+
+export const buryLeashHistoriesQuery = gql`
+ query buryLeashHistoriesQuery {
+ histories(first: 1000) {
+ id
+ date
+ timeframe
+ leashStaked
+ leashStakedUSD
+ leashHarvested
+ leashHarvestedUSD
+ xLeashAge
+ xLeashAgeDestroyed
+ xLeashMinted
+ xLeashBurned
+ xLeashSupply
+ ratio
+ }
+ }
+`;
+
+export const buryLeashUserQuery = gql`
+ query buryLeashUserQuery($id: String!) {
+ user(id: $id) {
+ id
+ bury {
+ totalSupply
+ leashStaked
+ }
+ xLeash
+ leashStaked
+ leashStakedUSD
+ leashHarvested
+ leashHarvestedUSD
+ xLeashIn
+ xLeashOut
+ xLeashOffset
+ xLeashMinted
+ xLeashBurned
+ leashIn
+ leashOut
+ usdIn
+ usdOut
+# createdAt
+# createdAtBlock
+ }
+ }
+`;
diff --git a/src/core/queries/bury-shib.js b/src/core/queries/bury-shib.js
new file mode 100644
index 0000000..6313e70
--- /dev/null
+++ b/src/core/queries/bury-shib.js
@@ -0,0 +1,94 @@
+import gql from "graphql-tag";
+
+export const buryShibQuery = gql`
+ query buryShibQuery($id: String! = "0xb4a81261b16b92af0b9f7c4a83f1e885132d81e4") {
+ bury(id: $id) {
+ id
+ totalSupply
+ ratio
+ xShibMinted
+ xShibBurned
+ shibStaked
+ shibStakedUSD
+ shibHarvested
+ shibHarvestedUSD
+ xShibAge
+ xShibAgeDestroyed
+ }
+ }
+`;
+
+export const buryShibHistoriesQuery = gql`
+ query buryShibHistoriesQuery {
+ histories(first: 1000) {
+ id
+ date
+ timeframe
+ shibStaked
+ shibStakedUSD
+ shibHarvested
+ shibHarvestedUSD
+ xShibAge
+ xShibAgeDestroyed
+ xShibMinted
+ xShibBurned
+ xShibSupply
+ ratio
+ }
+ }
+`;
+
+export const buryShibUserQuery1 = gql`
+ query buryShibUserQuery($id: String!) {
+ user(id: $id) {
+ id
+ buries {
+ totalSupply
+ shibStaked
+ }
+ xShib
+ shibStaked
+ shibStakedUSD
+ shibHarvested
+ shibHarvestedUSD
+ xShibIn
+ xShibOut
+ xShibOffset
+ xShibMinted
+ xShibBurned
+ shibIn
+ shibOut
+ usdIn
+ usdOut
+ createdAt
+ createdAtBlock
+ }
+ }
+`;
+
+
+export const buryShibUserQuery = gql`
+ query buryShibUserQuery($id: String!) {
+ user(id: $id) {
+ id
+ bury {
+ totalSupply
+ shibStaked
+ }
+ xShib
+ shibStaked
+ shibStakedUSD
+ shibHarvested
+ shibHarvestedUSD
+ xShibIn
+ xShibOut
+ xShibOffset
+ xShibMinted
+ xShibBurned
+ shibIn
+ shibOut
+ usdIn
+ usdOut
+ }
+ }
+`;
diff --git a/src/core/queries/exchange.js b/src/core/queries/exchange.js
index 3f04110..16b5f02 100644
--- a/src/core/queries/exchange.js
+++ b/src/core/queries/exchange.js
@@ -2,7 +2,7 @@ import gql from "graphql-tag";
export const factoryQuery = gql`
query factoryQuery(
- $id: String! = "0xc0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac"
+ $id: String! = "0x115934131916c8b277dd010ee02de363c09d037c"
) {
factory(id: $id) {
id
@@ -15,7 +15,7 @@ export const factoryQuery = gql`
export const factoryTimeTravelQuery = gql`
query factoryTimeTravelQuery(
- $id: String! = "0xc0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac"
+ $id: String! = "0x115934131916c8b277dd010ee02de363c09d037c"
$block: Block_height!
) {
factory(id: $id, block: $block) {
diff --git a/src/core/queries/index.js b/src/core/queries/index.js
index 96541c4..4b814cd 100644
--- a/src/core/queries/index.js
+++ b/src/core/queries/index.js
@@ -1,4 +1,7 @@
export * from "./bar";
+export * from "./bury-shib";
+export * from "./bury-leash";
+export * from "./bury-bone"
export * from "./blocks";
export * from "./exchange";
export * from "./masterchef";
diff --git a/src/core/queries/masterchef.js b/src/core/queries/masterchef.js
index ae5db59..1397a18 100644
--- a/src/core/queries/masterchef.js
+++ b/src/core/queries/masterchef.js
@@ -13,7 +13,7 @@ export const lockupUserQuery = gql`
totalAllocPoint
}
balance
- accSushiPerShare
+ accBonePerShare
}
}
}
@@ -27,15 +27,15 @@ const poolUserFragment = gql`
id
pair
balance
- accSushiPerShare
+ accBonePerShare
lastRewardBlock
}
amount
rewardDebt
entryUSD
exitUSD
- sushiHarvested
- sushiHarvestedUSD
+ boneHarvested
+ boneHarvestedUSD
}
`;
@@ -54,16 +54,16 @@ export const poolHistoryQuery = gql`
id
pool {
id
- accSushiPerShare
+ accBonePerShare
}
- slpBalance
- slpAge
- slpAgeRemoved
- slpDeposited
- slpWithdrawn
+ sslpBalance
+ sslpAge
+ sslpAgeRemoved
+ sslpDeposited
+ sslpWithdrawn
entryUSD
exitUSD
- sushiHarvestedUSD
+ boneHarvestedUSD
userCount
timestamp
block
@@ -78,12 +78,12 @@ export const poolQuery = gql`
pair
allocPoint
lastRewardBlock
- accSushiPerShare
+ accBonePerShare
balance
userCount
owner {
id
- sushiPerBlock
+ bonePerBlock
totalAllocPoint
}
users(orderBy: amount, orderDirection: desc) {
@@ -92,7 +92,7 @@ export const poolQuery = gql`
amount
rewardDebt
}
- slpAge
+ sslpAge
liquidityPair @client
timestamp
entryUSD
@@ -136,20 +136,14 @@ export const poolsQuery = gql`
pair
allocPoint
lastRewardBlock
- accSushiPerShare
+ accBonePerShare
balance
userCount
owner {
id
- sushiPerBlock
+ bonePerBlock
totalAllocPoint
}
- # users {
- # id
- # address
- # amount
- # rewardDebt
- # }
liquidityPair @client
roiPerBlock @client
roiPerHour @client
diff --git a/src/pages/_document.js b/src/pages/_document.js
index a86ba90..29a2e95 100644
--- a/src/pages/_document.js
+++ b/src/pages/_document.js
@@ -78,7 +78,7 @@ export default class MyDocument extends Document {
-
+
{/* TWITTER */}
@@ -130,7 +130,7 @@ export default class MyDocument extends Document {
try {
var query = window.matchMedia("(prefers-color-scheme: dark)");
var darkMode = window.localStorage.getItem("darkMode") === "true";
-
+
if (darkMode) {
document.documentElement.classList.add("dark-theme");
}
diff --git a/src/pages/bar/index.js b/src/pages/bury-bone/index.js
similarity index 68%
rename from src/pages/bar/index.js
rename to src/pages/bury-bone/index.js
index 62f6d2a..94394db 100644
--- a/src/pages/bar/index.js
+++ b/src/pages/bury-bone/index.js
@@ -1,18 +1,18 @@
import { AppShell, Curves, KPI } from "app/components";
import { Grid, Paper, useTheme } from "@material-ui/core";
import {
- barHistoriesQuery,
- barQuery,
+ buryBoneHistoriesQuery,
+ buryBoneQuery,
dayDatasQuery,
ethPriceQuery,
factoryQuery,
getApollo,
- getBar,
- getBarHistories,
+ getBuryBone,
+ getBuryBoneHistories,
getDayData,
getEthPrice,
getFactory,
- getSushiToken,
+ getBoneToken,
tokenQuery,
useInterval,
} from "app/core";
@@ -23,6 +23,7 @@ import { ParentSize } from "@visx/responsive";
import React from "react";
import { makeStyles } from "@material-ui/core/styles";
import { useQuery } from "@apollo/client";
+import {BONE_TOKEN_ADDRESS} from "app/core/constants";
const useStyles = makeStyles((theme) => ({
charts: {
@@ -36,24 +37,27 @@ const useStyles = makeStyles((theme) => ({
},
}));
-function BarPage() {
+function BuryBonePage() {
const classes = useStyles();
const theme = useTheme();
- const {
- data: { bar },
- } = useQuery(barQuery, {
+ const results = useQuery(buryBoneQuery, {
context: {
- clientName: "bar",
+ clientName: "buryBone",
},
});
+
+ const {
+ data: { bury },
+ } = results
+
const {
data: { histories },
- } = useQuery(barHistoriesQuery, {
+ } = useQuery(buryBoneHistoriesQuery, {
context: {
- clientName: "bar",
+ clientName: "buryBone",
},
});
@@ -61,11 +65,12 @@ function BarPage() {
data: { factory },
} = useQuery(factoryQuery);
+ // TODO CHANGE
const {
data: { token },
} = useQuery(tokenQuery, {
variables: {
- id: "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2",
+ id: BONE_TOKEN_ADDRESS,
},
});
@@ -77,26 +82,26 @@ function BarPage() {
data: { dayDatas },
} = useQuery(dayDatasQuery);
- const sushiPrice =
+ const bonePrice =
parseFloat(token?.derivedETH) * parseFloat(bundles[0].ethPrice);
useInterval(async () => {
await Promise.all([
- getBar,
- getBarHistories,
+ getBuryBone,
+ getBuryBoneHistories,
getDayData,
getFactory,
- getSushiToken,
+ getBoneToken,
getEthPrice,
]);
}, 60000);
const {
- sushiStakedUSD,
- sushiHarvestedUSD,
- xSushiMinted,
- xSushiBurned,
- xSushi,
+ boneStakedUSD,
+ boneHarvestedUSD,
+ tBoneMinted,
+ tBoneBurned,
+ tBone,
apr,
apy,
fees,
@@ -104,31 +109,31 @@ function BarPage() {
(previousValue, currentValue) => {
const date = currentValue.date * 1000;
const dayData = dayDatas.find((d) => d.date === currentValue.date);
- previousValue["sushiStakedUSD"].push({
+ previousValue["boneStakedUSD"].push({
date,
- value: parseFloat(currentValue.sushiStakedUSD),
+ value: parseFloat(currentValue.boneStakedUSD),
});
- previousValue["sushiHarvestedUSD"].push({
+ previousValue["boneHarvestedUSD"].push({
date,
- value: parseFloat(currentValue.sushiHarvestedUSD),
+ value: parseFloat(currentValue.boneHarvestedUSD),
});
- previousValue["xSushiMinted"].push({
+ previousValue["tBoneMinted"].push({
date,
- value: parseFloat(currentValue.xSushiMinted),
+ value: parseFloat(currentValue.tBoneMinted),
});
- previousValue["xSushiBurned"].push({
+ previousValue["tBoneBurned"].push({
date,
- value: parseFloat(currentValue.xSushiBurned),
+ value: parseFloat(currentValue.tBoneBurned),
});
- previousValue["xSushi"].push({
+ previousValue["tBone"].push({
date,
- value: parseFloat(currentValue.xSushiSupply),
+ value: parseFloat(currentValue.tBoneSupply),
});
const apr =
- (((dayData.volumeUSD * 0.05 * 0.01) / currentValue.xSushiSupply) *
+ (((dayData.volumeUSD * 0.01 * 0.01) / currentValue.tBoneSupply) *
365) /
- (currentValue.ratio * sushiPrice);
+ (currentValue.ratio * bonePrice);
previousValue["apr"].push({
date,
value: parseFloat(apr * 100),
@@ -144,11 +149,11 @@ function BarPage() {
return previousValue;
},
{
- sushiStakedUSD: [],
- sushiHarvestedUSD: [],
- xSushiMinted: [],
- xSushiBurned: [],
- xSushi: [],
+ boneStakedUSD: [],
+ boneHarvestedUSD: [],
+ tBoneMinted: [],
+ tBoneBurned: [],
+ tBone: [],
apr: [],
apy: [],
fees: [],
@@ -162,16 +167,23 @@ function BarPage() {
const oneDayVolume = factory.volumeUSD - factory.oneDay.volumeUSD;
+ const boneApr = dayDatas && (((parseFloat(dayDatas[0]?.volumeUSD) * (0.05 / 3) * 0.05) / parseFloat(bury?.totalSupply)) * 365)
+ / (parseFloat(bury?.ratio) * bonePrice)
+
const APR =
- (((oneDayVolume * 0.05 * 0.01) / bar.totalSupply) * 365) /
- (bar.ratio * sushiPrice);
+ (((oneDayVolume * 0.05 * 0.01) / bury.totalSupply) * 365) /
+ (bury.ratio * bonePrice);
+
+ const APY = Math.pow(1 + boneApr / 365, 365) - 1;
+
+ const boneBoneApr = ((0.9 * parseInt(bonePrice))/(bury?.boneStakedUSD)) * 277 * 24 * 30 * 12 * 100;
- const APY = Math.pow(1 + APR / 365, 365) - 1;
+ const boneBoneApy = Math.pow(1 + boneBoneApr / 365, 365) - 1;
return (
- Sushi Bar | SushiSwap Analytics
+ Bury Bone | ShibaSwap Analytics
@@ -179,27 +191,33 @@ function BarPage() {
{/*
*/}
-
+
-
+ {/*
+ */}
+ {/*
+
+ */}
+
+
-
+
{/*
*/}
-
+
@@ -210,13 +228,13 @@ function BarPage() {
style={{ height: 300, position: "relative" }}
>
*/}
@@ -269,9 +287,9 @@ function BarPage() {
)}
@@ -288,9 +306,9 @@ function BarPage() {
)}
@@ -308,8 +326,8 @@ function BarPage() {
width={width}
height={height}
margin={{ top: 64, right: 32, bottom: 0, left: 64 }}
- data={[xSushiMinted, xSushiBurned]}
- labels={["xSushi Minted", "xSushi Burned"]}
+ data={[tBoneMinted, tBoneBurned]}
+ labels={["tBone Minted", "tBone Burned"]}
/>
)}
@@ -326,17 +344,17 @@ function BarPage() {
)}
{/*
- {/* {JSON.stringify(bar, null, 2)}
*/}
+ {/* {JSON.stringify(bury, null, 2)}
*/}
);
}
export async function getStaticProps() {
const client = getApollo();
- await getBar(client);
- await getBarHistories(client);
+ await getBuryBone(client);
+ await getBuryBoneHistories(client);
await getFactory(client);
await getDayData(client);
- await getSushiToken(client);
+ await getBoneToken(client);
await getEthPrice(client);
return {
props: {
@@ -366,4 +384,4 @@ export async function getStaticProps() {
};
}
-export default BarPage;
+export default BuryBonePage;
diff --git a/src/pages/bury-leash/index.js b/src/pages/bury-leash/index.js
new file mode 100644
index 0000000..acd99ff
--- /dev/null
+++ b/src/pages/bury-leash/index.js
@@ -0,0 +1,400 @@
+import { AppShell, Curves, KPI } from "app/components";
+import { Grid, Paper, useTheme } from "@material-ui/core";
+import {
+ buryLeashHistoriesQuery,
+ buryLeashQuery,
+ dayDatasQuery,
+ ethPriceQuery,
+ factoryQuery,
+ getApollo,
+ getBuryLeash,
+ getBuryLeashHistories,
+ getDayData,
+ getEthPrice,
+ getFactory,
+ getLeashToken,
+ tokenQuery,
+ useInterval,
+ getBoneToken
+} from "app/core";
+
+import Chart from "../../components/Chart";
+import Head from "next/head";
+import { ParentSize } from "@visx/responsive";
+import React from "react";
+import { makeStyles } from "@material-ui/core/styles";
+import { useQuery } from "@apollo/client";
+import {LEASH_TOKEN_ADDRESS, BONE_TOKEN_ADDRESS} from "app/core/constants";
+
+const useStyles = makeStyles((theme) => ({
+ charts: {
+ flexGrow: 1,
+ marginBottom: theme.spacing(4),
+ },
+ paper: {
+ padding: theme.spacing(2),
+ // textAlign: "center",
+ color: theme.palette.text.secondary,
+ },
+}));
+
+function BuryLeashPage() {
+ const classes = useStyles();
+
+ const theme = useTheme();
+
+ const results = useQuery(buryLeashQuery, {
+ context: {
+ clientName: "buryLeash",
+ },
+ });
+
+ // console.log(results);
+
+ const {
+ data: { bury },
+ } = results
+
+ const {
+ data: { histories },
+ } = useQuery(buryLeashHistoriesQuery, {
+ context: {
+ clientName: "buryLeash",
+ },
+ });
+
+ const {
+ data: { factory },
+ } = useQuery(factoryQuery);
+
+ // TODO CHANGE
+ const {
+ data: { token },
+ } = useQuery(tokenQuery, {
+ variables: {
+ id: LEASH_TOKEN_ADDRESS,
+ },
+ });
+
+ const {
+ data: { bundles },
+ } = useQuery(ethPriceQuery);
+
+ const {
+ data: { dayDatas },
+ } = useQuery(dayDatasQuery);
+
+ const leashPrice =
+ parseFloat(token?.derivedETH) * parseFloat(bundles[0].ethPrice);
+
+ useInterval(async () => {
+ await Promise.all([
+ getBuryLeash,
+ getBuryLeashHistories,
+ getDayData,
+ getFactory,
+ getLeashToken,
+ getEthPrice,
+ getBoneToken
+ ]);
+ }, 60000);
+
+ const {
+ leashStakedUSD,
+ leashHarvestedUSD,
+ xLeashMinted,
+ xLeashBurned,
+ xLeash,
+ apr,
+ apy,
+ fees,
+ } = histories.reduce(
+ (previousValue, currentValue) => {
+ const date = currentValue.date * 1000;
+ const dayData = dayDatas.find((d) => d.date === currentValue.date);
+ previousValue["leashStakedUSD"].push({
+ date,
+ value: parseFloat(currentValue.leashStakedUSD),
+ });
+ previousValue["leashHarvestedUSD"].push({
+ date,
+ value: parseFloat(currentValue.leashHarvestedUSD),
+ });
+
+ previousValue["xLeashMinted"].push({
+ date,
+ value: parseFloat(currentValue.xLeashMinted),
+ });
+ previousValue["xLeashBurned"].push({
+ date,
+ value: parseFloat(currentValue.xLeashBurned),
+ });
+ previousValue["xLeash"].push({
+ date,
+ value: parseFloat(currentValue.xLeashSupply),
+ });
+ const apr =
+ (((dayData.volumeUSD * 0.01 * 0.01) / currentValue.xLeashSupply) *
+ 365) /
+ (currentValue.ratio * leashPrice);
+ previousValue["apr"].push({
+ date,
+ value: parseFloat(apr * 100),
+ });
+ previousValue["apy"].push({
+ date,
+ value: parseFloat((Math.pow(1 + apr / 365, 365) - 1) * 100),
+ });
+ previousValue["fees"].push({
+ date,
+ value: parseFloat(dayData.volumeUSD * 0.005),
+ });
+ return previousValue;
+ },
+ {
+ leashStakedUSD: [],
+ leashHarvestedUSD: [],
+ xLeashMinted: [],
+ xLeashBurned: [],
+ xLeash: [],
+ apr: [],
+ apy: [],
+ fees: [],
+ }
+ );
+
+ const averageApy =
+ apy.reduce((previousValue, currentValue) => {
+ return previousValue + currentValue.value;
+ }, 0) / apy.length;
+
+ const oneDayVolume = factory.volumeUSD - factory.oneDay.volumeUSD;
+
+ const leashApr = dayDatas && (((parseFloat(dayDatas[0]?.volumeUSD) * (0.05 / 3) * 0.05) / parseFloat(bury?.totalSupply)) * 365)
+ / (parseFloat(bury?.ratio) * leashPrice)
+
+ const APR =
+ (((oneDayVolume * 0.05 * 0.01) / bury.totalSupply) * 365) /
+ (bury.ratio * leashPrice);
+
+ const APY = Math.pow(1 + leashApr / 365, 365) - 1;
+
+ const boneToken = useQuery(tokenQuery, {
+ variables: {
+ id: BONE_TOKEN_ADDRESS,
+ },
+ });
+
+ const bonePrice =
+ parseFloat(boneToken?.data?.token?.derivedETH) * parseFloat(bundles[0].ethPrice);
+
+ const leashBoneApr = ((0.9 * parseInt(bonePrice))/(bury?.leashStakedUSD)) * 277 * 24 * 30 * 12 * 100;
+
+ const leashBoneApy = Math.pow(1 + leashBoneApr / 365, 365) - 1;
+
+ return (
+
+
+ Bury Leash | ShibaSwap Analytics
+
+
+
+
+
+ {/*
+
+ */}
+
+
+
+ {/*
+
+ */}
+ {/*
+
+ */}
+
+
+
+
+
+
+ {/*
+
+ */}
+
+
+
+
+
+
+ {/*
+
+
+
+ */}
+
+
+
+
+ {({ width, height }) => (
+
+ )}
+
+
+
+
+
+
+
+ {({ width, height }) => (
+
+ )}
+
+
+
+
+ {/*
+
+
+ {({ width, height }) => (
+
+ )}
+
+
+ */}
+
+
+
+
+ {({ width, height }) => (
+
+ )}
+
+
+
+
+
+
+
+ {({ width, height }) => (
+
+ )}
+
+
+
+
+
+
+
+ {({ width, height }) => (
+
+ )}
+
+
+
+ {/* */}
+
+
+
+ {/* {JSON.stringify(bury, null, 2)}
*/}
+
+ );
+}
+
+export async function getStaticProps() {
+ const client = getApollo();
+ await getBuryLeash(client);
+ await getBuryLeashHistories(client);
+ await getFactory(client);
+ await getDayData(client);
+ await getLeashToken(client);
+ await getEthPrice(client);
+ await getBoneToken(client);
+ return {
+ props: {
+ initialApolloState: client.cache.extract(),
+ },
+ revalidate: 1,
+ };
+}
+
+export default BuryLeashPage;
diff --git a/src/pages/bury-shib/index.js b/src/pages/bury-shib/index.js
new file mode 100644
index 0000000..20ea303
--- /dev/null
+++ b/src/pages/bury-shib/index.js
@@ -0,0 +1,407 @@
+import { AppShell, Curves, KPI } from "app/components";
+import { Grid, Paper, useTheme } from "@material-ui/core";
+import {
+ buryShibHistoriesQuery,
+ buryShibQuery,
+ dayDatasQuery,
+ ethPriceQuery,
+ factoryQuery,
+ getApollo,
+ getBuryShib,
+ getBuryShibHistories,
+ getDayData,
+ getEthPrice,
+ getFactory,
+ getShibToken,
+ tokenQuery,
+ useInterval,
+ getBoneToken
+} from "app/core";
+
+import Chart from "../../components/Chart";
+import Head from "next/head";
+import { ParentSize } from "@visx/responsive";
+import React from "react";
+import { makeStyles } from "@material-ui/core/styles";
+import { useQuery } from "@apollo/client";
+import {SHIB_TOKEN_ADDRESS, BONE_TOKEN_ADDRESS} from "app/core/constants";
+
+const useStyles = makeStyles((theme) => ({
+ charts: {
+ flexGrow: 1,
+ marginBottom: theme.spacing(4),
+ },
+ paper: {
+ padding: theme.spacing(2),
+ // textAlign: "center",
+ color: theme.palette.text.secondary,
+ },
+}));
+
+function BuryShibPage() {
+ const classes = useStyles();
+
+ const theme = useTheme();
+
+ const {
+ data: { bury },
+ } = useQuery(buryShibQuery, {
+ context: {
+ clientName: "buryShib",
+ },
+ });
+
+ const {
+ data: { histories },
+ } = useQuery(buryShibHistoriesQuery, {
+ context: {
+ clientName: "buryShib",
+ },
+ });
+
+ const {
+ data: { factory },
+ } = useQuery(factoryQuery);
+
+ // TODO CHANGE
+ const {
+ data: { token },
+ } = useQuery(tokenQuery, {
+ variables: {
+ id: SHIB_TOKEN_ADDRESS,
+ },
+ });
+
+ const boneToken = useQuery(tokenQuery, {
+ variables: {
+ id: BONE_TOKEN_ADDRESS,
+ },
+ });
+
+ const {
+ data: { bundles },
+ } = useQuery(ethPriceQuery);
+
+ const {
+ data: { dayDatas },
+ } = useQuery(dayDatasQuery);
+
+ const shibPrice =
+ parseFloat(token?.derivedETH) * parseFloat(bundles[0].ethPrice);
+
+ useInterval(async () => {
+ await Promise.all([
+ getBuryShib,
+ getBuryShibHistories,
+ getDayData,
+ getFactory,
+ getShibToken,
+ getEthPrice,
+ getBoneToken
+ ]);
+ }, 60000);
+
+ const {
+ shibStakedUSD,
+ shibHarvestedUSD,
+ xShibMinted,
+ xShibBurned,
+ xShib,
+ apr,
+ apy,
+ fees,
+ } = histories.reduce(
+ (previousValue, currentValue) => {
+ const date = currentValue.date * 1000;
+ const dayData = dayDatas.find((d) => d.date === currentValue.date);
+ previousValue["shibStakedUSD"].push({
+ date,
+ value: parseFloat(currentValue.shibStakedUSD),
+ });
+ previousValue["shibHarvestedUSD"].push({
+ date,
+ value: parseFloat(currentValue.shibHarvestedUSD),
+ });
+
+ previousValue["xShibMinted"].push({
+ date,
+ value: parseFloat(currentValue.xShibMinted),
+ });
+ previousValue["xShibBurned"].push({
+ date,
+ value: parseFloat(currentValue.xShibBurned),
+ });
+ previousValue["xShib"].push({
+ date,
+ value: parseFloat(currentValue.xShibSupply),
+ });
+ const apr =
+ (((dayData.volumeUSD * 0.01 * 0.01) / currentValue.xShibSupply) *
+ 365) /
+ (currentValue.ratio * shibPrice);
+ previousValue["apr"].push({
+ date,
+ value: parseFloat(apr * 100),
+ });
+ previousValue["apy"].push({
+ date,
+ value: parseFloat((Math.pow(1 + apr / 365, 365) - 1) * 100),
+ });
+ previousValue["fees"].push({
+ date,
+ value: parseFloat(dayData.volumeUSD * 0.005),
+ });
+ return previousValue;
+ },
+ {
+ shibStakedUSD: [],
+ shibHarvestedUSD: [],
+ xShibMinted: [],
+ xShibBurned: [],
+ xShib: [],
+ apr: [],
+ apy: [],
+ fees: [],
+ }
+ );
+
+ const averageApy =
+ apy.reduce((previousValue, currentValue) => {
+ return previousValue + currentValue.value;
+ }, 0) / apy.length;
+
+ const oneDayVolume = factory.volumeUSD - factory.oneDay.volumeUSD;
+
+ const shibApr = dayDatas && (((parseFloat(dayDatas[0]?.volumeUSD) * (0.05 / 3) * 0.05) / parseFloat(bury?.totalSupply)) * 365)
+ / (parseFloat(bury?.ratio) * shibPrice)
+
+ const APR =
+ (((oneDayVolume * (0.05 / 3) * 0.2) / bury.totalSupply) * 365) /
+ (bury.ratio * shibPrice);
+
+ const APY = Math.pow(1 + shibApr / 365, 365) - 1;
+
+ const bonePrice =
+ parseFloat(boneToken?.data?.token?.derivedETH) * parseFloat(bundles[0].ethPrice);
+
+ const shibBoneApr = ((2.7 * parseInt(bonePrice))/(bury?.shibStakedUSD)) * 277 * 24 * 30 * 12 * 100;
+
+ const shibBoneApy = Math.pow(1 + shibBoneApr / 365, 365) - 1;
+
+ const shibEthApr = dayDatas && (((dayDatas[0]?.volumeUSD * 0.1) / bury?.totalSupply) * 365) / (bury?.ratio * shibPrice)
+
+ const shibEthAPY = Math.pow(1 + shibEthApr / 365, 365) - 1;
+
+
+ return (
+
+
+ Bury Shib | ShibaSwap Analytics
+
+
+
+
+
+ {/*
+
+ */}
+
+
+
+ {/*
+
+ */}
+ {/*
+
+ */}
+
+
+
+ {/*
+
+ */}
+
+
+
+
+
+
+ {/*
+
+ */}
+
+
+
+
+
+
+ {/*
+
+
+
+ */}
+
+
+
+
+ {({ width, height }) => (
+
+ )}
+
+
+
+
+
+
+
+ {({ width, height }) => (
+
+ )}
+
+
+
+
+ {/*
+
+
+ {({ width, height }) => (
+
+ )}
+
+
+ */}
+
+
+
+
+ {({ width, height }) => (
+
+ )}
+
+
+
+
+
+
+
+ {({ width, height }) => (
+
+ )}
+
+
+
+
+
+
+
+ {({ width, height }) => (
+
+ )}
+
+
+
+ {/* */}
+
+
+
+ {/* {JSON.stringify(bury, null, 2)}
*/}
+
+ );
+}
+
+export async function getStaticProps() {
+ const client = getApollo();
+ await getBuryShib(client);
+ await getBuryShibHistories(client);
+ await getFactory(client);
+ await getDayData(client);
+ await getShibToken(client);
+ await getEthPrice(client);
+ await getBoneToken(client);
+ return {
+ props: {
+ initialApolloState: client.cache.extract(),
+ },
+ revalidate: 1,
+ };
+}
+
+export default BuryShibPage;
diff --git a/src/pages/index.js b/src/pages/index.js
index a456e33..fc891cf 100644
--- a/src/pages/index.js
+++ b/src/pages/index.js
@@ -83,7 +83,7 @@ function IndexPage() {
return (
- Dashboard | SushiSwap Analytics
+ Dashboard | ShibaSwap Analytics
@@ -138,13 +138,22 @@ function IndexPage() {
+
+
+
+
+
+
+
+
+
);
diff --git a/src/pages/pairs/[id].js b/src/pages/pairs/[id].js
index a6e278c..cef9f5d 100644
--- a/src/pages/pairs/[id].js
+++ b/src/pages/pairs/[id].js
@@ -188,7 +188,7 @@ function PairPage(props) {
- {pair.token0.symbol}-{pair.token1.symbol} | SushiSwap Analytics
+ {pair.token0.symbol}-{pair.token1.symbol} | ShibaSwap Analytics
@@ -201,7 +201,7 @@ function PairPage(props) {
diff --git a/src/pages/pairs/gainers.js b/src/pages/pairs/gainers.js
index 8ab8f51..34eb495 100644
--- a/src/pages/pairs/gainers.js
+++ b/src/pages/pairs/gainers.js
@@ -20,7 +20,7 @@ function GainersPage() {
return (
- Top Gainers | SushiSwap Analytics
+ Top Gainers | ShibaSwap Analytics
diff --git a/src/pages/pairs/index.js b/src/pages/pairs/index.js
index fdb4704..b07c70d 100644
--- a/src/pages/pairs/index.js
+++ b/src/pages/pairs/index.js
@@ -13,7 +13,7 @@ function PairsPage() {
return (
- Pairs | SushiSwap Analytics
+ Pairs | ShibaSwap Analytics
diff --git a/src/pages/pairs/losers.js b/src/pages/pairs/losers.js
index 3f017cc..f819e90 100644
--- a/src/pages/pairs/losers.js
+++ b/src/pages/pairs/losers.js
@@ -20,7 +20,7 @@ function LosersPage() {
return (
- Top Losers | SushiSwap Analytics
+ Top Losers | ShibaSwap Analytics
diff --git a/src/pages/pairs/recent.js b/src/pages/pairs/recent.js
index ea88fee..7c21096 100644
--- a/src/pages/pairs/recent.js
+++ b/src/pages/pairs/recent.js
@@ -22,7 +22,7 @@ function RecentPairsPage() {
return (
- Recently Added Pairs | SushiSwap Analytics
+ Recently Added Pairs | ShibaSwap Analytics
diff --git a/src/pages/pools/[id].js b/src/pages/pools/[id].js
index abc8bbb..71bfa46 100644
--- a/src/pages/pools/[id].js
+++ b/src/pages/pools/[id].js
@@ -25,14 +25,14 @@ import {
getPoolHistories,
getPoolIds,
getPools,
- getSushiToken,
+ getBoneToken,
poolHistoryQuery,
poolQuery,
tokenQuery,
} from "app/core";
import Head from "next/head";
-import { POOL_DENY } from "app/core/constants";
+import {BONE_TOKEN_ADDRESS, POOL_DENY} from "app/core/constants";
import { ParentSize } from "@visx/responsive";
import { deepPurple } from "@material-ui/core/colors";
import { useQuery } from "@apollo/client";
@@ -87,7 +87,7 @@ function PoolPage() {
data: { token },
} = useQuery(tokenQuery, {
variables: {
- id: "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2",
+ id: BONE_TOKEN_ADDRESS,
},
});
@@ -95,49 +95,49 @@ function PoolPage() {
parseFloat(token?.derivedETH) * parseFloat(bundles[0].ethPrice);
const {
- slpAge,
- slpAgeRemoved,
+ sslpAge,
+ sslpAgeRemoved,
userCount,
- slpDeposited,
- slpWithdrawn,
- slpAgeAverage,
- slpBalance,
+ sslpDeposited,
+ sslpWithdrawn,
+ sslpAgeAverage,
+ sslpBalance,
tvl,
} = poolHistories.reduce(
(previousValue, currentValue) => {
const date = currentValue.timestamp * 1000;
- previousValue.slpAge.push({
+ previousValue.sslpAge.push({
date,
- value: currentValue.slpAge,
+ value: currentValue.sslpAge,
});
- const slpAgeAverage =
- parseFloat(currentValue.slpAge) / parseFloat(currentValue.slpBalance);
+ const sslpAgeAverage =
+ parseFloat(currentValue.sslpAge) / parseFloat(currentValue.sslpBalance);
- previousValue.slpAgeAverage.push({
+ previousValue.sslpAgeAverage.push({
date,
- value: !Number.isNaN(slpAgeAverage) ? slpAgeAverage : 0,
+ value: !Number.isNaN(sslpAgeAverage) ? sslpAgeAverage : 0,
});
- previousValue.slpAgeRemoved.push({
+ previousValue.sslpAgeRemoved.push({
date,
- value: currentValue.slpAgeRemoved,
+ value: currentValue.sslpAgeRemoved,
});
- previousValue.slpBalance.push({
+ previousValue.sslpBalance.push({
date,
- value: parseFloat(currentValue.slpBalance),
+ value: parseFloat(currentValue.sslpBalance),
});
- previousValue.slpDeposited.push({
+ previousValue.sslpDeposited.push({
date,
- value: parseFloat(currentValue.slpDeposited),
+ value: parseFloat(currentValue.sslpDeposited),
});
- previousValue.slpWithdrawn.push({
+ previousValue.sslpWithdrawn.push({
date,
- value: parseFloat(currentValue.slpWithdrawn),
+ value: parseFloat(currentValue.sslpWithdrawn),
});
previousValue.tvl.push({
@@ -145,7 +145,7 @@ function PoolPage() {
value:
(parseFloat(pool.liquidityPair.reserveUSD) /
parseFloat(pool.liquidityPair.totalSupply)) *
- parseFloat(currentValue.slpBalance),
+ parseFloat(currentValue.sslpBalance),
});
previousValue.userCount.push({
@@ -158,12 +158,12 @@ function PoolPage() {
{
entries: [],
exits: [],
- slpAge: [],
- slpAgeAverage: [],
- slpAgeRemoved: [],
- slpBalance: [],
- slpDeposited: [],
- slpWithdrawn: [],
+ sslpAge: [],
+ sslpAgeAverage: [],
+ sslpAgeRemoved: [],
+ sslpBalance: [],
+ sslpDeposited: [],
+ sslpWithdrawn: [],
tvl: [],
userCount: [],
}
@@ -172,7 +172,7 @@ function PoolPage() {
return (
- Pool {id} | SushiSwap Analytics
+ Pool {id} | ShibaSwap Analytics
@@ -197,16 +197,11 @@ function PoolPage() {
- Stake SLP
+ Stake SSLP
@@ -226,9 +221,9 @@ function PoolPage() {
@@ -238,7 +233,7 @@ function PoolPage() {
{/*
@@ -249,7 +244,7 @@ function PoolPage() {
)}
/>
*/}
- {/*
+ {/*
)}
@@ -313,8 +308,8 @@ function PoolPage() {
width={width}
height={height}
margin={{ top: 64, right: 32, bottom: 0, left: 64 }}
- data={[slpDeposited, slpWithdrawn]}
- labels={["SLP Deposited", "SLP Age Withdrawn"]}
+ data={[sslpDeposited, sslpWithdrawn]}
+ labels={["SSLP Deposited", "SSLP Age Withdrawn"]}
/>
)}
@@ -334,11 +329,11 @@ function PoolPage() {
{({ width, height }) => (
)}
@@ -382,11 +377,11 @@ function PoolPage() {
{({ width, height }) => (
)}
@@ -442,7 +437,7 @@ function PoolPage() {
export async function getStaticProps({ params: { id } }) {
const client = getApollo();
await getEthPrice(client);
- await getSushiToken(client);
+ await getBoneToken(client);
await getPool(id, client);
await getPoolHistories(id, client);
return {
diff --git a/src/pages/pools/index.js b/src/pages/pools/index.js
index 631b49f..96bffcf 100644
--- a/src/pages/pools/index.js
+++ b/src/pages/pools/index.js
@@ -19,7 +19,7 @@ function PoolsPage() {
return (
- Pools | SushiSwap Analytics
+ Pools | ShibaSwap Analytics
- Recently Added Pools | SushiSwap Analytics
+ Recently Added Pools | ShibaSwap Analytics
- {currencyFormatter.format(price || 0)} | {token.symbol} | SushiSwap
+ {currencyFormatter.format(price || 0)} | {token.symbol} | ShibaSwap
Analytics
@@ -198,14 +198,14 @@ function TokenPage() {
Add Liquidity
diff --git a/src/pages/tokens/index.js b/src/pages/tokens/index.js
index 8ffba26..0e9de22 100644
--- a/src/pages/tokens/index.js
+++ b/src/pages/tokens/index.js
@@ -24,7 +24,7 @@ function TokensPage() {
return (
- Tokens | SushiSwap Analytics
+ Tokens | ShibaSwap Analytics
diff --git a/src/pages/users/[id].js b/src/pages/users/[id].js
index 78b9062..1a83cc5 100644
--- a/src/pages/users/[id].js
+++ b/src/pages/users/[id].js
@@ -26,7 +26,9 @@ import {
getLatestBlock,
getPairs,
getPoolUser,
- getSushiToken,
+ getBoneToken,
+ getShibToken,
+ getLeashToken,
getToken,
getUser,
latestBlockQuery,
@@ -37,13 +39,19 @@ import {
tokenQuery,
useInterval,
userIdsQuery,
- userQuery,
+ userQuery,
+ buryShibUserQuery,
+ buryLeashUserQuery,
+ buryBoneUserQuery,
+ getBuryBoneUser,
+ getBuryShibUser,
+ getBuryLeashUser
} from "app/core";
import { getUnixTime, startOfMinute, startOfSecond } from "date-fns";
import { AvatarGroup } from "@material-ui/lab";
import Head from "next/head";
-import { POOL_DENY } from "app/core/constants";
+import {BONE_TOKEN_ADDRESS, SHIB_TOKEN_ADDRESS, LEASH_TOKEN_ADDRESS, POOL_DENY} from "app/core/constants";
import { toChecksumAddress } from "web3-utils";
import { useQuery } from "@apollo/client";
import { useRouter } from "next/router";
@@ -77,15 +85,36 @@ function UserPage() {
pollInterval: 60000,
});
- const { data: barData } = useQuery(barUserQuery, {
+ const { data: buryShibData } = useQuery(buryShibUserQuery, {
variables: {
id: id.toLowerCase(),
},
+ fetchPolicy: "no-cache",
context: {
- clientName: "bar",
+ clientName: "buryShib",
},
});
+ const { data: buryBoneData } = useQuery(buryBoneUserQuery, {
+ variables: {
+ id: id.toLowerCase(),
+ },
+ fetchPolicy: "no-cache",
+ context: {
+ clientName: "buryBone",
+ },
+ });
+ const { data: buryLeashData } = useQuery(buryLeashUserQuery, {
+ variables: {
+ id: id.toLowerCase(),
+ },
+ fetchPolicy: "no-cache",
+ context: {
+ clientName: "buryLeash",
+ },
+ });
+
+
const { data: poolData } = useQuery(poolUserQuery, {
variables: {
address: id.toLowerCase(),
@@ -99,7 +128,21 @@ function UserPage() {
data: { token },
} = useQuery(tokenQuery, {
variables: {
- id: "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2",
+ id: BONE_TOKEN_ADDRESS,
+ },
+ });
+
+ // console.log("token:: ", token)
+
+ const shibTokenData = useQuery(tokenQuery, {
+ variables: {
+ id: SHIB_TOKEN_ADDRESS,
+ },
+ });
+
+ const leashTokenData = useQuery(tokenQuery, {
+ variables: {
+ id: LEASH_TOKEN_ADDRESS,
},
});
@@ -119,7 +162,7 @@ function UserPage() {
// () =>
// Promise.all([
// getPairs,
- // getSushiToken,
+ // getBoneToken,
// getPoolUser(id.toLowerCase()),
// getBarUser(id.toLocaleLowerCase()),
// getEthPrice,
@@ -127,57 +170,149 @@ function UserPage() {
// 60000
// );
- const sushiPrice =
+ const bonePrice =
parseFloat(token?.derivedETH) * parseFloat(bundles[0].ethPrice);
+ const shibPrice =
+ parseFloat(shibTokenData?.data?.token?.derivedETH) * parseFloat(bundles[0].ethPrice);
+ const leashPrice =
+ parseFloat(leashTokenData?.data?.token.derivedETH) * parseFloat(bundles[0].ethPrice);
+
+ const { data: blocksData } = useQuery(latestBlockQuery, {
+ context: {
+ clientName: "blocklytics",
+ },
+ });
- // BAR
- const xSushi = parseFloat(barData?.user?.xSushi);
+ // BAR - Bury Bone
+ const tBone = parseFloat(buryBoneData?.user?.tBone);
- const barPending =
- (xSushi * parseFloat(barData?.user?.bar?.sushiStaked)) /
- parseFloat(barData?.user?.bar?.totalSupply);
+ const buryBonePending =
+ (tBone * parseFloat(buryBoneData?.user?.bury?.boneStaked)) /
+ parseFloat(buryBoneData?.user?.bury?.totalSupply);
- const xSushiTransfered =
- barData?.user?.xSushiIn > barData?.user?.xSushiOut
- ? parseFloat(barData?.user?.xSushiIn) -
- parseFloat(barData?.user?.xSushiOut)
- : parseFloat(barData?.user?.xSushiOut) -
- parseFloat(barData?.user?.xSushiIn);
+ const tBoneTransfered =
+ buryBoneData?.user?.tBoneIn > buryBoneData?.user?.tBoneOut
+ ? parseFloat(buryBoneData?.user?.tBoneIn) -
+ parseFloat(buryBoneData?.user?.tBoneOut)
+ : parseFloat(buryBoneData?.user?.tBoneOut) -
+ parseFloat(buryBoneData?.user?.tBoneIn);
- const barStaked = barData?.user?.sushiStaked;
+ const buryBoneStaked = buryBoneData?.user?.boneStaked;
- const barStakedUSD = barData?.user?.sushiStakedUSD;
+ const buryBoneStakedUSD = buryBoneData?.user?.boneStakedUSD;
- const barHarvested = barData?.user?.sushiHarvested;
- const barHarvestedUSD = barData?.user?.sushiHarvestedUSD;
+ const buryBoneHarvested = buryBoneData?.user?.boneHarvested;
+ const buryBoneHarvestedUSD = buryBoneData?.user?.boneHarvestedUSD;
- const barPendingUSD = barPending > 0 ? barPending * sushiPrice : 0;
+ const buryBonePendingUSD = buryBonePending > 0 ? buryBonePending * bonePrice : 0;
- const barRoiSushi =
- barPending -
- (parseFloat(barData?.user?.sushiStaked) -
- parseFloat(barData?.user?.sushiHarvested) +
- parseFloat(barData?.user?.sushiIn) -
- parseFloat(barData?.user?.sushiOut));
+ const buryBoneRoiBone =
+ buryBonePending -
+ (parseFloat(buryBoneData?.user?.boneStaked) -
+ parseFloat(buryBoneData?.user?.boneHarvested) +
+ parseFloat(buryBoneData?.user?.boneIn) -
+ parseFloat(buryBoneData?.user?.boneOut));
- const barRoiUSD =
- barPendingUSD -
- (parseFloat(barData?.user?.sushiStakedUSD) -
- parseFloat(barData?.user?.sushiHarvestedUSD) +
- parseFloat(barData?.user?.usdIn) -
- parseFloat(barData?.user?.usdOut));
+ const buryBoneRoiUSD =
+ buryBonePendingUSD -
+ (parseFloat(buryBoneData?.user?.boneStakedUSD) -
+ parseFloat(buryBoneData?.user?.boneHarvestedUSD) +
+ parseFloat(buryBoneData?.user?.usdIn) -
+ parseFloat(buryBoneData?.user?.usdOut));
- const { data: blocksData } = useQuery(latestBlockQuery, {
- context: {
- clientName: "blocklytics",
- },
- });
+ // const buryBoneBlockDifference =
+ // parseInt(blocksData?.blocks[0].number) -
+ // parseInt(buryBoneData?.user?.createdAtBlock);
+
+ // const buryBoneRoiDailyBone = (buryBoneRoiBone / buryBoneBlockDifference) * 6440;
+
+ // Bury Shib
+ const xShib = parseFloat(buryShibData?.user?.xShib);
- const blockDifference =
- parseInt(blocksData?.blocks[0].number) -
- parseInt(barData?.user?.createdAtBlock);
+ const buryShibPending =
+ (xShib * parseFloat(buryShibData?.user?.bury?.shibStaked)) /
+ parseFloat(buryShibData?.user?.bury?.totalSupply);
- const barRoiDailySushi = (barRoiSushi / blockDifference) * 6440;
+ const xShibTransfered =
+ buryShibData?.user?.xShibIn > buryShibData?.user?.xShibOut
+ ? parseFloat(buryShibData?.user?.xShibIn) -
+ parseFloat(buryShibData?.user?.xShibOut)
+ : parseFloat(buryShibData?.user?.xShibOut) -
+ parseFloat(buryShibData?.user?.xShibIn);
+
+ const buryShibStaked = buryShibData?.user?.shibStaked;
+
+ const buryShibStakedUSD = buryShibData?.user?.shibStakedUSD;
+
+ const buryShibHarvested = buryShibData?.user?.shibHarvested;
+ const buryShibHarvestedUSD = buryShibData?.user?.shibHarvestedUSD;
+
+ const buryShibPendingUSD = buryShibPending > 0 ? buryShibPending * shibPrice : 0;
+
+ const buryShibRoiShib =
+ buryShibPending -
+ (parseFloat(buryShibData?.user?.shibStaked) -
+ parseFloat(buryShibData?.user?.shibHarvested) +
+ parseFloat(buryShibData?.user?.shibIn) -
+ parseFloat(buryShibData?.user?.shibOut));
+
+ const buryShibRoiUSD =
+ buryShibPendingUSD -
+ (parseFloat(buryShibData?.user?.shibStakedUSD) -
+ parseFloat(buryShibData?.user?.shibHarvestedUSD) +
+ parseFloat(buryShibData?.user?.usdIn) -
+ parseFloat(buryShibData?.user?.usdOut));
+
+
+ // const buryShibBlockDifference =
+ // parseInt(blocksData?.blocks[0].number) -
+ // parseInt(buryShibData?.user?.createdAtBlock);
+
+ // const buryShibRoiDailyShib = (buryShibRoiShib / buryShibBlockDifference) * 6440;
+
+
+ // Bury Leash
+ const xLeash = parseFloat(buryLeashData?.user?.xLeash);
+
+ const buryLeashPending =
+ (xLeash * parseFloat(buryLeashData?.user?.bury?.leashStaked)) /
+ parseFloat(buryLeashData?.user?.bury?.totalSupply);
+
+ const xLeashTransfered =
+ buryLeashData?.user?.xLeashIn > buryLeashData?.user?.xLeashOut
+ ? parseFloat(buryLeashData?.user?.xLeashIn) -
+ parseFloat(buryLeashData?.user?.xLeashOut)
+ : parseFloat(buryLeashData?.user?.xLeashOut) -
+ parseFloat(buryLeashData?.user?.xLeashIn);
+
+ const buryLeashStaked = buryLeashData?.user?.leashStaked;
+
+ const buryLeashStakedUSD = buryLeashData?.user?.leashStakedUSD;
+
+ const buryLeashHarvested = buryLeashData?.user?.leashHarvested;
+ const buryLeashHarvestedUSD = buryLeashData?.user?.leashHarvestedUSD;
+
+ const buryLeashPendingUSD = buryLeashPending > 0 ? buryLeashPending * leashPrice : 0;
+
+ const buryLeashRoiLeash =
+ buryLeashPending -
+ (parseFloat(buryLeashData?.user?.leashStaked) -
+ parseFloat(buryLeashData?.user?.leashHarvested) +
+ parseFloat(buryLeashData?.user?.leashIn) -
+ parseFloat(buryLeashData?.user?.leashOut));
+
+ const buryLeashRoiUSD =
+ buryLeashPendingUSD -
+ (parseFloat(buryLeashData?.user?.leashStakedUSD) -
+ parseFloat(buryLeashData?.user?.leashHarvestedUSD) +
+ parseFloat(buryLeashData?.user?.usdIn) -
+ parseFloat(buryLeashData?.user?.usdOut));
+
+ // const buryLeashBlockDifference =
+ // parseInt(blocksData?.blocks[0].number) -
+ // parseInt(buryLeashData?.user?.createdAtBlock);
+
+ // const buryLeashRoiDailyLeash = (buryLeashRoiLeash / buryLeashBlockDifference) * 6440;
// POOLS
@@ -194,11 +329,11 @@ function UserPage() {
poolUsers?.reduce((previousValue, currentValue) => {
return (
previousValue +
- ((currentValue.amount * currentValue.pool.accSushiPerShare) / 1e12 -
+ ((currentValue.amount * currentValue.pool.accBonePerShare) / 1e12 -
currentValue.rewardDebt) /
1e18
);
- }, 0) * sushiPrice;
+ }, 0) * bonePrice;
const [
poolEntriesUSD,
@@ -210,7 +345,7 @@ function UserPage() {
return [
entries + parseFloat(currentValue.entryUSD),
exits + parseFloat(currentValue.exitUSD),
- harvested + parseFloat(currentValue.sushiHarvestedUSD),
+ harvested + parseFloat(currentValue.boneHarvestedUSD),
];
},
[0, 0, 0]
@@ -219,15 +354,26 @@ function UserPage() {
// Global
// const originalInvestments =
- // parseFloat(barData?.user?.sushiStakedUSD) + parseFloat(poolEntriesUSD);
+ // parseFloat(barData?.user?.boneStakedUSD) + parseFloat(poolEntriesUSD);
+
+ // const investments =
+ // poolEntriesUSD + barPendingUSD + poolsPendingUSD + poolExitsUSD;
+
+ const buryBoneInvestments =
+ poolEntriesUSD + buryBonePendingUSD + poolsPendingUSD + poolExitsUSD;
+ const buryShibInvestments =
+ poolEntriesUSD + buryShibPendingUSD + poolsPendingUSD + poolExitsUSD;
+ const buryLeashInvestments =
+ poolEntriesUSD + buryLeashPendingUSD + poolsPendingUSD + poolExitsUSD;
- const investments =
- poolEntriesUSD + barPendingUSD + poolsPendingUSD + poolExitsUSD;
+ const buryShibComing = false
+ const buryLeashComing = false
+ const buryBoneComing = false
return (
- User {id} | SushiSwap Analytics
+ User {id} | ShibaSwap Analytics
@@ -236,18 +382,24 @@ function UserPage() {
-
- Bar
-
+ {/*
*/}
+ {/* Bar*/}
+ {/**/}
- {!barData?.user?.bar ? (
+ {/* Bury Bone */}
+ {
+ buryBoneComing ? (
+
+ BuryBone: Coming Soon...
+
+ ):!buryBoneData?.user ? (
- Address isn't in the bar...
+ Address isn't in the Bury Bone...
) : (
<>
@@ -256,22 +408,22 @@ function UserPage() {
-
+
-
+
@@ -291,16 +443,16 @@ function UserPage() {
Pending
-
+ {/*
ROI (Yearly)
-
+
ROI (Monthly)
-
+
ROI (Daily)
-
-
+ */}
+
ROI (All-time)
@@ -312,63 +464,354 @@ function UserPage() {
+
+ BONE
+
+ {/*
+ tBONE
+ */}
+
+
+
+
+ {decimalFormatter.format(buryBoneStaked)} (
+ {formatCurrency(buryBoneStakedUSD)})
+
+
+
+
+ {decimalFormatter.format(buryBoneHarvested)} (
+ {formatCurrency(buryBoneHarvestedUSD)})
+
+
+
+
+ {buryBoneData?.user?.bury ?
+ Number(buryBonePending.toFixed(2)).toLocaleString()+" ("+formatCurrency(bonePrice * buryBonePending)+")"
+ : "-"
+ }
+
+
+ {/*
+
+ {decimalFormatter.format(buryBoneRoiDailyBone * 365)} (
+ {formatCurrency(buryBoneRoiDailyBone * 365 * bonePrice)})
+
+
+
+
+ {decimalFormatter.format(buryBoneRoiDailyBone * 30)} (
+ {formatCurrency(buryBoneRoiDailyBone * 30 * bonePrice)})
+
+
+
+
+ {decimalFormatter.format(buryBoneRoiDailyBone)} (
+ {formatCurrency(buryBoneRoiDailyBone * bonePrice)})
+
+ */}
+
+
+ {buryBoneData?.user?.bury ?
+ decimalFormatter.format(buryBoneRoiBone)+" ("+formatCurrency(buryBoneRoiBone * bonePrice)+")"
+ : "-"
+ }
+
+
+
+
+
+
+ >
+ )}
+
+ {/* Bury Shib */}
+ {
+ buryShibComing ? (
+
+ BuryShib: Coming Soon...
+
+ ): !buryShibData?.user ? (
+
+ Address isn't in the Bury Shib...
+
+ ) : (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Token
+
+ Deposited
+
+
+ Withdrawn
+
+
+ Pending
+
+ {/*
+ ROI (Yearly)
+
+
+ ROI (Monthly)
+
+
+ ROI (Daily)
+
+
+ ROI (All-time)
+ */}
+
+
+
+
+
+
+
- SUSHI
+ SHIB
{/*
- xSUSHI
+ xShib
*/}
- {decimalFormatter.format(barStaked)} (
- {formatCurrency(barStakedUSD)})
+ {decimalFormatter.format(buryShibStaked)} (
+ {formatCurrency(buryShibStakedUSD)})
- {decimalFormatter.format(barHarvested)} (
- {formatCurrency(barHarvestedUSD)})
+ {decimalFormatter.format(buryShibHarvested)} (
+ {formatCurrency(buryShibHarvestedUSD)})
- {Number(barPending.toFixed(2)).toLocaleString()} (
- {formatCurrency(sushiPrice * barPending)})
+ {buryShibData?.user?.bury ?
+ Number(buryShibPending.toFixed(2)).toLocaleString()+" ("+formatCurrency(shibPrice * buryShibPending)+")"
+ : "-"
+ }
+
+
+ {/*
+
+ {decimalFormatter.format(buryShibRoiDailyShib * 365)} (
+ {formatCurrency(buryShibRoiDailyShib * 365 * shibPrice)})
- {decimalFormatter.format(barRoiDailySushi * 365)} (
- {formatCurrency(barRoiDailySushi * 365 * sushiPrice)})
+ {decimalFormatter.format(buryShibRoiDailyShib * 30)} (
+ {formatCurrency(buryShibRoiDailyShib * 30 * shibPrice)})
- {decimalFormatter.format(barRoiDailySushi * 30)} (
- {formatCurrency(barRoiDailySushi * 30 * sushiPrice)})
+ {decimalFormatter.format(buryShibRoiDailyShib)} (
+ {formatCurrency(buryShibRoiDailyShib * shibPrice)})
+ */}
+
+
+ {buryShibData?.user?.bury ?
+ decimalFormatter.format(buryShibRoiShib)+" ("+formatCurrency(buryShibRoiShib * shibPrice)+")"
+ : "-"
+ }
+
+
+
+
+
+
+ >
+ )}
+
+ {/* Bury Leash */}
+
+ {
+ buryLeashComing ? (
+
+ BuryLeash: Coming Soon...
+
+ ): !buryLeashData?.user ? (
+
+ Address isn't in the Bury Leash...
+
+ ) : (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Token
+
+ Deposited
+
+
+ Withdrawn
+
+
+ Pending
+
+ {/*
+ ROI (Yearly)
+
+
+ ROI (Monthly)
+
+
+ ROI (Daily)
+ */}
+
+ ROI (All-time)
+
+
+
+
+
+
+
+
+
+ LEASH
+
+ {/*
+ xLEASH
+ */}
+
- {decimalFormatter.format(barRoiDailySushi)} (
- {formatCurrency(barRoiDailySushi * sushiPrice)})
+ {decimalFormatter.format(buryLeashStaked)} (
+ {formatCurrency(buryLeashStakedUSD)})
+
+
+ {decimalFormatter.format(buryLeashHarvested)} (
+ {formatCurrency(buryLeashHarvestedUSD)})
+
+
+
+
+ {buryLeashData?.user?.bury ?
+ Number(buryLeashPending.toFixed(2)).toLocaleString()+" ("+formatCurrency(leashPrice * buryLeashPending)+")"
+ : "-"
+ }
+
+
+ {/*
+
+ {decimalFormatter.format(buryLeashRoiDailyLeash * 365)} (
+ {formatCurrency(buryLeashRoiDailyLeash * 365 * leashPrice)})
+
+
+
+
+ {decimalFormatter.format(buryLeashRoiDailyLeash * 30)} (
+ {formatCurrency(buryLeashRoiDailyLeash * 30 * leashPrice)})
+
+
+
+
+ {decimalFormatter.format(buryLeashRoiDailyLeash)} (
+ {formatCurrency(buryLeashRoiDailyLeash * leashPrice)})
+
+ */}
- {decimalFormatter.format(barRoiSushi)} (
- {formatCurrency(barRoiSushi * sushiPrice)})
+ {buryLeashData?.user?.bury ?
+ decimalFormatter.format(buryLeashRoiLeash)+" ("+formatCurrency(buryLeashRoiLeash * leashPrice)+")"
+ : "-"
+ }
@@ -438,11 +881,11 @@ function UserPage() {
Value
-
- Sushi Pending
+
+ Bone Pending
-
- Sushi Harvested
+
+ Bone Harvested
Profit/Loss
@@ -464,17 +907,17 @@ function UserPage() {
const token0 = pair.reserve0 * share;
const token1 = pair.reserve1 * share;
- const pendingSushi =
- ((user.amount * user.pool.accSushiPerShare) / 1e12 -
+ const pendingBone =
+ ((user.amount * user.pool.accBonePerShare) / 1e12 -
user.rewardDebt) /
1e18;
- // user.amount.mul(accSushiPerShare).div(1e12).sub(user.rewardDebt);
+ // user.amount.mul(accBonePerShare).div(1e12).sub(user.rewardDebt);
// console.log(
// user,
// user.entryUSD,
// user.exitUSD,
- // pendingSushi * sushiPrice
+ // pendingBone * bonePrice
// );
return (
@@ -524,17 +967,17 @@ function UserPage() {
- {decimalFormatter.format(pendingSushi)} (
+ {decimalFormatter.format(pendingBone)} (
{currencyFormatter.format(
- pendingSushi * sushiPrice
+ pendingBone * bonePrice
)}
)
- {decimalFormatter.format(user.sushiHarvested)} (
- {currencyFormatter.format(user.sushiHarvestedUSD)})
+ {decimalFormatter.format(user.boneHarvested)} (
+ {currencyFormatter.format(user.boneHarvestedUSD)})
@@ -542,8 +985,8 @@ function UserPage() {
{currencyFormatter.format(
parseFloat(pair.reserveUSD * share) +
parseFloat(user.exitUSD) +
- parseFloat(user.sushiHarvestedUSD) +
- parseFloat(pendingSushi * sushiPrice) -
+ parseFloat(user.boneHarvestedUSD) +
+ parseFloat(pendingBone * bonePrice) -
parseFloat(user.entryUSD)
)}
@@ -569,9 +1012,17 @@ export async function getStaticProps({ params }) {
await getEthPrice(client);
- await getSushiToken(client);
+ await getBoneToken(client);
+
+ await getShibToken(client);
+
+ await getLeashToken(client);
+
+ await getBuryBoneUser(id.toLowerCase(), client);
+
+ await getBuryShibUser(id.toLowerCase(), client);
- await getBarUser(id.toLowerCase(), client);
+ await getBuryLeashUser(id.toLowerCase(), client);
await getPoolUser(id.toLowerCase(), client);
diff --git a/src/styles/images/logo.png b/src/styles/images/logo.png
new file mode 100644
index 0000000..02e5761
Binary files /dev/null and b/src/styles/images/logo.png differ
diff --git a/src/styles/index.css b/src/styles/index.css
index ab1dbed..54193de 100644
--- a/src/styles/index.css
+++ b/src/styles/index.css
@@ -13,7 +13,8 @@ body {
.dark-theme body,
.dark-theme .MuiInputBase-root,
.dark-theme .MuiPaper-root {
- background: #050709;
+ background-color: #202335;
+ background-image: linear-gradient(to bottom, #0d101a 20px, #141824 700px, #141824);
color: #fff;
}
diff --git a/src/theme/index.js b/src/theme/index.js
index fa92c65..db0763e 100644
--- a/src/theme/index.js
+++ b/src/theme/index.js
@@ -12,7 +12,7 @@ import { createMuiTheme, responsiveFontSizes } from "@material-ui/core/styles";
export const palette = {
primary: {
- main: "#B93CF6",
+ main: "#e7a128",
},
positive: {
main: green[500],