Skip to content

Commit

Permalink
add DogeDragon token
Browse files Browse the repository at this point in the history
  • Loading branch information
lilchizh committed Aug 18, 2022
1 parent 9bb0824 commit 86efa95
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 28 deletions.
Binary file added src/assets/images/doge-dragon-logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/components/CurrencyLogo/SpecialTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import EthLogo from '../../assets/images/ether-logo.png'
import USDTLogo from '../../assets/images/USDT-logo.png'
import USDCLogo from '../../assets/svg/usd-coin-usdc-logo.svg'
import WBTCLogo from '../../assets/images/wbtc-logo.png'
import DDLogo from '../../assets/images/doge-dragon-logo.jpg'

interface SpecialTokensInterface {
[key: string]: {
Expand Down Expand Up @@ -32,4 +33,8 @@ export const specialTokens: SpecialTokensInterface = {
name: 'WBTC',
logo: WBTCLogo
},
['0x582daef1f36d6009f64b74519cfd612a8467be18']: {
name: 'DD',
logo: DDLogo
}
}
7 changes: 4 additions & 3 deletions src/constants/routing.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// a list of tokens by chain
import { Currency, Token } from '@uniswap/sdk-core'
import { SupportedChainId } from './chains'
import { ETH_DOGECHAIN, ExtendedEther, USDC_DOGECHAIN, USDT_DOGECHAIN, WBTC_DOGECHAIN, WMATIC_EXTENDED } from './tokens'
import { DOGEDRAGON_DOGECHAIN, ETH_DOGECHAIN, ExtendedEther, USDC_DOGECHAIN, USDT_DOGECHAIN, WBTC_DOGECHAIN, WMATIC_EXTENDED } from './tokens'

type ChainTokenList = {
readonly [chainId: number]: Token[]
Expand All @@ -18,7 +18,7 @@ const WETH_ONLY: ChainTokenList = Object.fromEntries(
// used to construct intermediary pairs for trading
export const BASES_TO_CHECK_TRADES_AGAINST: ChainTokenList = {
...WETH_ONLY,
[SupportedChainId.DOGECHAIN]: [...WETH_ONLY[SupportedChainId.DOGECHAIN], USDC_DOGECHAIN,
[SupportedChainId.DOGECHAIN]: [...WETH_ONLY[SupportedChainId.DOGECHAIN], DOGEDRAGON_DOGECHAIN, USDC_DOGECHAIN,
USDT_DOGECHAIN,
WBTC_DOGECHAIN,
ETH_DOGECHAIN]
Expand All @@ -37,6 +37,7 @@ export const COMMON_BASES: ChainCurrencyList = {
[SupportedChainId.DOGECHAIN]: [
ExtendedEther.onChain(SupportedChainId.DOGECHAIN),
WMATIC_EXTENDED[SupportedChainId.DOGECHAIN],
DOGEDRAGON_DOGECHAIN,
USDC_DOGECHAIN,
USDT_DOGECHAIN,
WBTC_DOGECHAIN,
Expand All @@ -47,7 +48,7 @@ export const COMMON_BASES: ChainCurrencyList = {
// used to construct the list of all pairs we consider by default in the frontend
export const BASES_TO_TRACK_LIQUIDITY_FOR: ChainTokenList = {
...WETH_ONLY,
[SupportedChainId.DOGECHAIN]: [...WETH_ONLY[SupportedChainId.DOGECHAIN], USDC_DOGECHAIN, USDT_DOGECHAIN, WBTC_DOGECHAIN, ETH_DOGECHAIN]
[SupportedChainId.DOGECHAIN]: [...WETH_ONLY[SupportedChainId.DOGECHAIN], DOGEDRAGON_DOGECHAIN, USDC_DOGECHAIN, USDT_DOGECHAIN, WBTC_DOGECHAIN, ETH_DOGECHAIN]
}
export const PINNED_PAIRS: { readonly [chainId: number]: [Token, Token][] } = {
[SupportedChainId.DOGECHAIN]: [
Expand Down
8 changes: 8 additions & 0 deletions src/constants/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ export const WBTC_DOGECHAIN = new Token(
'Wrapped Bitcoin'
)

export const DOGEDRAGON_DOGECHAIN = new Token(
SupportedChainId.DOGECHAIN,
'0x582DaEF1F36D6009f64b74519cFD612a8467Be18',
18,
'DD',
'Doge Dragon'
)


export const WMATIC_EXTENDED: { [chainId: number]: Token } = {
...WDOGE
Expand Down
5 changes: 5 additions & 0 deletions src/hooks/Tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ const DEFAULT_TOKEN_LIST: any = {
name: 'Wrapped Bitcoin',
decimals: 18,
symbol: 'WBTC'
},
['0x582daef1f36d6009f64b74519cfd612a8467be18']: {
name: 'Doge Dragon',
decimals: 18,
symbol: 'DD'
}
}

Expand Down
28 changes: 3 additions & 25 deletions src/state/data/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6030,27 +6030,14 @@ export enum _SubgraphErrorPolicy_ {
Deny = 'deny'
}

export type PricesQueryVariables = Exact<{
block24: Scalars['Int'];
block48: Scalars['Int'];
blockWeek: Scalars['Int'];
}>;
export type PricesQueryVariables = Exact<{ [key: string]: never; }>;


export type PricesQuery = (
{ __typename?: 'Query' }
& { current: Array<(
{ __typename?: 'Bundle' }
& Pick<Bundle, 'maticPriceUSD'>
)>, oneDay: Array<(
{ __typename?: 'Bundle' }
& Pick<Bundle, 'maticPriceUSD'>
)>, twoDay: Array<(
{ __typename?: 'Bundle' }
& Pick<Bundle, 'maticPriceUSD'>
)>, oneWeek: Array<(
{ __typename?: 'Bundle' }
& Pick<Bundle, 'maticPriceUSD'>
)> }
);

Expand Down Expand Up @@ -6444,19 +6431,10 @@ export type PopularPoolsQuery = (


export const PricesDocument = `
query prices($block24: Int!, $block48: Int!, $blockWeek: Int!) {
query prices {
current: bundles(first: 1, subgraphError: allow) {
maticPriceUSD
}
oneDay: bundles(first: 1, block: {number: $block24}, subgraphError: allow) {
maticPriceUSD
}
twoDay: bundles(first: 1, block: {number: $block48}, subgraphError: allow) {
maticPriceUSD
}
oneWeek: bundles(first: 1, block: {number: $blockWeek}, subgraphError: allow) {
maticPriceUSD
}
}
`;
export const AllV3TicksDocument = `
Expand Down Expand Up @@ -6946,7 +6924,7 @@ export const PopularPoolsDocument = `

const injectedRtkApi = api.injectEndpoints({
endpoints: (build) => ({
prices: build.query<PricesQuery, PricesQueryVariables>({
prices: build.query<PricesQuery, PricesQueryVariables | void>({
query: (variables) => ({ document: PricesDocument, variables })
}),
allV3Ticks: build.query<AllV3TicksQuery, AllV3TicksQueryVariables>({
Expand Down

0 comments on commit 86efa95

Please sign in to comment.