feat: explorer API, wallet, CCIP scripts, and config refresh

- Backend REST/gateway/track routes, analytics, Blockscout proxy paths.
- Frontend wallet and liquidity surfaces; MetaMask token list alignment.
- Deployment docs, verification scripts, address inventory updates.

Check: go build ./... under backend/ (pass).
Made-with: Cursor
This commit is contained in:
defiQUG
2026-04-07 23:22:12 -07:00
parent d931be8e19
commit 6eef6b07f6
224 changed files with 19671 additions and 3291 deletions

View File

@@ -0,0 +1,95 @@
import { getExplorerApiBase } from './blockscout'
export interface RouteMatrixLeg {
protocol?: string
executor?: string
poolAddress?: string
}
export interface RouteMatrixRoute {
routeId: string
status?: string
label?: string
routeType?: string
fromChainId?: number
toChainId?: number
tokenInSymbol?: string
tokenOutSymbol?: string
assetSymbol?: string
hopCount?: number
aggregatorFamilies?: string[]
notes?: string[]
reason?: string
tokenInSymbols?: string[]
legs?: RouteMatrixLeg[]
}
export interface RouteMatrixCounts {
liveSwapRoutes?: number
liveBridgeRoutes?: number
blockedOrPlannedRoutes?: number
filteredLiveRoutes?: number
}
export interface RouteMatrixResponse {
generatedAt?: string
updated?: string
version?: string
homeChainId?: number
liveRoutes?: RouteMatrixRoute[]
blockedOrPlannedRoutes?: RouteMatrixRoute[]
counts?: RouteMatrixCounts
}
export interface ExplorerNetwork {
chainIdDecimal?: number
chainName?: string
shortName?: string
}
export interface NetworksResponse {
version?: string
source?: string
lastModified?: string
networks?: ExplorerNetwork[]
}
export interface MissionControlLiquidityPool {
address: string
dex?: string
token0?: {
symbol?: string
}
token1?: {
symbol?: string
}
tvl?: number
}
export interface MissionControlLiquidityPoolsResponse {
pools?: MissionControlLiquidityPool[]
}
const tokenAggregationBase = `${getExplorerApiBase()}/token-aggregation/api/v1`
const missionControlBase = `${getExplorerApiBase()}/explorer-api/v1/mission-control`
async function fetchJson<T>(url: string): Promise<T> {
const response = await fetch(url)
if (!response.ok) {
throw new Error(`HTTP ${response.status}`)
}
return (await response.json()) as T
}
export const routesApi = {
getNetworks: async (): Promise<NetworksResponse> =>
fetchJson<NetworksResponse>(`${tokenAggregationBase}/networks`),
getRouteMatrix: async (): Promise<RouteMatrixResponse> =>
fetchJson<RouteMatrixResponse>(`${tokenAggregationBase}/routes/matrix?includeNonLive=true`),
getTokenPools: async (tokenAddress: string): Promise<MissionControlLiquidityPoolsResponse> =>
fetchJson<MissionControlLiquidityPoolsResponse>(
`${missionControlBase}/liquidity/token/${tokenAddress}/pools`
),
}