Skip to content

Commit

Permalink
Merge e27fd85 into bda3181
Browse files Browse the repository at this point in the history
  • Loading branch information
Defi-Moses authored Jul 23, 2024
2 parents bda3181 + e27fd85 commit 04741ef
Show file tree
Hide file tree
Showing 22 changed files with 146 additions and 3 deletions.
6 changes: 6 additions & 0 deletions packages/explorer-ui/components/ChainChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,12 @@ export const OverviewChart: React.FC<OverviewChartProps> = ({
stackId="a"
fill={loading ? 'rgba(255, 255, 255, 0.1)' : '#FFEEDA'}
/>
<Bar
isAnimationActive={false}
dataKey="linea"
stackId="a"
fill={loading ? 'rgba(255, 255, 255, 0.1)' : '#000000'}
/>
</>
)}
</BarChart>
Expand Down
1 change: 1 addition & 0 deletions packages/explorer-ui/graphql/queries/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export const DAILY_STATISTICS_BY_CHAIN = gql`
base
blast
scroll
linea
total
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ export * as moonbeamImg from './moonbeam.svg'
export * as moonriverImg from './moonriver.svg'
export * as optimismImg from './optimism.svg'
export * as polygonImg from './polygon.svg'
export * as lineaImg from './linea.svg'
3 changes: 3 additions & 0 deletions packages/synapse-constants/constants/assets/chains/linea.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions packages/synapse-constants/constants/assets/explorer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ export * as moonbeamExplorerImg from './moonbeam.svg'
export * as moonriverExplorerImg from './moonriver.svg'
export * as dogeExplorerImg from './dogechain.svg'
export * as baseExplorerImg from './basescan.svg'
export * as scrollExplorerImg from './scroll.svg'
export * as lineaExplorerImg from './linea.svg'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions packages/synapse-constants/constants/bridgeMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ export const BRIDGE_MAP = {
destination: ['VSTA'],
swappable: [],
},
'0xAdF7C35560035944e805D98fF17d58CDe2449389': {
decimals: 18,
symbol: 'SPEC',
origin: ['SPEC'],
destination: ['SPEC'],
swappable: [],
},
'0xBAac2B4491727D78D2b78815144570b9f2Fe8899': {
decimals: 18,
symbol: 'DOG',
Expand Down Expand Up @@ -1233,6 +1240,13 @@ export const BRIDGE_MAP = {
'0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA',
],
},
'0x96419929d7949D6A801A6909c145C8EEf6A40431': {
decimals: 18,
symbol: 'SPEC',
origin: ['SPEC'],
destination: ['SPEC'],
swappable: [],
},
'0xEB466342C4d449BC9f53A865D5Cb90586f405215': {
decimals: 6,
symbol: 'axlUSDC',
Expand Down
4 changes: 4 additions & 0 deletions packages/synapse-constants/constants/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export const ChainId = {
BASE: 8453,
BLAST: 81457,
SCROLL: 534352,
LINEA: 59144,
AVALANCHE: 43114,
DFK: 53935,
AURORA: 1313161554,
Expand Down Expand Up @@ -124,4 +125,7 @@ export const FASTBRIDGE_CONTRACTS = {
[ChainId.ETH]: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
[ChainId.OPTIMISM]: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
[ChainId.SCROLL]: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
[ChainId.LINEA]: '0x34F52752975222d5994C206cE08C1d5B329f24dD',
[ChainId.BLAST]: '0x34F52752975222d5994C206cE08C1d5B329f24dD',
[ChainId.BSC]: '0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E',
}
26 changes: 26 additions & 0 deletions packages/synapse-constants/constants/chains/master.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import moonriverImg from '../assets/chains/moonriver.svg'
import optimismImg from '../assets/chains/optimism.svg'
import polygonImg from '../assets/chains/polygon.svg'
import scrollImg from '../assets/chains/scroll.svg'
import lineaImg from '../assets/chains/linea.svg'
import ethExplorerImg from '../assets/explorer/etherscan.svg'
import arbitrumExplorerImg from '../assets/explorer/arbitrum.svg'
import bnbExplorerImg from '../assets/explorer/bscscan.svg'
Expand All @@ -40,6 +41,7 @@ import dogeExplorerImg from '../assets/explorer/dogechain.svg'
import baseExplorerImg from '../assets/explorer/basescan.svg'
import blastExplorerImg from '../assets/explorer/blast.svg'
import scrollExplorerImg from '../assets/explorer/scroll.svg'
import lineaExplorerImg from '../assets/explorer/linea.svg'
import { Chain } from '../types'

export const ETH: Chain = {
Expand Down Expand Up @@ -478,3 +480,27 @@ export const SCROLL: Chain = {
},
color: 'orange',
}

export const LINEA: Chain = {
priorityRank: 90,
id: 59144,
chainSymbol: 'LINEA',
name: 'Linea',
codeName: 'linea',
chainImg: lineaImg,
layer: 2,
rpcUrls: {
primary: 'https://linea.blockpi.network/v1/rpc/public',
fallback: 'https://rpc.linea.build',
},
explorerUrl: 'https://lineascan.build/',
explorerName: 'LineaScan',
explorerImg: lineaExplorerImg,
blockTime: 3000,
nativeCurrency: {
name: 'Ether',
symbol: 'ETH',
decimals: 18,
},
color: 'black',
}
14 changes: 14 additions & 0 deletions packages/synapse-constants/constants/tokens/bridgeMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ export const BRIDGE_MAP = {
destination: ['VSTA'],
swappable: [],
},
'0xAdF7C35560035944e805D98fF17d58CDe2449389': {
decimals: 18,
symbol: 'SPEC',
origin: ['SPEC'],
destination: ['SPEC'],
swappable: [],
},
'0xBAac2B4491727D78D2b78815144570b9f2Fe8899': {
decimals: 18,
symbol: 'DOG',
Expand Down Expand Up @@ -1233,6 +1240,13 @@ export const BRIDGE_MAP = {
'0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA',
],
},
'0x96419929d7949D6A801A6909c145C8EEf6A40431': {
decimals: 18,
symbol: 'SPEC',
origin: ['SPEC'],
destination: ['SPEC'],
swappable: [],
},
'0xEB466342C4d449BC9f53A865D5Cb90586f405215': {
decimals: 6,
symbol: 'axlUSDC',
Expand Down
4 changes: 4 additions & 0 deletions packages/synapse-constants/constants/tokens/bridgeable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ export const USDC = new Token({
[CHAINS.BASE.id]: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
[CHAINS.POLYGON.id]: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
[CHAINS.SCROLL.id]: '0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4',
[CHAINS.LINEA.id]: '0x176211869cA2b568f2A7D4EE941E073a821EE1ff',
},
decimals: {
[CHAINS.ETH.id]: 6,
Expand All @@ -428,6 +429,7 @@ export const USDC = new Token({
[CHAINS.BASE.id]: 6,
[CHAINS.POLYGON.id]: 6,
[CHAINS.SCROLL.id]: 6,
[CHAINS.LINEA.id]: 6,
},
swapExceptions: {
[CHAINS.KLAYTN.id]: [CHAINS.ETH.id, CHAINS.DOGE.id],
Expand Down Expand Up @@ -785,6 +787,7 @@ export const ETH = new Token({
[CHAINS.DFK.id]: '0xfBDF0E31808d0aa7b9509AA6aBC9754E48C58852',
[CHAINS.BLAST.id]: zeroAddress,
[CHAINS.SCROLL.id]: nullAddress,
[CHAINS.LINEA.id]: nullAddress,
},
decimals: 18,
symbol: 'ETH',
Expand Down Expand Up @@ -1225,6 +1228,7 @@ export const WETH = new Token({
[CHAINS.BASE.id]: '0x4200000000000000000000000000000000000006',
[CHAINS.ARBITRUM.id]: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1',
[CHAINS.BLAST.id]: '0x4300000000000000000000000000000000000004',
[CHAINS.LINEA.id]: '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f',
},
decimals: 18,
symbol: 'WETH',
Expand Down
1 change: 0 additions & 1 deletion packages/synapse-constants/constants/tokens/deprecated.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import usdbLogo from '../assets/icons/usdc.svg'
import fusdtLogo from '../assets/icons/usdt.svg'
import { Token } from '../types'

import * as CHAINS from '../chains/master'

export const USDB = new Token({
Expand Down
1 change: 0 additions & 1 deletion packages/synapse-constants/constants/tokens/swapMaster.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Token } from '../types'
import usdtLogo from '../assets/icons/usdt.svg'
import usdcLogo from '../assets/icons/usdc.svg'

import * as CHAINS from '../chains/master'

export const SwapUSDC = new Token({
Expand Down
2 changes: 1 addition & 1 deletion packages/synapse-constants/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "synapse-constants",
"version": "1.3.20",
"version": "1.3.21",
"description": "This is an npm package that maintains all synapse constants",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
1 change: 1 addition & 0 deletions services/explorer/api/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func TestHandleJSONDailyStat(t *testing.T) {
Base *float64 "json:\"base\" graphql:\"base\""
Blast *float64 "json:\"blast\" graphql:\"blast\""
Scroll *float64 "json:\"scroll\" graphql:\"scroll\""
Linea *float64 "json:\"linea\" graphql:\"linea\""
Total *float64 "json:\"total\" graphql:\"total\""
}{
{
Expand Down
2 changes: 2 additions & 0 deletions services/explorer/graphql/client/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions services/explorer/graphql/client/queries/queries.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ query GetDailyStatisticsByChain($chainID: Int, $type: DailyStatisticType, $durat
base
blast
scroll
linea
total
}
}
Expand Down
1 change: 1 addition & 0 deletions services/explorer/graphql/server/graph/model/models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions services/explorer/graphql/server/graph/partials.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ const dailyVolumeBridgeMvPt1 = `
results[8453] AS base,
results[81457] AS blast,
results[534352] AS scroll,
results[59144] AS linea,
arraySum(mapValues(results)) AS total
FROM (SELECT date, maxMap(map(chain_id, total)) AS results
FROM (SELECT coalesce(toString(b.date), toString(s.date)) AS date,
Expand Down Expand Up @@ -443,6 +444,7 @@ const dailyVolumeBridge = `
results[8453] AS base,
results[81457] AS blast,
results[534352] AS scroll,
results[59144] AS linea,
arraySum(mapValues(results)) AS total
FROM (SELECT date, maxMap(map(chain_id, total)) AS results
FROM (SELECT coalesce(toString(b.date), toString(s.date)) AS date,
Expand Down Expand Up @@ -538,6 +540,7 @@ SELECT date,
results[8453] AS base,
results[81457] AS blast,
results[534352] AS scroll,
results[59144] AS linea,
arraySum(mapValues(results)) AS total
FROM (SELECT date, maxMap(map(chain_id, total)) AS results
FROM (SELECT coalesce(toString(b.date), toString(s.date), toString(m.date)) AS date,
Expand Down Expand Up @@ -639,6 +642,7 @@ SELECT date,
results[8453] AS base,
results[81457] AS blast,
results[534352] AS scroll,
results[59144] AS linea,
arraySum(mapValues(results)) AS total
FROM (
SELECT date,
Expand Down Expand Up @@ -669,6 +673,7 @@ SELECT date,
results[8453] AS base,
results[81457] AS blast,
results[534352] AS scroll,
results[59144] AS linea,
arraySum(mapValues(results)) AS total
FROM (
SELECT date,
Expand Down Expand Up @@ -700,6 +705,7 @@ SELECT date,
results[8453] AS base,
results[81457] AS blast,
results[534352] AS scroll,
results[59144] AS linea,
arraySum(mapValues(results)) AS total
FROM (
SELECT date,
Expand Down
54 changes: 54 additions & 0 deletions services/explorer/graphql/server/graph/resolver/server.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 04741ef

Please sign in to comment.