diff --git a/packages/rest-api/package.json b/packages/rest-api/package.json index fb25db90ff..5c20bba62b 100644 --- a/packages/rest-api/package.json +++ b/packages/rest-api/package.json @@ -6,17 +6,13 @@ "node": ">=18.17.0" }, "scripts": { - "test": "tsdx test", - "start": "node ./dist/app.js", - "dev": "yarn add @synapsecns/sdk-router && concurrently \"npx tsc --watch\" \"nodemon -q dist/app.js\"", - "test:coverage": "echo 'No tests defined.'", - "lint:fix": "eslint src/**.ts --fix", + "build": "tsc", + "start": "node dist/app.js", + "lint:fix": "eslint src/**/*.ts --fix", "lint:check": "eslint . --max-warnings=0", "ci:lint": "npm run lint:check", - "build:go": " ", - "build:slither": " ", - "build": "echo 'please run build api'", - "build:api": "yarn add @synapsecns/sdk-router && tsc", + "test": "tsdx test", + "test:coverage": "echo 'No tests defined.'", "postinstall": "npm run build" }, "dependencies": { @@ -27,11 +23,14 @@ "bignumber": "^1.1.0", "ethers": "5.7.2", "express": "^4.18.2", + "lodash": "^4.17.21", "supertest": "^6.3.3" }, "description": "A node.js project exposing a rest api for synapse sdk quotes", "devDependencies": { + "@types/supertest": "^6.0.2", "concurrently": "^8.2.0", + "lodash": "^4.17.21", "nodemon": "^3.0.1", "typescript": "^4.8.3" } diff --git a/packages/rest-api/src/app.test.ts b/packages/rest-api/src/app.test.ts deleted file mode 100644 index bcf3df7cb7..0000000000 --- a/packages/rest-api/src/app.test.ts +++ /dev/null @@ -1,38 +0,0 @@ -import request from 'supertest' - -import { server } from './app' - -describe('Server Endpoints', () => { - describe('/swap endpoint', () => { - it('should respond with Invalid Params for invalid request', async () => { - const res = await request(server).get('/swap') - expect(res.statusCode).toEqual(200) - expect(res.text).toContain('

Invalid Params

') - }) - - // Add more tests to check valid swap - // it('should respond with swap quote for valid request', async () => { - // const res = await request(app).get('/swap?...'); - // expect(res.statusCode).toEqual(200); - // // expect... - // }); - }) - - describe('/bridge endpoint', () => { - it('should respond with Invalid Request for invalid request', async () => { - const res = await request(server).get('/bridge') - expect(res.statusCode).toEqual(200) - expect(res.text).toContain('

Invalid Request

') - }) - - // Add more tests to check valid bridge - // it('should respond with bridge quote for valid request', async () => { - // const res = await request(app).get('/bridge?...'); - // expect(res.statusCode).toEqual(200); - // // expect... - // }); - }) - afterAll((done) => { - server.close(done) - }) -}) diff --git a/packages/rest-api/src/app.ts b/packages/rest-api/src/app.ts index b22ab040c7..104db349ff 100644 --- a/packages/rest-api/src/app.ts +++ b/packages/rest-api/src/app.ts @@ -2,52 +2,19 @@ import { JsonRpcProvider } from '@ethersproject/providers' import { SynapseSDK } from '@synapsecns/sdk-router' import { BigNumber } from '@ethersproject/bignumber' import { formatUnits, parseUnits } from '@ethersproject/units' -import * as express from 'express' +import express from 'express' -import * as tokensList from './config/bridgeable' -import * as chainsData from './config/chains.json' -import { BRIDGE_MAP } from './config/bridgeMap' +import * as tokensList from './constants/bridgeable' +import { CHAINS_ARRAY } from './constants/chains' +import { Chain } from './types' +import { BRIDGE_MAP } from './constants/bridgeMap' -// eslint-disable-next-line @typescript-eslint/no-unused-vars -interface Token { - addresses: { - [key: string]: string - } - decimals: number | { [key: string]: number } - symbol: string - name: string - swapableType: string - color: string - visibilityRank: number - priorityRank: number - routeSymbol: string - swapableOn?: number[] - wrapperAddresses?: { - [key: string]: string - } - isNative?: boolean - docUrl?: string -} -// interface Tokens { -// [key: string]: Token -// } - -// const tokens: Tokens = tokensList as any - -interface Chains { - id: number - name: string - rpc: string -} - -const chains: Chains[] = chainsData as any -// eslint-disable-next-line prefer-arrow/prefer-arrow-functions -function findTokenInfo(chain: string, tokenSymbol: string) { +const chains: Chain[] = CHAINS_ARRAY +const findTokenInfo = (chain: string, tokenSymbol: string) => { const chainData = BRIDGE_MAP[chain] if (!chainData) { return null } - for (const tokenAddress in chainData) { if (chainData[tokenAddress].symbol === tokenSymbol) { return { @@ -62,24 +29,18 @@ function findTokenInfo(chain: string, tokenSymbol: string) { const tokenHtml = Object.values(tokensList) .map((token: any) => { - return ( - 'Token: ' + - token.symbol + - '
' + - Object.keys(token.addresses) - .map((chainId) => { - const tokenAddress = token.addresses[chainId] - return ( - '
  • Chain Id: ' + - String(chainId) + - ', Address: ' + - String(tokenAddress) + - '
  • ' - ) - }) - .join('') + - '
    ' - ) + const chainList = Object.entries(token.addresses) + .map( + ([chainId, tokenAddress]) => + `
  • Chain Id: ${chainId}, Address: ${tokenAddress}
  • ` + ) + .join('') + + return ` + Token: ${token.symbol}
    + ${chainList} +
    + ` }) .join('') @@ -88,7 +49,7 @@ const providers = [] const chainIds = [] for (const chain of chains) { - providers.push(new JsonRpcProvider(chain.rpc)) + providers.push(new JsonRpcProvider(chain.rpcUrls.primary)) chainIds.push(chain.id) } // Define the sdk @@ -106,12 +67,7 @@ app.get('/', (_req, res) => {

    Available Chains

    Available Tokens (symbols to use)

    ${tokenHtml}` @@ -129,7 +85,7 @@ app.get('/swap', async (req, res) => { const query = req.query // Chain - const chainId = query.chain + const chainId = String(query.chain) // Symbols const fromTokenSymbol = String(query.fromToken) @@ -218,8 +174,8 @@ app.get('/bridge', async (req, res) => { const query = req.query // Chains - const fromChain = query.fromChain - const toChain = query.toChain + const fromChain = String(query.fromChain) + const toChain = String(query.toChain) // Symbols const fromTokenSymbol = String(query.fromToken) @@ -278,16 +234,17 @@ app.get('/bridge', async (req, res) => { BigNumber.from(amount) ) .then((resp) => { - const firstQuote = resp[0] - const payload: any = firstQuote - payload.maxAmountOutStr = formatBNToString( - firstQuote.maxAmountOut, - toTokenDecimals - ) - payload.bridgeFeeFormatted = formatBNToString( - firstQuote.feeAmount, - toTokenDecimals - ) + const payload = resp.map((quote) => ({ + ...quote, + maxAmountOutStr: formatBNToString( + quote.maxAmountOut, + toTokenDecimals + ), + bridgeFeeFormatted: formatBNToString( + quote.feeAmount, + toTokenDecimals + ), + })) res.json(payload) }) .catch((err) => { @@ -316,7 +273,7 @@ app.get('/swapTxInfo', async (req, res) => { const query = req.query // Chain - const chainId = query.chain + const chainId = String(query.chain) // Symbols const fromTokenSymbol = String(query.fromToken) @@ -331,7 +288,7 @@ app.get('/swapTxInfo', async (req, res) => { `

    Invalid Params


    - Ensure that your request matches the following format: /swapTxInfo?chain=1&fromToken=USDC&toToken=DAI&amount=100 + Ensure that your request matches the following format: /bridge?fromChain=1&toChain=42161&fromToken=USDC&toToken=USDC&amount=1000000

    Available Tokens (symbols to use)

    ${tokenHtml}` @@ -411,8 +368,8 @@ app.get('/bridgeTxInfo', async (req, res) => { const query = req.query // Chains - const fromChain = query.fromChain - const toChain = query.toChain + const fromChain = String(query.fromChain) + const toChain = String(query.toChain) // Symbols const fromTokenSymbol = String(query.fromToken) @@ -427,7 +384,7 @@ app.get('/bridgeTxInfo', async (req, res) => { `

    Invalid Params


    - Ensure that your request matches the following format: /bridgeTxInfo?fromChain=1&toChain=42161&fromToken=USDC&toToken=USDC&amount=1000000&destAddress=0xcc78d2f004c9de9694ff6a9bbdee4793d30f3842 + Ensure that your request matches the following format: /bridge?fromChain=1&toChain=42161&fromToken=USDC&toToken=USDC&amount=1000000

    Available Tokens (symbols to use)

    ${tokenHtml}` @@ -443,9 +400,6 @@ app.get('/bridgeTxInfo', async (req, res) => { //Get to Address on destination chain const destAddress = String(query.destAddress) - //Router Address: - const routerAddress = '0x7e7a0e201fd38d3adaa9523da6c109a07118c96a' - // Handle invalid params (either token symbols or chainIDs) // TODO: add error handling for missing params if ( @@ -479,20 +433,23 @@ app.get('/bridgeTxInfo', async (req, res) => { toTokenAddress, BigNumber.from(amount) ) - .then((resp) => { - const firstQuote = resp[0] - Synapse.bridge( - destAddress, - routerAddress, - Number(fromChain), - Number(toChain), - fromTokenAddress, - BigNumber.from(amount), - firstQuote.originQuery, - firstQuote.destQuery - ).then((txInfo) => { - res.json(txInfo) - }) + .then(async (resp) => { + const txInfoArray = await Promise.all( + resp.map(async (quote) => { + const txInfo = await Synapse.bridge( + destAddress, + quote.routerAddress, + Number(fromChain), + Number(toChain), + fromTokenAddress, + BigNumber.from(amount), + quote.originQuery, + quote.destQuery + ) + return txInfo + }) + ) + res.json(txInfoArray) }) .catch((err) => { // TODO: do a better return here diff --git a/packages/rest-api/src/config/Chains.ts b/packages/rest-api/src/config/Chains.ts deleted file mode 100644 index 643c1e762e..0000000000 --- a/packages/rest-api/src/config/Chains.ts +++ /dev/null @@ -1,27 +0,0 @@ -interface Chain { - id: number -} - -const CHAINS: Record = { - ETH: { id: 1 }, - OPTIMISM: { id: 10 }, - BNB: { id: 56 }, - POLYGON: { id: 137 }, - FANTOM: { id: 250 }, - ARBITRUM: { id: 42161 }, - AVALANCHE: { id: 43114 }, - MOONRIVER: { id: 1285 }, - BOBA: { id: 288 }, - HARMONY: { id: 1666600000 }, - MOONBEAM: { id: 1284 }, - CRONOS: { id: 25 }, - METIS: { id: 1088 }, - DOGE: { id: 2000 }, - CANTO: { id: 7700 }, - KLAYTN: { id: 8217 }, - DFK: { id: 53935 }, - BASE: { id: 8453 }, - AURORA: { id: 1313161554 }, -} - -export default CHAINS diff --git a/packages/rest-api/src/config/chains.json b/packages/rest-api/src/config/chains.json deleted file mode 100644 index b71fa2f193..0000000000 --- a/packages/rest-api/src/config/chains.json +++ /dev/null @@ -1,92 +0,0 @@ -[ - { - "id": 1, - "name": "Ethereum", - "rpc": "https://rpc.ankr.com/eth" - }, - { - "id": 42161, - "name": "Arbitrum", - "rpc": "https://arb1.arbitrum.io/rpc" - }, - { - "id": 56, - "name": "BSC", - "rpc": "https://bsc-dataseed1.ninicoin.io/" - }, - { - "id": 43114, - "name": "Avalanche", - "rpc": "https://avalanche.public-rpc.com" - }, - { - "id": 7700, - "name": "Canto", - "rpc": "https://mainnode.plexnode.org:8545" - }, - { - "id": 10, - "name": "Optimism", - "rpc": "https://rpc.ankr.com/optimism" - }, - { - "id": 137, - "name": "Polygon", - "rpc": "https://rpc-mainnet.matic.quiknode.pro" - }, - { - "id": 53935, - "name": "DFK Chain", - "rpc": "https://subnets.avax.Chain/defi-kingdoms/dfk-chain/rpc" - }, - { - "id": 8217, - "name": "Klaytn", - "rpc": "https://klaytn.blockpi.Chain/v1/rpc/public" - }, - { - "id": 250, - "name": "Fantom", - "rpc": "https://rpc.ftm.tools" - }, - { - "id": 25, - "name": "Cronos", - "rpc": "https://evm-cronos.crypto.org" - }, - { - "id": 288, - "name": "Boba Chain", - "rpc": "https://mainnet.boba.Chain/" - }, - { - "id": 1088, - "name": "Metis", - "rpc": "https://andromeda.metis.io/?owner=1088" - }, - { - "id": 1313161554, - "name": "Aurora", - "rpc": "https://mainnet.aurora.dev" - }, - { - "id": 1666600000, - "name": "Harmony", - "rpc": "https://harmony-mainnet.chainstacklabs.com" - }, - { - "id": 1284, - "name": "Moonbeam", - "rpc": "https://rpc.api.moonbeam.Chain" - }, - { - "id": 1285, - "name": "Moonriver", - "rpc": "https://rpc.api.moonriver.moonbeam.Chain" - }, - { - "id": 2000, - "name": "Dogechain", - "rpc": "https://rpc-us.dogechain.dog" - } -] \ No newline at end of file diff --git a/packages/rest-api/src/config/bridgeMap.ts b/packages/rest-api/src/constants/bridgeMap.ts similarity index 88% rename from packages/rest-api/src/config/bridgeMap.ts rename to packages/rest-api/src/constants/bridgeMap.ts index 527cebf940..e2ad92cb29 100644 --- a/packages/rest-api/src/config/bridgeMap.ts +++ b/packages/rest-api/src/constants/bridgeMap.ts @@ -21,10 +21,25 @@ export const BRIDGE_MAP = { destination: ['SYN'], swappable: [], }, + '0x12f79f8c1A6e47a9b5F0796FDb008Bdc182fa19e': { + decimals: 18, + symbol: 'JEWEL', + origin: ['JEWEL'], + destination: ['JEWEL'], + swappable: [], + }, '0x1B84765dE8B7566e4cEAF4D0fD3c5aF52D3DdE4F': { decimals: 18, symbol: 'nUSD', - origin: ['CCTP.USDC', 'DAI', 'USDC', 'USDT', 'nUSD', 'synFRAX'], + origin: [ + 'CCTP.USDC', + 'DAI', + 'RFQ.USDC', + 'USDC', + 'USDT', + 'nUSD', + 'synFRAX', + ], destination: ['CCTP.USDC', 'nUSD'], swappable: [ '0x5f98805A4E8be255a32880FDeC7F6728C6568bA0', @@ -53,7 +68,15 @@ export const BRIDGE_MAP = { '0x5f98805A4E8be255a32880FDeC7F6728C6568bA0': { decimals: 18, symbol: 'LUSD', - origin: ['CCTP.USDC', 'DAI', 'USDC', 'USDT', 'nUSD', 'synFRAX'], + origin: [ + 'CCTP.USDC', + 'DAI', + 'RFQ.USDC', + 'USDC', + 'USDT', + 'nUSD', + 'synFRAX', + ], destination: ['CCTP.USDC'], swappable: [ '0x1B84765dE8B7566e4cEAF4D0fD3c5aF52D3DdE4F', @@ -75,7 +98,15 @@ export const BRIDGE_MAP = { '0x6B175474E89094C44Da98b954EedeAC495271d0F': { decimals: 18, symbol: 'DAI', - origin: ['CCTP.USDC', 'DAI', 'USDC', 'USDT', 'nUSD', 'synFRAX'], + origin: [ + 'CCTP.USDC', + 'DAI', + 'RFQ.USDC', + 'USDC', + 'USDT', + 'nUSD', + 'synFRAX', + ], destination: ['CCTP.USDC', 'DAI', 'nUSD'], swappable: [ '0x1B84765dE8B7566e4cEAF4D0fD3c5aF52D3DdE4F', @@ -90,7 +121,15 @@ export const BRIDGE_MAP = { '0x6c3ea9036406852006290770BEdFcAbA0e23A0e8': { decimals: 6, symbol: 'PYUSD', - origin: ['CCTP.USDC', 'DAI', 'USDC', 'USDT', 'nUSD', 'synFRAX'], + origin: [ + 'CCTP.USDC', + 'DAI', + 'RFQ.USDC', + 'USDC', + 'USDT', + 'nUSD', + 'synFRAX', + ], destination: ['CCTP.USDC'], swappable: [ '0x1B84765dE8B7566e4cEAF4D0fD3c5aF52D3DdE4F', @@ -119,7 +158,15 @@ export const BRIDGE_MAP = { '0x853d955aCEf822Db058eb8505911ED77F175b99e': { decimals: 18, symbol: 'FRAX', - origin: ['CCTP.USDC', 'DAI', 'USDC', 'USDT', 'nUSD', 'synFRAX'], + origin: [ + 'CCTP.USDC', + 'DAI', + 'RFQ.USDC', + 'USDC', + 'USDT', + 'nUSD', + 'synFRAX', + ], destination: ['CCTP.USDC', 'synFRAX'], swappable: [ '0x1B84765dE8B7566e4cEAF4D0fD3c5aF52D3DdE4F', @@ -141,8 +188,16 @@ export const BRIDGE_MAP = { '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48': { decimals: 6, symbol: 'USDC', - origin: ['CCTP.USDC', 'DAI', 'USDC', 'USDT', 'nUSD', 'synFRAX'], - destination: ['CCTP.USDC', 'USDC', 'nUSD'], + origin: [ + 'CCTP.USDC', + 'DAI', + 'RFQ.USDC', + 'USDC', + 'USDT', + 'nUSD', + 'synFRAX', + ], + destination: ['CCTP.USDC', 'USDC', 'nUSD', 'RFQ.USDC'], swappable: [ '0x1B84765dE8B7566e4cEAF4D0fD3c5aF52D3DdE4F', '0x5f98805A4E8be255a32880FDeC7F6728C6568bA0', @@ -160,6 +215,13 @@ export const BRIDGE_MAP = { destination: ['VSTA'], swappable: [], }, + '0xAdF7C35560035944e805D98fF17d58CDe2449389': { + decimals: 18, + symbol: 'SPEC', + origin: ['SPEC'], + destination: ['SPEC'], + swappable: [], + }, '0xBAac2B4491727D78D2b78815144570b9f2Fe8899': { decimals: 18, symbol: 'DOG', @@ -170,15 +232,15 @@ export const BRIDGE_MAP = { '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2': { decimals: 18, symbol: 'WETH', - origin: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], destination: ['nETH'], swappable: [], }, '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': { decimals: 18, symbol: 'ETH', - origin: ['nETH'], - destination: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], + destination: ['nETH', 'RFQ.ETH'], swappable: [], }, '0xb753428af26E81097e7fD17f40c88aaA3E04902c': { @@ -191,7 +253,15 @@ export const BRIDGE_MAP = { '0xdAC17F958D2ee523a2206206994597C13D831ec7': { decimals: 6, symbol: 'USDT', - origin: ['CCTP.USDC', 'DAI', 'USDC', 'USDT', 'nUSD', 'synFRAX'], + origin: [ + 'CCTP.USDC', + 'DAI', + 'RFQ.USDC', + 'USDC', + 'USDT', + 'nUSD', + 'synFRAX', + ], destination: ['CCTP.USDC', 'USDT', 'nUSD'], swappable: [ '0x1B84765dE8B7566e4cEAF4D0fD3c5aF52D3DdE4F', @@ -213,7 +283,15 @@ export const BRIDGE_MAP = { '0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E': { decimals: 18, symbol: 'crvUSD', - origin: ['CCTP.USDC', 'DAI', 'USDC', 'USDT', 'nUSD', 'synFRAX'], + origin: [ + 'CCTP.USDC', + 'DAI', + 'RFQ.USDC', + 'USDC', + 'USDT', + 'nUSD', + 'synFRAX', + ], destination: ['CCTP.USDC'], swappable: [ '0x1B84765dE8B7566e4cEAF4D0fD3c5aF52D3DdE4F', @@ -230,8 +308,8 @@ export const BRIDGE_MAP = { '0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85': { decimals: 6, symbol: 'USDC', - origin: ['CCTP.USDC', 'nUSD'], - destination: ['CCTP.USDC'], + origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'], + destination: ['CCTP.USDC', 'RFQ.USDC'], swappable: [ '0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00', '0x7F5c764cBc14f9669B88837ca1490cCa17c31607', @@ -250,7 +328,7 @@ export const BRIDGE_MAP = { '0x121ab82b49B2BC4c7901CA46B8277962b4350204': { decimals: 18, symbol: 'WETH', - origin: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], destination: ['nETH'], swappable: [ '0x809DC529f07651bD43A172e8dB6f4a7a0d771036', @@ -274,7 +352,7 @@ export const BRIDGE_MAP = { '0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00': { decimals: 18, symbol: 'nUSD', - origin: ['CCTP.USDC', 'nUSD'], + origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'], destination: ['CCTP.USDC', 'nUSD'], swappable: [ '0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85', @@ -287,7 +365,7 @@ export const BRIDGE_MAP = { '0x7F5c764cBc14f9669B88837ca1490cCa17c31607': { decimals: 6, symbol: 'USDC.e', - origin: ['CCTP.USDC', 'nUSD'], + origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'], destination: ['CCTP.USDC', 'nUSD'], swappable: [ '0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85', @@ -300,7 +378,7 @@ export const BRIDGE_MAP = { '0x809DC529f07651bD43A172e8dB6f4a7a0d771036': { decimals: 18, symbol: 'nETH', - origin: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], destination: ['nETH'], swappable: [ '0x121ab82b49B2BC4c7901CA46B8277962b4350204', @@ -310,7 +388,7 @@ export const BRIDGE_MAP = { '0x8c6f28f2F1A3C87F0f938b96d27520d9751ec8d9': { decimals: 18, symbol: 'sUSD', - origin: ['CCTP.USDC', 'nUSD'], + origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'], destination: ['CCTP.USDC'], swappable: [ '0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85', @@ -323,7 +401,7 @@ export const BRIDGE_MAP = { '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58': { decimals: 6, symbol: 'USDT', - origin: ['CCTP.USDC', 'nUSD'], + origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'], destination: ['CCTP.USDC'], swappable: [ '0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85', @@ -343,7 +421,7 @@ export const BRIDGE_MAP = { '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1': { decimals: 18, symbol: 'DAI', - origin: ['CCTP.USDC', 'nUSD'], + origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'], destination: ['CCTP.USDC'], swappable: [ '0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85', @@ -363,8 +441,8 @@ export const BRIDGE_MAP = { '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': { decimals: 18, symbol: 'ETH', - origin: ['nETH'], - destination: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], + destination: ['nETH', 'RFQ.ETH'], swappable: [ '0x121ab82b49B2BC4c7901CA46B8277962b4350204', '0x809DC529f07651bD43A172e8dB6f4a7a0d771036', @@ -795,6 +873,13 @@ export const BRIDGE_MAP = { }, }, '1088': { + '0x17C09cfC96C865CF546d73365Cedb6dC66986963': { + decimals: 18, + symbol: 'JEWEL', + origin: ['JEWEL'], + destination: ['JEWEL'], + swappable: [], + }, '0x420000000000000000000000000000000000000A': { decimals: 18, symbol: 'WETH', @@ -1025,7 +1110,7 @@ export const BRIDGE_MAP = { symbol: 'nETH', origin: ['nETH'], destination: ['nETH'], - swappable: ['0x5FD55A1B9FC24967C4dB09C513C3BA0DFa7FF687'], + swappable: [], }, '0x4e71A2E537B7f9D9413D3991D37958c0b5e1e503': { decimals: 18, @@ -1045,13 +1130,6 @@ export const BRIDGE_MAP = { destination: ['SYN'], swappable: [], }, - '0x5FD55A1B9FC24967C4dB09C513C3BA0DFa7FF687': { - decimals: 18, - symbol: 'ETH', - origin: ['nETH'], - destination: ['nETH'], - swappable: ['0x09fEC30669d63A13c666d2129230dD5588E2e240'], - }, '0x80b5a32E4F032B2a058b4F29EC95EEfEEB87aDcd': { decimals: 6, symbol: 'USDC', @@ -1169,7 +1247,7 @@ export const BRIDGE_MAP = { '0x417Ac0e078398C154EdFadD9Ef675d30Be60Af93': { decimals: 18, symbol: 'crvUSD', - origin: ['CCTP.USDC'], + origin: ['CCTP.USDC', 'RFQ.USDC'], destination: ['CCTP.USDC'], swappable: [ '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb', @@ -1181,7 +1259,7 @@ export const BRIDGE_MAP = { '0x4200000000000000000000000000000000000006': { decimals: 18, symbol: 'WETH', - origin: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], destination: ['nETH'], swappable: [ '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', @@ -1198,7 +1276,7 @@ export const BRIDGE_MAP = { '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb': { decimals: 18, symbol: 'DAI', - origin: ['CCTP.USDC'], + origin: ['CCTP.USDC', 'RFQ.USDC'], destination: ['CCTP.USDC'], swappable: [ '0x417Ac0e078398C154EdFadD9Ef675d30Be60Af93', @@ -1217,8 +1295,8 @@ export const BRIDGE_MAP = { '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913': { decimals: 6, symbol: 'USDC', - origin: ['CCTP.USDC'], - destination: ['CCTP.USDC'], + origin: ['CCTP.USDC', 'RFQ.USDC'], + destination: ['CCTP.USDC', 'RFQ.USDC'], swappable: [ '0x417Ac0e078398C154EdFadD9Ef675d30Be60Af93', '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb', @@ -1226,10 +1304,17 @@ export const BRIDGE_MAP = { '0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA', ], }, + '0x96419929d7949D6A801A6909c145C8EEf6A40431': { + decimals: 18, + symbol: 'SPEC', + origin: ['SPEC'], + destination: ['SPEC'], + swappable: [], + }, '0xEB466342C4d449BC9f53A865D5Cb90586f405215': { decimals: 6, symbol: 'axlUSDC', - origin: ['CCTP.USDC'], + origin: ['CCTP.USDC', 'RFQ.USDC'], destination: ['CCTP.USDC'], swappable: [ '0x417Ac0e078398C154EdFadD9Ef675d30Be60Af93', @@ -1241,8 +1326,8 @@ export const BRIDGE_MAP = { '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': { decimals: 18, symbol: 'ETH', - origin: ['nETH'], - destination: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], + destination: ['nETH', 'RFQ.ETH'], swappable: [ '0x4200000000000000000000000000000000000006', '0xb554A55358fF0382Fb21F0a478C3546d1106Be8c', @@ -1251,7 +1336,7 @@ export const BRIDGE_MAP = { '0xb554A55358fF0382Fb21F0a478C3546d1106Be8c': { decimals: 18, symbol: 'nETH', - origin: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], destination: ['nETH'], swappable: [ '0x4200000000000000000000000000000000000006', @@ -1261,7 +1346,7 @@ export const BRIDGE_MAP = { '0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA': { decimals: 6, symbol: 'USDbC', - origin: ['CCTP.USDC'], + origin: ['CCTP.USDC', 'RFQ.USDC'], destination: ['CCTP.USDC'], swappable: [ '0x417Ac0e078398C154EdFadD9Ef675d30Be60Af93', @@ -1296,7 +1381,7 @@ export const BRIDGE_MAP = { '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F': { decimals: 18, symbol: 'FRAX', - origin: ['CCTP.USDC', 'nUSD'], + origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'], destination: ['CCTP.USDC'], swappable: [ '0x2913E812Cf0dcCA30FB28E6Cac3d2DCFF4497688', @@ -1309,7 +1394,7 @@ export const BRIDGE_MAP = { '0x2913E812Cf0dcCA30FB28E6Cac3d2DCFF4497688': { decimals: 18, symbol: 'nUSD', - origin: ['CCTP.USDC', 'nUSD'], + origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'], destination: ['CCTP.USDC', 'nUSD'], swappable: [ '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F', @@ -1329,7 +1414,7 @@ export const BRIDGE_MAP = { '0x3ea9B0ab55F34Fb188824Ee288CeaEfC63cf908e': { decimals: 18, symbol: 'nETH', - origin: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], destination: ['nETH'], swappable: [ '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', @@ -1353,7 +1438,7 @@ export const BRIDGE_MAP = { '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1': { decimals: 18, symbol: 'WETH', - origin: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], destination: ['nETH'], swappable: [ '0x3ea9B0ab55F34Fb188824Ee288CeaEfC63cf908e', @@ -1384,7 +1469,7 @@ export const BRIDGE_MAP = { '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1': { decimals: 18, symbol: 'DAI', - origin: ['CCTP.USDC', 'nUSD'], + origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'], destination: ['CCTP.USDC'], swappable: [ '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F', @@ -1397,8 +1482,8 @@ export const BRIDGE_MAP = { '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': { decimals: 18, symbol: 'ETH', - origin: ['nETH'], - destination: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], + destination: ['nETH', 'RFQ.ETH'], swappable: [ '0x3ea9B0ab55F34Fb188824Ee288CeaEfC63cf908e', '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', @@ -1407,7 +1492,7 @@ export const BRIDGE_MAP = { '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8': { decimals: 6, symbol: 'USDC.e', - origin: ['CCTP.USDC', 'nUSD'], + origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'], destination: ['CCTP.USDC', 'nUSD'], swappable: [ '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F', @@ -1420,7 +1505,7 @@ export const BRIDGE_MAP = { '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9': { decimals: 6, symbol: 'USDT', - origin: ['CCTP.USDC', 'nUSD'], + origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'], destination: ['CCTP.USDC', 'nUSD'], swappable: [ '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F', @@ -1440,8 +1525,8 @@ export const BRIDGE_MAP = { '0xaf88d065e77c8cC2239327C5EDb3A432268e5831': { decimals: 6, symbol: 'USDC', - origin: ['CCTP.USDC', 'nUSD'], - destination: ['CCTP.USDC'], + origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'], + destination: ['CCTP.USDC', 'RFQ.USDC'], swappable: [ '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F', '0x2913E812Cf0dcCA30FB28E6Cac3d2DCFF4497688', @@ -1708,6 +1793,119 @@ export const BRIDGE_MAP = { swappable: [], }, }, + '59144': { + '0x176211869cA2b568f2A7D4EE941E073a821EE1ff': { + decimals: 6, + symbol: 'USDC', + origin: ['RFQ.USDC'], + destination: ['RFQ.USDC'], + swappable: ['0xA219439258ca9da29E9Cc4cE5596924745e12B93'], + }, + '0xA219439258ca9da29E9Cc4cE5596924745e12B93': { + decimals: 6, + symbol: 'USDT', + origin: ['RFQ.USDC'], + destination: [], + swappable: ['0x176211869cA2b568f2A7D4EE941E073a821EE1ff'], + }, + '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': { + decimals: 18, + symbol: 'ETH', + origin: ['RFQ.ETH'], + destination: ['RFQ.ETH'], + swappable: [], + }, + '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f': { + decimals: 18, + symbol: 'WETH', + origin: ['RFQ.ETH'], + destination: [], + swappable: [], + }, + }, + '81457': { + '0x3194B0A295D87fDAA54DF852c248F7a6BAF6c6e0': { + decimals: 18, + symbol: 'nUSD', + origin: ['nUSD'], + destination: ['nUSD'], + swappable: ['0x4300000000000000000000000000000000000003'], + }, + '0x4300000000000000000000000000000000000003': { + decimals: 18, + symbol: 'USDB', + origin: ['nUSD'], + destination: ['nUSD'], + swappable: ['0x3194B0A295D87fDAA54DF852c248F7a6BAF6c6e0'], + }, + '0x4300000000000000000000000000000000000004': { + decimals: 18, + symbol: 'WETH', + origin: ['RFQ.ETH', 'nETH'], + destination: ['nETH'], + swappable: [ + '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', + '0xce971282fAAc9faBcF121944956da7142cccC855', + ], + }, + '0x9592f08387134e218327E6E8423400eb845EdE0E': { + decimals: 18, + symbol: 'SYN', + origin: ['SYN'], + destination: ['SYN'], + swappable: [], + }, + '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': { + decimals: 18, + symbol: 'ETH', + origin: ['RFQ.ETH', 'nETH'], + destination: ['nETH', 'RFQ.ETH'], + swappable: [ + '0x4300000000000000000000000000000000000004', + '0xce971282fAAc9faBcF121944956da7142cccC855', + ], + }, + '0xce971282fAAc9faBcF121944956da7142cccC855': { + decimals: 18, + symbol: 'nETH', + origin: ['RFQ.ETH', 'nETH'], + destination: ['nETH'], + swappable: [ + '0x4300000000000000000000000000000000000004', + '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', + ], + }, + }, + '534352': { + '0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4': { + decimals: 6, + symbol: 'USDC', + origin: ['RFQ.USDC'], + destination: ['RFQ.USDC'], + swappable: ['0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df'], + }, + '0x5300000000000000000000000000000000000004': { + decimals: 18, + symbol: 'WETH', + origin: ['RFQ.ETH'], + destination: [], + swappable: [], + }, + '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': { + decimals: 18, + symbol: 'ETH', + origin: ['RFQ.ETH'], + destination: ['RFQ.ETH'], + swappable: [], + }, + '0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df': { + decimals: 6, + symbol: 'USDT', + origin: ['RFQ.USDC'], + destination: [], + swappable: ['0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4'], + }, + }, '1313161554': { '0x07379565cD8B0CaE7c60Dc78e7f601b34AF2A21c': { decimals: 18, diff --git a/packages/rest-api/src/config/bridgeable.ts b/packages/rest-api/src/constants/bridgeable.ts similarity index 53% rename from packages/rest-api/src/config/bridgeable.ts rename to packages/rest-api/src/constants/bridgeable.ts index 413e1e726c..f6a919ce79 100644 --- a/packages/rest-api/src/config/bridgeable.ts +++ b/packages/rest-api/src/constants/bridgeable.ts @@ -1,12 +1,13 @@ -import { Token } from './Token' -import CHAINS from './Chains' -const zeroAddress = '0x0000000000000000000000000000000000000000' +import { BridgeableToken } from '../types' +import { CHAINS } from './chains' -export const GOHM = new Token({ +const ZeroAddress = '0x0000000000000000000000000000000000000000' + +export const GOHM: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x0ab87046fBb341D058F17CBC4c1133F25a20a52f', + [CHAINS.ETHEREUM.id]: '0x0ab87046fBb341D058F17CBC4c1133F25a20a52f', [CHAINS.OPTIMISM.id]: '0x0b5740c6b4a97f90eF2F0220651Cca420B868FfB', - [CHAINS.BNB.id]: '0x88918495892BAF4536611E38E75D771Dc6Ec0863', + [CHAINS.BNBCHAIN.id]: '0x88918495892BAF4536611E38E75D771Dc6Ec0863', [CHAINS.POLYGON.id]: '0xd8cA34fd379d9ca3C6Ee3b3905678320F5b45195', [CHAINS.FANTOM.id]: '0x91fa20244Fb509e8289CA630E5db3E9166233FDc', [CHAINS.ARBITRUM.id]: '0x8D9bA570D6cb60C7e3e0F31343Efe75AB8E65FB1', @@ -18,312 +19,413 @@ export const GOHM = new Token({ [CHAINS.CRONOS.id]: '0xbB0A63A6CA2071c6C4bcAC11a1A317b20E3E999C', [CHAINS.METIS.id]: '0xFB21B70922B9f6e3C6274BcD6CB1aa8A0fe20B80', }, - decimals: 18, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.OPTIMISM.id]: 18, + [CHAINS.BNBCHAIN.id]: 18, + [CHAINS.POLYGON.id]: 18, + [CHAINS.FANTOM.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.AVALANCHE.id]: 18, + [CHAINS.MOONRIVER.id]: 18, + [CHAINS.BOBA.id]: 18, + [CHAINS.HARMONY.id]: 18, + [CHAINS.MOONBEAM.id]: 18, + [CHAINS.CRONOS.id]: 18, + [CHAINS.METIS.id]: 18, + }, + symbol: 'gOHM', name: 'Olympus DAO', swapableType: 'OHM', color: 'gray', - visibilityRank: 40, priorityRank: 600, routeSymbol: 'gOHM', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/ohm.1b779b45.svg', +} -export const LINK = new Token({ +export const LINK: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x514910771af9ca656af840dff83e8264ecf986ca', + [CHAINS.ETHEREUM.id]: '0x514910771af9ca656af840dff83e8264ecf986ca', [CHAINS.KLAYTN.id]: '0xfbed1abb3ad0f8c467068de9fde905887e8c9118', }, - decimals: 18, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.KLAYTN.id]: 18, + }, symbol: 'LINK', name: 'ChainLink Token', swapableType: 'LINK', color: 'blue', priorityRank: 600, routeSymbol: 'LINK', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/link.bdd944c9.svg', +} -export const HIGH = new Token({ +export const HIGH: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x71Ab77b7dbB4fa7e017BC15090b2163221420282', - [CHAINS.BNB.id]: '0x5f4bde007dc06b867f86ebfe4802e34a1ffeed63', + [CHAINS.ETHEREUM.id]: '0x71Ab77b7dbB4fa7e017BC15090b2163221420282', + [CHAINS.BNBCHAIN.id]: '0x5f4bde007dc06b867f86ebfe4802e34a1ffeed63', }, - decimals: 18, + decimals: { [CHAINS.ETHEREUM.id]: 18, [CHAINS.BNBCHAIN.id]: 18 }, symbol: 'HIGH', name: 'Highstreet', swapableType: 'HIGH', color: 'cyan', priorityRank: 600, routeSymbol: 'HIGH', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/highstreet.e8060cc0.svg', +} -export const JUMP = new Token({ +export const JUMP: BridgeableToken = { addresses: { - [CHAINS.BNB.id]: '0x130025ee738a66e691e6a7a62381cb33c6d9ae83', + [CHAINS.BNBCHAIN.id]: '0x130025ee738a66e691e6a7a62381cb33c6d9ae83', [CHAINS.FANTOM.id]: '0x78DE9326792ce1d6eCA0c978753c6953Cdeedd73', [CHAINS.METIS.id]: '0xE3c82A836Ec85311a433fBd9486EfAF4b1AFbF48', }, - decimals: 18, + decimals: { + [CHAINS.BNBCHAIN.id]: 18, + [CHAINS.FANTOM.id]: 18, + [CHAINS.METIS.id]: 18, + }, symbol: 'JUMP', name: 'HyperJump', - docUrl: '', swapableType: 'JUMP', color: 'cyan', priorityRank: 600, routeSymbol: 'JUMP', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/hyperjump.e48ce883.svg', +} -export const SFI = new Token({ +export const SFI: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0xb753428af26e81097e7fd17f40c88aaa3e04902c', + [CHAINS.ETHEREUM.id]: '0xb753428af26e81097e7fd17f40c88aaa3e04902c', [CHAINS.AVALANCHE.id]: '0xc2Bf0A1f7D8Da50D608bc96CF701110d4A438312', }, - decimals: 18, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.AVALANCHE.id]: 18, + }, symbol: 'SFI', name: 'Saffron Finance', - docUrl: '', swapableType: 'SFI', color: 'red', priorityRank: 600, routeSymbol: 'SFI', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/sfi.4e35fbac.svg', +} -export const DOG = new Token({ +export const DOG: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0xBAac2B4491727D78D2b78815144570b9f2Fe8899', - [CHAINS.BNB.id]: '0xaa88c603d142c371ea0eac8756123c5805edee03', + [CHAINS.ETHEREUM.id]: '0xBAac2B4491727D78D2b78815144570b9f2Fe8899', + [CHAINS.BNBCHAIN.id]: '0xaa88c603d142c371ea0eac8756123c5805edee03', [CHAINS.POLYGON.id]: '0xeEe3371B89FC43Ea970E908536Fcddd975135D8a', }, - decimals: 18, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.BNBCHAIN.id]: 18, + [CHAINS.POLYGON.id]: 18, + }, symbol: 'DOG', name: 'The Doge NFT', - docUrl: '', swapableType: 'DOG', color: 'yellow', priorityRank: 600, routeSymbol: 'DOG', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/dog.b3513f9b.svg', +} -export const NFD = new Token({ +export const NFD: BridgeableToken = { addresses: { - [CHAINS.BNB.id]: '0x0fe9778c005a5a6115cbe12b0568a2d50b765a51', + [CHAINS.BNBCHAIN.id]: '0x0fe9778c005a5a6115cbe12b0568a2d50b765a51', [CHAINS.AVALANCHE.id]: '0xf1293574ee43950e7a8c9f1005ff097a9a713959', [CHAINS.DOGE.id]: '0x868055ADFA27D331d5b69b1BF3469aDAAc3ba7f2', [CHAINS.POLYGON.id]: '0x0a5926027d407222f8fe20f24cb16e103f617046', }, - decimals: 18, + decimals: { + [CHAINS.BNBCHAIN.id]: 18, + [CHAINS.AVALANCHE.id]: 18, + [CHAINS.DOGE.id]: 18, + [CHAINS.POLYGON.id]: 18, + }, symbol: 'NFD', name: 'Feisty Doge', - docUrl: '', swapableType: 'NFD', color: 'yellow', priorityRank: 600, routeSymbol: 'NFD', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/nfd.1212b18d.svg', +} -export const SOLAR = new Token({ +export const SOLAR: BridgeableToken = { addresses: { [CHAINS.MOONBEAM.id]: '0x0DB6729C03C85B0708166cA92801BcB5CAc781fC', [CHAINS.MOONRIVER.id]: '0x76906411D07815491A5E577022757aD941fb5066', }, - decimals: 18, + decimals: { + [CHAINS.MOONBEAM.id]: 18, + [CHAINS.MOONRIVER.id]: 18, + }, symbol: 'veSOLAR', name: 'Vested SolarBeam', - docUrl: '', swapableType: 'SOLAR', color: 'orange', priorityRank: 600, routeSymbol: 'veSOLAR', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/solar.add1885e.svg', +} -export const GMX = new Token({ +export const GMX: BridgeableToken = { addresses: { [CHAINS.ARBITRUM.id]: '0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a', [CHAINS.AVALANCHE.id]: '0x62edc0692bd897d2295872a9ffcac5425011c661', }, - wrapperAddresses: { - [CHAINS.AVALANCHE.id]: '0x20A9DC684B4d0407EF8C9A302BEAaA18ee15F656', + decimals: { + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.AVALANCHE.id]: 18, }, - decimals: 18, symbol: 'GMX', name: 'GMX', - docUrl: '', swapableType: 'GMX', priorityRank: 250, color: 'blue', routeSymbol: 'GMX', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/gmx.0e372310.svg', +} -export const SDT = new Token({ +export const SDT: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x73968b9a57c6e53d41345fd57a6e6ae27d6cdb2f', + [CHAINS.ETHEREUM.id]: '0x73968b9a57c6e53d41345fd57a6e6ae27d6cdb2f', [CHAINS.AVALANCHE.id]: '0xCCBf7c451F81752F7d2237F2c18C371E6e089E69', [CHAINS.ARBITRUM.id]: '0x087d18A77465c34CDFd3a081a2504b7E86CE4EF8', [CHAINS.FANTOM.id]: '0xE3c82A836Ec85311a433fBd9486EfAF4b1AFbF48', [CHAINS.HARMONY.id]: '0xE3c82A836Ec85311a433fBd9486EfAF4b1AFbF48', }, - decimals: 18, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.AVALANCHE.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.FANTOM.id]: 18, + [CHAINS.HARMONY.id]: 18, + }, symbol: 'SDT', name: 'Stake DAO', - docUrl: '', swapableType: 'SDT', color: 'gray', priorityRank: 600, routeSymbol: 'SDT', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/sdt.c37b0b67.svg', +} -export const NEWO = new Token({ +export const NEWO: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x98585dFc8d9e7D48F0b1aE47ce33332CF4237D96', + [CHAINS.ETHEREUM.id]: '0x98585dFc8d9e7D48F0b1aE47ce33332CF4237D96', [CHAINS.AVALANCHE.id]: '0x4Bfc90322dD638F81F034517359BD447f8E0235a', [CHAINS.ARBITRUM.id]: '0x0877154a755B24D499B8e2bD7ecD54d3c92BA433', }, - decimals: 18, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.AVALANCHE.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + }, symbol: 'NEWO', name: 'New Order', - docUrl: '', swapableType: 'NEWO', color: 'yellow', priorityRank: 600, routeSymbol: 'NEWO', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/newo.3c9ae85e.svg', +} -export const PEPE = new Token({ +export const PEPE: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x6982508145454ce325ddbe47a25d4ec3d2311933', + [CHAINS.ETHEREUM.id]: '0x6982508145454ce325ddbe47a25d4ec3d2311933', [CHAINS.ARBITRUM.id]: '0xA54B8e178A49F8e5405A4d44Bb31F496e5564A05', }, - decimals: 18, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + }, symbol: 'PEPE', name: 'Pepe', swapableType: 'PEPE', priorityRank: 600, routeSymbol: 'PEPE', color: 'green', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/pepe.5da81140.svg', +} -export const VSTA = new Token({ +export const VSTA: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0xA8d7F5e7C78ed0Fa097Cc5Ec66C1DC3104c9bbeb', + [CHAINS.ETHEREUM.id]: '0xA8d7F5e7C78ed0Fa097Cc5Ec66C1DC3104c9bbeb', [CHAINS.ARBITRUM.id]: '0xa684cd057951541187f288294a1e1c2646aa2d24', }, - decimals: 18, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + }, symbol: 'VSTA', name: 'Vesta', - docUrl: '', swapableType: 'VSTA', color: 'gray', priorityRank: 600, routeSymbol: 'VSTA', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/vsta.56aa9f41.svg', +} -export const H2O = new Token({ +export const H2O: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x0642026e7f0b6ccac5925b4e7fa61384250e1701', + [CHAINS.ETHEREUM.id]: '0x0642026e7f0b6ccac5925b4e7fa61384250e1701', [CHAINS.ARBITRUM.id]: '0xD1c6f989e9552DB523aBAE2378227fBb059a3976', [CHAINS.AVALANCHE.id]: '0xC6b11a4Fd833d1117E9D312c02865647cd961107', - [CHAINS.BNB.id]: '0x03eFca7CEb108734D3777684F3C0A0d8ad652f79', + [CHAINS.BNBCHAIN.id]: '0x03eFca7CEb108734D3777684F3C0A0d8ad652f79', [CHAINS.MOONBEAM.id]: '0xA46aDF6D5881ca0b8596EDadF8f058F8c16d8B68', [CHAINS.MOONRIVER.id]: '0x9c0a820bb01e2807aCcd1c682d359e92DDd41403', [CHAINS.OPTIMISM.id]: '0xE3c82A836Ec85311a433fBd9486EfAF4b1AFbF48', [CHAINS.POLYGON.id]: '0x32ba7cF7d681357529013de6a2CDF93933C0dF3f', }, - decimals: 18, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.AVALANCHE.id]: 18, + [CHAINS.BNBCHAIN.id]: 18, + [CHAINS.MOONBEAM.id]: 18, + [CHAINS.MOONRIVER.id]: 18, + [CHAINS.OPTIMISM.id]: 18, + [CHAINS.POLYGON.id]: 18, + }, symbol: 'H2O', name: 'H2O', - docUrl: '', swapableType: 'H2O', color: 'cyan', priorityRank: 600, routeSymbol: 'H2O', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/h2o.108c0951.svg', +} -export const L2DAO = new Token({ +export const L2DAO: BridgeableToken = { addresses: { [CHAINS.ARBITRUM.id]: '0x2CaB3abfC1670D1a452dF502e216a66883cDf079', [CHAINS.OPTIMISM.id]: '0xd52f94DF742a6F4B4C8b033369fE13A41782Bf44', }, - decimals: 18, + decimals: { + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.OPTIMISM.id]: 18, + }, symbol: 'L2DAO', name: 'Layer2DAO', - docUrl: '', swapableType: 'L2DAO', color: 'cyan', priorityRank: 600, routeSymbol: 'L2DAO', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/l2dao.0d1dd411.svg', +} -export const PLS = new Token({ +export const PLS: BridgeableToken = { addresses: { [CHAINS.ARBITRUM.id]: '0x51318b7d00db7acc4026c88c3952b66278b6a67f', [CHAINS.OPTIMISM.id]: '0xD9eAA386cCD65F30b77FF175F6b52115FE454fD6', }, - decimals: 18, + decimals: { + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.OPTIMISM.id]: 18, + }, symbol: 'PLS', name: 'Plutus', - docUrl: '', swapableType: 'PLS', color: 'green', priorityRank: 600, routeSymbol: 'PLS', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/pls.a97f40f2.svg', +} -export const AGEUR = new Token({ +export const AGEUR: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x1a7e4e63778B4f12a199C062f3eFdD288afCBce8', + [CHAINS.ETHEREUM.id]: '0x1a7e4e63778B4f12a199C062f3eFdD288afCBce8', [CHAINS.ARBITRUM.id]: '0x16BFc5fe024980124bEf51d1D792dC539d1B5Bf0', [CHAINS.OPTIMISM.id]: '0xa0554607e477cdC9d0EE2A6b087F4b2DC2815C22', }, - decimals: 18, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.OPTIMISM.id]: 18, + }, symbol: 'agEUR', name: 'Angle Euro', - docUrl: '', swapableType: 'AGEUR', color: 'yellow', priorityRank: 600, routeSymbol: 'agEUR', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/ageur.588833db.svg', +} -export const UNIDX = new Token({ +export const UNIDX: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0xf0655dcee37e5c0b70fffd70d85f88f8edf0aff6', + [CHAINS.ETHEREUM.id]: '0xf0655dcee37e5c0b70fffd70d85f88f8edf0aff6', [CHAINS.ARBITRUM.id]: '0x5429706887FCb58a595677B73E9B0441C25d993D', [CHAINS.FANTOM.id]: '0x0483a76D80D0aFEC6bd2afd12C1AD865b9DF1471', [CHAINS.OPTIMISM.id]: '0x28b42698Caf46B4B012CF38b6C75867E0762186D', [CHAINS.BASE.id]: '0x6B4712AE9797C199edd44F897cA09BC57628a1CF', }, - decimals: 18, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.FANTOM.id]: 18, + [CHAINS.OPTIMISM.id]: 18, + [CHAINS.BASE.id]: 18, + }, symbol: 'UNIDX', name: 'Unidex', - docUrl: '', swapableType: 'UNIDX', color: 'gray', priorityRank: 600, routeSymbol: 'UNIDX', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/unidex.29d556df.svg', +} -export const BUSD = new Token({ +export const BUSD: BridgeableToken = { addresses: { - [CHAINS.BNB.id]: '0xe9e7cea3dedca5984780bafc599bd69add087d56', + [CHAINS.BNBCHAIN.id]: '0xe9e7cea3dedca5984780bafc599bd69add087d56', [CHAINS.DOGE.id]: '0x1555C68Be3b22cdcCa934Ae88Cb929Db40aB311d', }, - decimals: 18, + decimals: { + [CHAINS.BNBCHAIN.id]: 18, + [CHAINS.DOGE.id]: 18, + }, symbol: 'BUSD', name: 'Binance USD', swapableType: 'BUSD', - swapableOn: [CHAINS.BNB.id], color: 'yellow', priorityRank: 200, routeSymbol: 'BUSD', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/busd.e8bb5032.svg', +} -export const USDC = new Token({ - visibilityRank: 101, +export const USDC: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + [CHAINS.ETHEREUM.id]: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', [CHAINS.OPTIMISM.id]: '0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85', [CHAINS.CRONOS.id]: '0xc21223249ca28397b4b6541dffaecc539bff0c59', - [CHAINS.BNB.id]: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d', - [CHAINS.POLYGON.id]: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359', + [CHAINS.BNBCHAIN.id]: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d', [CHAINS.BOBA.id]: '0x66a2A913e447d6b4BF33EFbec43aAeF87890FBbc', [CHAINS.DOGE.id]: '0x85C2D3bEBffD83025910985389aB8aD655aBC946', [CHAINS.CANTO.id]: '0x80b5a32E4F032B2a058b4F29EC95EEfEEB87aDcd', @@ -332,13 +434,15 @@ export const USDC = new Token({ [CHAINS.AVALANCHE.id]: '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e', [CHAINS.DFK.id]: '0x3AD9DFE640E1A9Cc1D9B0948620820D975c3803a', [CHAINS.BASE.id]: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + [CHAINS.POLYGON.id]: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', + [CHAINS.SCROLL.id]: '0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4', + [CHAINS.LINEA.id]: '0x176211869cA2b568f2A7D4EE941E073a821EE1ff', }, decimals: { - [CHAINS.ETH.id]: 6, + [CHAINS.ETHEREUM.id]: 6, [CHAINS.OPTIMISM.id]: 6, [CHAINS.CRONOS.id]: 6, - [CHAINS.BNB.id]: 18, - [CHAINS.POLYGON.id]: 6, + [CHAINS.BNBCHAIN.id]: 18, [CHAINS.BOBA.id]: 6, [CHAINS.DOGE.id]: 6, [CHAINS.CANTO.id]: 6, @@ -347,35 +451,21 @@ export const USDC = new Token({ [CHAINS.AVALANCHE.id]: 6, [CHAINS.DFK.id]: 18, [CHAINS.BASE.id]: 6, - }, - swapExceptions: { - [CHAINS.KLAYTN.id]: [CHAINS.ETH.id, CHAINS.DOGE.id], - [CHAINS.DOGE.id]: [CHAINS.ETH.id, CHAINS.DOGE.id], + [CHAINS.POLYGON.id]: 6, + [CHAINS.SCROLL.id]: 6, + [CHAINS.LINEA.id]: 6, }, symbol: 'USDC', name: 'USD Coin', swapableType: 'USD', - swapableOn: [ - CHAINS.BNB.id, - CHAINS.ETH.id, - CHAINS.POLYGON.id, - CHAINS.ARBITRUM.id, - CHAINS.AVALANCHE.id, - CHAINS.HARMONY.id, - CHAINS.AURORA.id, - CHAINS.BOBA.id, - CHAINS.OPTIMISM.id, - CHAINS.METIS.id, - CHAINS.CRONOS.id, - CHAINS.CANTO.id, - ], color: 'blue', priorityRank: 100, routeSymbol: 'USDC', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/usdc.d5dcb030.svg', +} -export const METISUSDC = new Token({ - visibilityRank: 101, +export const METISUSDC: BridgeableToken = { addresses: { [CHAINS.METIS.id]: '0xEA32A96608495e54156Ae48931A7c20f0dcc1a21', }, @@ -385,17 +475,18 @@ export const METISUSDC = new Token({ symbol: 'm.USDC', name: 'Metis USD Coin', swapableType: 'USD', - swapableOn: [CHAINS.METIS.id], color: 'blue', priorityRank: 125, routeSymbol: 'm.USDC', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/usdc.d5dcb030.svg', +} -export const USDT = new Token({ +export const USDT: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0xdac17f958d2ee523a2206206994597c13d831ec7', + [CHAINS.ETHEREUM.id]: '0xdac17f958d2ee523a2206206994597c13d831ec7', [CHAINS.OPTIMISM.id]: '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58', - [CHAINS.BNB.id]: '0x55d398326f99059ff775485246999027b3197955', + [CHAINS.BNBCHAIN.id]: '0x55d398326f99059ff775485246999027b3197955', [CHAINS.POLYGON.id]: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f', [CHAINS.BOBA.id]: '0x5DE1677344D3Cb0D7D465c10b72A8f60699C062d', [CHAINS.DOGE.id]: '0x7f8e71DD5A7e445725F0EF94c7F01806299e877A', @@ -403,15 +494,12 @@ export const USDT = new Token({ [CHAINS.KLAYTN.id]: '0xd6dAb4CfF47dF175349e6e7eE2BF7c40Bb8C05A3', [CHAINS.ARBITRUM.id]: '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9', [CHAINS.AVALANCHE.id]: '0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7', - }, - swapExceptions: { - [CHAINS.KLAYTN.id]: [CHAINS.ETH.id, CHAINS.DOGE.id], - [CHAINS.DOGE.id]: [CHAINS.ETH.id, CHAINS.DOGE.id], + [CHAINS.LINEA.id]: '0xA219439258ca9da29E9Cc4cE5596924745e12B93', }, decimals: { - [CHAINS.ETH.id]: 6, + [CHAINS.ETHEREUM.id]: 6, [CHAINS.OPTIMISM.id]: 6, - [CHAINS.BNB.id]: 18, + [CHAINS.BNBCHAIN.id]: 18, [CHAINS.POLYGON.id]: 6, [CHAINS.BOBA.id]: 6, [CHAINS.DOGE.id]: 6, @@ -419,30 +507,21 @@ export const USDT = new Token({ [CHAINS.KLAYTN.id]: 6, [CHAINS.ARBITRUM.id]: 6, [CHAINS.AVALANCHE.id]: 6, + [CHAINS.LINEA.id]: 6, }, symbol: 'USDT', name: 'USD Tether', color: 'lime', swapableType: 'USD', - swapableOn: [ - CHAINS.BNB.id, - CHAINS.ETH.id, - CHAINS.POLYGON.id, - CHAINS.ARBITRUM.id, - CHAINS.AVALANCHE.id, - CHAINS.HARMONY.id, - CHAINS.AURORA.id, - CHAINS.BOBA.id, - CHAINS.CANTO.id, - ], - visibilityRank: 100, - priorityRank: 101, + priorityRank: 100, routeSymbol: 'USDT', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/usdt.3c9cd2f8.svg', +} -export const DAI = new Token({ +export const DAI: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x6b175474e89094c44da98b954eedeac495271d0f', + [CHAINS.ETHEREUM.id]: '0x6b175474e89094c44da98b954eedeac495271d0f', [CHAINS.OPTIMISM.id]: '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1', [CHAINS.POLYGON.id]: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063', [CHAINS.BOBA.id]: '0xf74195Bb8a5cf652411867c5C2C5b8C2a402be35', @@ -451,35 +530,34 @@ export const DAI = new Token({ [CHAINS.ARBITRUM.id]: '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1', [CHAINS.BASE.id]: '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb', }, - swapExceptions: { - [CHAINS.KLAYTN.id]: [CHAINS.ETH.id, CHAINS.DOGE.id], - [CHAINS.DOGE.id]: [CHAINS.ETH.id, CHAINS.DOGE.id], + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.OPTIMISM.id]: 18, + [CHAINS.POLYGON.id]: 18, + [CHAINS.BOBA.id]: 18, + [CHAINS.DOGE.id]: 18, + [CHAINS.KLAYTN.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.BASE.id]: 18, }, - decimals: 18, symbol: 'DAI', name: 'Dai', swapableType: 'USD', - swapableOn: [ - CHAINS.ETH.id, - CHAINS.POLYGON.id, - CHAINS.AVALANCHE.id, - CHAINS.HARMONY.id, - CHAINS.BOBA.id, - ], color: 'yellow', - visibilityRank: 100, - priorityRank: 102, + priorityRank: 100, routeSymbol: 'DAI', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/dai.ba6d3142.svg', +} -export const WBTC = new Token({ +export const WBTC: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599', + [CHAINS.ETHEREUM.id]: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599', [CHAINS.KLAYTN.id]: '0xDCbacF3f7a069922E677912998c8d57423C37dfA', [CHAINS.DOGE.id]: '0xD0c6179c43C00221915f1a61f8eC06A5Aa32F9EC', }, decimals: { - [CHAINS.ETH.id]: 8, + [CHAINS.ETHEREUM.id]: 8, [CHAINS.KLAYTN.id]: 8, [CHAINS.DOGE.id]: 8, }, @@ -489,40 +567,48 @@ export const WBTC = new Token({ color: 'orange', priorityRank: 300, routeSymbol: 'WBTC', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/wbtc.d5fa58cc.svg', +} -export const WETHE = new Token({ +export const WETHE: BridgeableToken = { addresses: { [CHAINS.AVALANCHE.id]: '0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab', }, - decimals: 18, + decimals: { + [CHAINS.AVALANCHE.id]: 18, + }, symbol: 'WETH.e', name: 'Wrapped ETH', swapableType: 'ETH', - swapableOn: [CHAINS.AVALANCHE.id], color: 'sky', priorityRank: 150, routeSymbol: 'WETH.e', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/weth.19fa93ab.svg', +} -export const ONEETH = new Token({ +export const ONEETH: BridgeableToken = { addresses: { [CHAINS.HARMONY.id]: '0x6983d1e6def3690c4d616b13597a09e6193ea013', }, - decimals: 18, + decimals: { + [CHAINS.HARMONY.id]: 18, + }, symbol: '1ETH', name: 'Harmony ETH', swapableType: 'ETH', - swapableOn: [CHAINS.HARMONY.id], color: 'sky', priorityRank: 600, routeSymbol: '1ETH', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/weth.19fa93ab.svg', +} -export const SYN = new Token({ +export const SYN: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x0f2d719407fdbeff09d87557abb7232601fd9f29', - [CHAINS.BNB.id]: '0xa4080f1778e69467e905b8d6f72f6e441f9e9484', + [CHAINS.ETHEREUM.id]: '0x0f2d719407fdbeff09d87557abb7232601fd9f29', + [CHAINS.BNBCHAIN.id]: '0xa4080f1778e69467e905b8d6f72f6e441f9e9484', [CHAINS.POLYGON.id]: '0xf8f9efc0db77d8881500bb06ff5d6abc3070e695', [CHAINS.FANTOM.id]: '0xE55e19Fb4F2D85af758950957714292DAC1e25B2', [CHAINS.ARBITRUM.id]: '0x080f6aed32fc474dd5717105dba5ea57268f46eb', @@ -538,55 +624,88 @@ export const SYN = new Token({ [CHAINS.DOGE.id]: '0xDfA53EeBA61D69E1D2b56b36d78449368F0265c1', [CHAINS.CANTO.id]: '0x555982d2E211745b96736665e19D9308B615F78e', [CHAINS.BASE.id]: '0x432036208d2717394d2614d6697c46DF3Ed69540', + [CHAINS.BLAST.id]: '0x9592f08387134e218327E6E8423400eb845EdE0E', + }, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.BNBCHAIN.id]: 18, + [CHAINS.POLYGON.id]: 18, + [CHAINS.FANTOM.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.AVALANCHE.id]: 18, + [CHAINS.HARMONY.id]: 18, + [CHAINS.BOBA.id]: 18, + [CHAINS.METIS.id]: 18, + [CHAINS.MOONRIVER.id]: 18, + [CHAINS.MOONBEAM.id]: 18, + [CHAINS.OPTIMISM.id]: 18, + [CHAINS.CRONOS.id]: 18, + [CHAINS.AURORA.id]: 18, + [CHAINS.DOGE.id]: 18, + [CHAINS.CANTO.id]: 18, + [CHAINS.BASE.id]: 18, + [CHAINS.BLAST.id]: 18, }, - decimals: 18, symbol: 'SYN', name: 'Synapse', swapableType: 'SYN', color: 'purple', - visibilityRank: 90, - priorityRank: 120, + priorityRank: 250, routeSymbol: 'SYN', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/syn.042f8cd0.svg', +} -export const FRAX = new Token({ +export const FRAX: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x853d955acef822db058eb8505911ed77f175b99e', + [CHAINS.ETHEREUM.id]: '0x853d955acef822db058eb8505911ed77f175b99e', [CHAINS.ARBITRUM.id]: '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F', [CHAINS.DOGE.id]: '0x10D70831f9C3c11c5fe683b2f1Be334503880DB6', - [CHAINS.POLYGON.id]: '0x45c32fA6DF82ead1e2EF74d17b76547EDdFaFF89', }, - decimals: 18, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.DOGE.id]: 18, + }, symbol: 'FRAX', name: 'Frax', swapableType: 'FRAX', color: 'gray', priorityRank: 200, routeSymbol: 'FRAX', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/frax.0f0670da.svg', +} -export const SYNFRAX = new Token({ +export const SYNFRAX: BridgeableToken = { addresses: { [CHAINS.FANTOM.id]: '0x1852F70512298d56e9c8FDd905e02581E04ddb2a', [CHAINS.MOONRIVER.id]: '0xE96AC70907ffF3Efee79f502C985A7A21Bce407d', [CHAINS.MOONBEAM.id]: '0xDd47A348AB60c61Ad6B60cA8C31ea5e00eBfAB4F', [CHAINS.HARMONY.id]: '0x1852F70512298d56e9c8FDd905e02581E04ddb2a', }, - decimals: 18, + decimals: { + [CHAINS.FANTOM.id]: 18, + [CHAINS.MOONRIVER.id]: 18, + [CHAINS.MOONBEAM.id]: 18, + [CHAINS.HARMONY.id]: 18, + }, symbol: 'synFRAX', name: 'Synapse Frax', swapableType: 'FRAX', color: 'gray', priorityRank: 400, routeSymbol: 'synFRAX', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/frax.0f0670da.svg', +} -export const NUSD = new Token({ +export const NUSD: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x1B84765dE8B7566e4cEAF4D0fD3c5aF52D3DdE4F', + [CHAINS.ETHEREUM.id]: '0x1B84765dE8B7566e4cEAF4D0fD3c5aF52D3DdE4F', [CHAINS.OPTIMISM.id]: '0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00', [CHAINS.CRONOS.id]: '0x396c9c192dd323995346632581BEF92a31AC623b', - [CHAINS.BNB.id]: '0x23b891e5c62e0955ae2bd185990103928ab817b3', + [CHAINS.BNBCHAIN.id]: '0x23b891e5c62e0955ae2bd185990103928ab817b3', [CHAINS.POLYGON.id]: '0xb6c473756050de474286bed418b77aeac39b02af', [CHAINS.FANTOM.id]: '0xED2a7edd7413021d440b09D654f3b87712abAB66', [CHAINS.BOBA.id]: '0x6B4712AE9797C199edd44F897cA09BC57628a1CF', @@ -596,47 +715,52 @@ export const NUSD = new Token({ [CHAINS.AVALANCHE.id]: '0xCFc37A6AB183dd4aED08C204D1c2773c0b1BDf46', [CHAINS.HARMONY.id]: '0xED2a7edd7413021d440b09D654f3b87712abAB66', [CHAINS.AURORA.id]: '0x07379565cD8B0CaE7c60Dc78e7f601b34AF2A21c', + [CHAINS.BLAST.id]: '0x3194B0A295D87fDAA54DF852c248F7a6BAF6c6e0', + }, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.OPTIMISM.id]: 18, + [CHAINS.CRONOS.id]: 18, + [CHAINS.BNBCHAIN.id]: 18, + [CHAINS.POLYGON.id]: 18, + [CHAINS.FANTOM.id]: 18, + [CHAINS.BOBA.id]: 18, + [CHAINS.METIS.id]: 18, + [CHAINS.CANTO.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.AVALANCHE.id]: 18, + [CHAINS.HARMONY.id]: 18, + [CHAINS.AURORA.id]: 18, + [CHAINS.BLAST.id]: 18, }, - decimals: 18, symbol: 'nUSD', name: 'Synapse nUSD', swapableType: 'USD', - swapableOn: [ - CHAINS.BNB.id, - CHAINS.POLYGON.id, - CHAINS.FANTOM.id, - CHAINS.ARBITRUM.id, - CHAINS.AVALANCHE.id, - CHAINS.HARMONY.id, - CHAINS.AURORA.id, - CHAINS.BOBA.id, - CHAINS.OPTIMISM.id, - CHAINS.METIS.id, - CHAINS.CRONOS.id, - CHAINS.CANTO.id, - ], color: 'purple', - visibilityRank: 50, - priorityRank: 110, + priorityRank: 500, routeSymbol: 'nUSD', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/nusd.c7a22fdb.svg', +} -export const NOTE = new Token({ +export const NOTE: BridgeableToken = { addresses: { [CHAINS.CANTO.id]: '0x4e71a2e537b7f9d9413d3991d37958c0b5e1e503', }, - decimals: 18, + decimals: { + [CHAINS.CANTO.id]: 18, + }, symbol: 'NOTE', name: 'Canto Note', swapableType: 'USD', - swapableOn: [CHAINS.CANTO.id], color: 'green', - visibilityRank: 90, - priorityRank: 200, + priorityRank: 100, routeSymbol: 'NOTE', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/note.d5246fbd.svg', +} -export const NETH = new Token({ +export const NETH: BridgeableToken = { addresses: { [CHAINS.OPTIMISM.id]: '0x809DC529f07651bD43A172e8dB6f4a7a0d771036', [CHAINS.FANTOM.id]: '0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00', @@ -647,210 +771,266 @@ export const NETH = new Token({ [CHAINS.ARBITRUM.id]: '0x3ea9B0ab55F34Fb188824Ee288CeaEfC63cf908e', [CHAINS.AVALANCHE.id]: '0x19E1ae0eE35c0404f835521146206595d37981ae', [CHAINS.HARMONY.id]: '0x0b5740c6b4a97f90eF2F0220651Cca420B868FfB', + [CHAINS.BLAST.id]: '0xce971282fAAc9faBcF121944956da7142cccC855', + }, + decimals: { + [CHAINS.OPTIMISM.id]: 18, + [CHAINS.FANTOM.id]: 18, + [CHAINS.BOBA.id]: 18, + [CHAINS.METIS.id]: 18, + [CHAINS.CANTO.id]: 18, + [CHAINS.BASE.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.AVALANCHE.id]: 18, + [CHAINS.HARMONY.id]: 18, + [CHAINS.BLAST.id]: 18, }, - decimals: 18, symbol: 'nETH', name: 'Synapse nETH', swapableType: 'ETH', - swapableOn: [ - CHAINS.OPTIMISM.id, - CHAINS.BOBA.id, - CHAINS.METIS.id, - CHAINS.CANTO.id, - CHAINS.BASE.id, - CHAINS.ARBITRUM.id, - CHAINS.AVALANCHE.id, - CHAINS.HARMONY.id, - ], color: 'purple', - visibilityRank: 50, - priorityRank: 115, + priorityRank: 500, routeSymbol: 'nETH', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/neth.7c854d0f.svg', +} -export const ETH = new Token({ +export const ETH: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: zeroAddress, - [CHAINS.OPTIMISM.id]: zeroAddress, - [CHAINS.BOBA.id]: zeroAddress, + [CHAINS.ETHEREUM.id]: ZeroAddress, + [CHAINS.OPTIMISM.id]: ZeroAddress, + [CHAINS.BOBA.id]: ZeroAddress, [CHAINS.CANTO.id]: '0x5FD55A1B9FC24967C4dB09C513C3BA0DFa7FF687', - [CHAINS.BASE.id]: zeroAddress, - [CHAINS.ARBITRUM.id]: zeroAddress, + [CHAINS.BASE.id]: ZeroAddress, + [CHAINS.ARBITRUM.id]: ZeroAddress, [CHAINS.DFK.id]: '0xfBDF0E31808d0aa7b9509AA6aBC9754E48C58852', + [CHAINS.BLAST.id]: ZeroAddress, + [CHAINS.SCROLL.id]: ZeroAddress, + [CHAINS.LINEA.id]: ZeroAddress, + }, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.OPTIMISM.id]: 18, + [CHAINS.BOBA.id]: 18, + [CHAINS.CANTO.id]: 18, + [CHAINS.BASE.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.DFK.id]: 18, + [CHAINS.BLAST.id]: 18, + [CHAINS.SCROLL.id]: 18, + [CHAINS.LINEA.id]: 18, }, - decimals: 18, symbol: 'ETH', name: 'Ethereum', - isNative: true, swapableType: 'ETH', color: 'sky', - visibilityRank: 101, - priorityRank: 105, - swapableOn: [ - CHAINS.ARBITRUM.id, - CHAINS.BASE.id, - CHAINS.BOBA.id, - CHAINS.OPTIMISM.id, - ], + priorityRank: 150, routeSymbol: 'ETH', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/eth.b3692688.svg', +} -export const MOVR = new Token({ +export const MOVR: BridgeableToken = { addresses: { [CHAINS.MOONBEAM.id]: '0x1d4C2a246311bB9f827F4C768e277FF5787B7D7E', - [CHAINS.MOONRIVER.id]: zeroAddress, + [CHAINS.MOONRIVER.id]: ZeroAddress, + }, + decimals: { + [CHAINS.MOONBEAM.id]: 18, + [CHAINS.MOONRIVER.id]: 18, }, - decimals: 18, symbol: 'MOVR', name: 'MOVR', - isNative: true, swapableType: 'MOVR', color: 'purple', priorityRank: 300, routeSymbol: 'MOVR', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/movr.3fb35010.svg', +} -export const AVAX = new Token({ +export const AVAX: BridgeableToken = { addresses: { [CHAINS.MOONBEAM.id]: '0xA1f8890E39b4d8E33efe296D698fe42Fb5e59cC3', [CHAINS.KLAYTN.id]: '0xCd8fE44A29Db9159dB36f96570d7A4d91986f528', - [CHAINS.AVALANCHE.id]: zeroAddress, + [CHAINS.AVALANCHE.id]: ZeroAddress, [CHAINS.DFK.id]: '0xB57B60DeBDB0b8172bb6316a9164bd3C695F133a', [CHAINS.HARMONY.id]: '0xb12c13e66AdE1F72f71834f2FC5082Db8C091358', }, - decimals: 18, + decimals: { + [CHAINS.MOONBEAM.id]: 18, + [CHAINS.KLAYTN.id]: 18, + [CHAINS.AVALANCHE.id]: 18, + [CHAINS.DFK.id]: 18, + [CHAINS.HARMONY.id]: 18, + }, symbol: 'AVAX', name: 'AVAX', - isNative: true, swapableType: 'AVAX', color: 'red', - visibilityRank: 90, priorityRank: 300, routeSymbol: 'AVAX', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/avax.9d53cbf0.svg', +} -export const WMOVR = new Token({ +export const WMOVR: BridgeableToken = { addresses: { [CHAINS.MOONRIVER.id]: '0x98878b06940ae243284ca214f92bb71a2b032b8a', }, - decimals: 18, + decimals: { + [CHAINS.MOONRIVER.id]: 18, + }, symbol: 'MOVR', name: 'Wrapped MOVR', swapableType: 'MOVR', color: 'purple', priorityRank: 350, routeSymbol: 'WMOVR', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/movr.3fb35010.svg', +} -export const WAVAX = new Token({ +export const WAVAX: BridgeableToken = { addresses: { [CHAINS.AVALANCHE.id]: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7', }, - decimals: 18, + decimals: { + [CHAINS.AVALANCHE.id]: 18, + }, symbol: 'AVAX', name: 'Wrapped AVAX', swapableType: 'AVAX', color: 'red', - visibilityRank: 90, priorityRank: 350, routeSymbol: 'WAVAX', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/avax.9d53cbf0.svg', +} -export const JEWEL = new Token({ +export const JEWEL: BridgeableToken = { addresses: { - [CHAINS.DFK.id]: zeroAddress, + [CHAINS.DFK.id]: ZeroAddress, [CHAINS.HARMONY.id]: '0x72cb10c6bfa5624dd07ef608027e366bd690048f', [CHAINS.KLAYTN.id]: '0x30C103f8f5A3A732DFe2dCE1Cc9446f545527b43', [CHAINS.AVALANCHE.id]: '0x997Ddaa07d716995DE90577C123Db411584E5E46', + [CHAINS.METIS.id]: '0x17C09cfC96C865CF546d73365Cedb6dC66986963', + [CHAINS.ETHEREUM.id]: '0x12f79f8c1A6e47a9b5F0796FDb008Bdc182fa19e', + }, + decimals: { + [CHAINS.DFK.id]: 18, + [CHAINS.HARMONY.id]: 18, + [CHAINS.KLAYTN.id]: 18, + [CHAINS.AVALANCHE.id]: 18, + [CHAINS.METIS.id]: 18, + [CHAINS.ETHEREUM.id]: 18, }, - decimals: 18, symbol: 'JEWEL', name: 'JEWEL', color: 'lime', - isNative: true, swapableType: 'JEWEL', priorityRank: 250, routeSymbol: 'JEWEL', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/jewel.bb7c4136.svg', +} -export const WJEWEL = new Token({ +export const WJEWEL: BridgeableToken = { addresses: { [CHAINS.DFK.id]: '0xCCb93dABD71c8Dad03Fc4CE5559dC3D89F67a260', }, - decimals: 18, + decimals: { + [CHAINS.DFK.id]: 18, + }, symbol: 'WJEWEL', name: 'Wrapped JEWEL', swapableType: 'JEWEL', - swapableOn: [CHAINS.HARMONY.id], color: 'lime', priorityRank: 350, routeSymbol: 'WJEWEL', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/jewel.bb7c4136.svg', +} -export const SYNJEWEL = new Token({ +export const SYNJEWEL: BridgeableToken = { addresses: { [CHAINS.HARMONY.id]: '0x28b42698Caf46B4B012CF38b6C75867E0762186D', }, - decimals: 18, + decimals: { + [CHAINS.HARMONY.id]: 18, + }, symbol: 'synJEWEL', name: 'synJEWEL', swapableType: 'JEWEL', - swapableOn: [CHAINS.HARMONY.id], color: 'lime', priorityRank: 400, routeSymbol: 'synJEWEL', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/jewel.bb7c4136.svg', +} -export const XJEWEL = new Token({ +export const XJEWEL: BridgeableToken = { addresses: { [CHAINS.DFK.id]: '0x77f2656d04E158f915bC22f07B779D94c1DC47Ff', [CHAINS.HARMONY.id]: '0xA9cE83507D872C5e1273E745aBcfDa849DAA654F', }, - decimals: 18, + decimals: { + [CHAINS.DFK.id]: 18, + [CHAINS.HARMONY.id]: 18, + }, symbol: 'xJEWEL', name: 'xJEWEL', swapableType: 'XJEWEL', color: 'lime', priorityRank: 350, routeSymbol: 'xJEWEL', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/jewel.bb7c4136.svg', +} -export const USDCe = new Token({ +export const USDCe: BridgeableToken = { addresses: { [CHAINS.OPTIMISM.id]: '0x7F5c764cBc14f9669B88837ca1490cCa17c31607', [CHAINS.AVALANCHE.id]: '0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664', [CHAINS.ARBITRUM.id]: '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8', [CHAINS.AURORA.id]: '0xB12BFcA5A55806AaF64E99521918A4bf0fC40802', - [CHAINS.POLYGON.id]: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', }, - decimals: 6, + decimals: { + [CHAINS.OPTIMISM.id]: 6, + [CHAINS.AVALANCHE.id]: 6, + [CHAINS.ARBITRUM.id]: 6, + [CHAINS.AURORA.id]: 6, + }, symbol: 'USDC.e', name: 'Bridged USDC', swapableType: 'USD', color: 'blue', - swapableOn: [CHAINS.AVALANCHE.id, CHAINS.ARBITRUM.id, CHAINS.OPTIMISM.id], - visibilityRank: 100, priorityRank: 125, routeSymbol: 'USDC.e', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/usdc.d5dcb030.svg', +} -export const USDTe = new Token({ +export const USDTe: BridgeableToken = { addresses: { [CHAINS.AVALANCHE.id]: '0xc7198437980c041c805a1edcba50c1ce5db95118', [CHAINS.AURORA.id]: '0x4988a896b1227218e4A686fdE5EabdcAbd91571f', }, - decimals: 6, + decimals: { + [CHAINS.AVALANCHE.id]: 6, + [CHAINS.AURORA.id]: 6, + }, symbol: 'USDT.e', name: 'Bridged USDT', swapableType: 'USD', - swapableOn: [CHAINS.AVALANCHE.id], - visibilityRank: 100, color: 'green', priorityRank: 125, routeSymbol: 'USDT.e', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/usdt.3c9cd2f8.svg', +} -export const SUSD = new Token({ +export const SUSD: BridgeableToken = { addresses: { [CHAINS.OPTIMISM.id]: '0x8c6f28f2F1A3C87F0f938b96d27520d9751ec8d9', }, @@ -861,20 +1041,20 @@ export const SUSD = new Token({ name: 'Synth sUSD', color: 'purple', swapableType: 'USD', - swapableOn: [CHAINS.OPTIMISM.id], - visibilityRank: 100, priorityRank: 200, routeSymbol: 'sUSD', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/susd.3aa0b6c4.svg', +} -export const WSOHM = new Token({ +export const WSOHM: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0xCa76543Cf381ebBB277bE79574059e32108e3E65', + [CHAINS.ETHEREUM.id]: '0xCa76543Cf381ebBB277bE79574059e32108e3E65', [CHAINS.ARBITRUM.id]: '0x30bD4e574a15994B35EF9C7a5bc29002F1224821', [CHAINS.AVALANCHE.id]: '0x240E332Cd26AaE10622B24160D23425A17256F5d', }, decimals: { - [CHAINS.ETH.id]: 18, + [CHAINS.ETHEREUM.id]: 18, [CHAINS.ARBITRUM.id]: 18, [CHAINS.AVALANCHE.id]: 18, }, @@ -882,28 +1062,30 @@ export const WSOHM = new Token({ name: 'Wrapped sOHM', color: 'gray', swapableType: 'OHM', - visibilityRank: 40, priorityRank: 600, routeSymbol: 'wsOHM', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/ohm.1b779b45.svg', +} -export const ONEDAI = new Token({ +export const ONEDAI: BridgeableToken = { addresses: { [CHAINS.HARMONY.id]: '0xef977d2f931c1978db5f6747666fa1eacb0d0339', }, - decimals: 18, + decimals: { + [CHAINS.HARMONY.id]: 18, + }, symbol: '1DAI', name: 'Harmony Dai Stablecoin', swapableType: 'USD', - swapableOn: [CHAINS.HARMONY.id], color: 'yellow', - visibilityRank: 100, priorityRank: 600, routeSymbol: '1DAI', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/dai.ba6d3142.svg', +} -export const ONEUSDC = new Token({ - visibilityRank: 101, +export const ONEUSDC: BridgeableToken = { addresses: { [CHAINS.HARMONY.id]: '0x985458e523db3d53125813ed68c274899e9dfab4', }, @@ -913,13 +1095,14 @@ export const ONEUSDC = new Token({ symbol: '1USDC', name: 'Harmony USD Coin', swapableType: 'USD', - swapableOn: [CHAINS.HARMONY.id], color: 'blue', priorityRank: 600, routeSymbol: '1USDC', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/usdc.d5dcb030.svg', +} -export const ONEUSDT = new Token({ +export const ONEUSDT: BridgeableToken = { addresses: { [CHAINS.HARMONY.id]: '0x3c2b8be99c50593081eaa2a724f0b8285f5aba8f', }, @@ -930,13 +1113,13 @@ export const ONEUSDT = new Token({ name: 'Harmony USD Tether', color: 'lime', swapableType: 'USD', - swapableOn: [CHAINS.HARMONY.id], - visibilityRank: 100, priorityRank: 600, routeSymbol: '1USDT', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/usdt.3c9cd2f8.svg', +} -export const BTCB = new Token({ +export const BTCB: BridgeableToken = { addresses: { [CHAINS.KLAYTN.id]: '0xe82f87ba4E97b2796aA0Fa4eFB06e8f0d2EB4FE1', [CHAINS.AVALANCHE.id]: '0x152b9d0FdC40C096757F570A51E494bd4b943E50', @@ -953,26 +1136,30 @@ export const BTCB = new Token({ color: 'orange', priorityRank: 300, routeSymbol: 'BTC.b', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/btc.63077225.svg', +} -export const DAIE = new Token({ +export const DAIe: BridgeableToken = { addresses: { [CHAINS.AVALANCHE.id]: '0xd586E7F844cEa2F87f50152665BCbc2C279D8d70', }, - decimals: 18, + decimals: { + [CHAINS.AVALANCHE.id]: 18, + }, symbol: 'DAI.e', name: 'Dai.e Token', swapableType: 'USD', - swapableOn: [CHAINS.AVALANCHE.id], color: 'yellow', - visibilityRank: 100, priorityRank: 125, routeSymbol: 'DAI.e', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/dai.ba6d3142.svg', +} -export const KLAY = new Token({ +export const KLAY: BridgeableToken = { addresses: { - [CHAINS.KLAYTN.id]: zeroAddress, + [CHAINS.KLAYTN.id]: ZeroAddress, [CHAINS.DFK.id]: '0x97855Ba65aa7ed2F65Ed832a776537268158B78a', }, decimals: { @@ -981,14 +1168,15 @@ export const KLAY = new Token({ }, symbol: 'KLAY', name: 'Klaytn', - isNative: true, swapableType: 'KLAY', color: 'red', priorityRank: 300, routeSymbol: 'KLAY', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/klay.a50be928.svg', +} -export const WKLAY = new Token({ +export const WKLAY: BridgeableToken = { addresses: { [CHAINS.KLAYTN.id]: '0x5819b6af194A78511c79C85Ea68D2377a7e9335f', }, @@ -1001,70 +1189,85 @@ export const WKLAY = new Token({ color: 'red', priorityRank: 350, routeSymbol: 'WKLAY', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/klay.a50be928.svg', +} -export const MATIC = new Token({ +export const MATIC: BridgeableToken = { addresses: { - [CHAINS.POLYGON.id]: zeroAddress, + [CHAINS.POLYGON.id]: ZeroAddress, [CHAINS.DFK.id]: '0xD17a41Cd199edF1093A9Be4404EaDe52Ec19698e', }, - decimals: 18, + decimals: { + [CHAINS.POLYGON.id]: 18, + [CHAINS.DFK.id]: 18, + }, symbol: 'MATIC', name: 'MATIC', - isNative: true, swapableType: 'MATIC', color: 'blue', - visibilityRank: 90, priorityRank: 300, routeSymbol: 'MATIC', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/matic.237cd2b6.svg', +} -export const WMATIC = new Token({ +export const WMATIC: BridgeableToken = { addresses: { [CHAINS.POLYGON.id]: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', }, - decimals: 18, + decimals: { + [CHAINS.POLYGON.id]: 18, + }, symbol: 'WMATIC', name: 'WMATIC', swapableType: 'MATIC', color: 'blue', - visibilityRank: 90, priorityRank: 350, routeSymbol: 'WMATIC', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/matic.237cd2b6.svg', +} -export const FTM = new Token({ +export const FTM: BridgeableToken = { addresses: { - [CHAINS.FANTOM.id]: zeroAddress, + [CHAINS.FANTOM.id]: ZeroAddress, [CHAINS.DFK.id]: '0x2Df041186C844F8a2e2b63F16145Bc6Ff7d23E25', }, - decimals: 18, + decimals: { + [CHAINS.FANTOM.id]: 18, + [CHAINS.DFK.id]: 18, + }, symbol: 'FTM', name: 'Fantom', swapableType: 'FTM', - swapableOn: [CHAINS.FANTOM.id], color: 'blue', priorityRank: 300, routeSymbol: 'FTM', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/ftm.af71a88f.svg', +} -export const WFTM = new Token({ +export const WFTM: BridgeableToken = { addresses: { [CHAINS.FANTOM.id]: '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83', }, - decimals: 18, + decimals: { + [CHAINS.FANTOM.id]: 18, + }, symbol: 'WFTM', name: 'Wrapped Fantom', swapableType: 'FTM', - swapableOn: [CHAINS.FANTOM.id], color: 'blue', priorityRank: 350, routeSymbol: 'WFTM', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/ftm.af71a88f.svg', +} -export const WETH = new Token({ +export const WETH: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + [CHAINS.ETHEREUM.id]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', [CHAINS.OPTIMISM.id]: '0x121ab82b49B2BC4c7901CA46B8277962b4350204', [CHAINS.BOBA.id]: '0xd203De32170130082896b4111eDF825a4774c18E', [CHAINS.METIS.id]: '0x420000000000000000000000000000000000000A', @@ -1073,63 +1276,116 @@ export const WETH = new Token({ [CHAINS.KLAYTN.id]: '0xCD6f29dC9Ca217d0973d3D21bF58eDd3CA871a86', [CHAINS.BASE.id]: '0x4200000000000000000000000000000000000006', [CHAINS.ARBITRUM.id]: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1', + [CHAINS.BLAST.id]: '0x4300000000000000000000000000000000000004', + }, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.OPTIMISM.id]: 18, + [CHAINS.BOBA.id]: 18, + [CHAINS.METIS.id]: 18, + [CHAINS.MOONBEAM.id]: 18, + [CHAINS.DOGE.id]: 18, + [CHAINS.KLAYTN.id]: 18, + [CHAINS.BASE.id]: 18, + [CHAINS.ARBITRUM.id]: 18, + [CHAINS.BLAST.id]: 18, }, - decimals: 18, symbol: 'WETH', name: 'Wrapped ETH', swapableType: 'ETH', color: 'sky', priorityRank: 350, routeSymbol: 'WETH', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/weth.19fa93ab.svg', +} -export const CRVUSD = new Token({ - visibilityRank: 101, +export const CRVUSD: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E', + [CHAINS.ETHEREUM.id]: '0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E', [CHAINS.BASE.id]: '0x417Ac0e078398C154EdFadD9Ef675d30Be60Af93', }, - decimals: 18, - swapExceptions: {}, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.BASE.id]: 18, + }, symbol: 'crvUSD', name: 'Curve.fi USD', swapableType: 'USD', - swapableOn: [], + color: 'yellow', priorityRank: 200, routeSymbol: 'crvUSD', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/crvusd.e65e6479.svg', +} -export const LUSD = new Token({ - visibilityRank: 101, +export const LUSD: BridgeableToken = { addresses: { - [CHAINS.ETH.id]: '0x5f98805A4E8be255a32880FDeC7F6728C6568bA0', + [CHAINS.ETHEREUM.id]: '0x5f98805A4E8be255a32880FDeC7F6728C6568bA0', + }, + decimals: { + [CHAINS.ETHEREUM.id]: 18, }, - decimals: 18, - swapExceptions: {}, symbol: 'LUSD', name: 'Liquity USD', swapableType: 'USD', - swapableOn: [], color: 'blue', priorityRank: 200, routeSymbol: 'LUSD', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/lusd.1d09460e.svg', +} -export const USDBC = new Token({ - visibilityRank: 101, +export const USDBC: BridgeableToken = { addresses: { [CHAINS.BASE.id]: '0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA', }, decimals: { [CHAINS.BASE.id]: 6, }, - swapExceptions: {}, symbol: 'USDbC', name: 'USD Base Coin', swapableType: 'USD', - swapableOn: [], color: 'blue', priorityRank: 125, routeSymbol: 'USDbC', -}) + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/usdc.d5dcb030.svg', +} + +export const USDB: BridgeableToken = { + addresses: { + [CHAINS.BLAST.id]: '0x4300000000000000000000000000000000000003', + }, + decimals: { + [CHAINS.BLAST.id]: 18, + }, + symbol: 'USDB', + name: 'Blast Rebasing USD', + swapableType: 'USD', + color: 'yellow', + priorityRank: 103, + routeSymbol: 'USDB', + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/usdb.33190604.svg', +} + +export const SPECTRAL: BridgeableToken = { + priorityRank: 600, + addresses: { + [CHAINS.ETHEREUM.id]: '0xAdF7C35560035944e805D98fF17d58CDe2449389', + [CHAINS.BASE.id]: '0x96419929d7949D6A801A6909c145C8EEf6A40431', + }, + decimals: { + [CHAINS.ETHEREUM.id]: 18, + [CHAINS.BASE.id]: 18, + }, + symbol: 'SPEC', + name: 'Spectral Token', + swapableType: 'SPEC', + color: 'blue', + routeSymbol: 'SPEC', + imgUrl: + 'https://105bc697.sanguine-fe.pages.dev/_next/static/media/spectral.6d51750c.svg', +} diff --git a/packages/rest-api/src/constants/chains.ts b/packages/rest-api/src/constants/chains.ts new file mode 100644 index 0000000000..dcc4c2502b --- /dev/null +++ b/packages/rest-api/src/constants/chains.ts @@ -0,0 +1,495 @@ +import _ from 'lodash' + +import { Chain } from '../types' + +export const ETHEREUM: Chain = { + id: 1, + name: 'Ethereum', + rpcUrls: { + primary: 'https://ethereum.blockpi.network/v1/rpc/public', + fallback: 'https://rpc.ankr.com/eth', + }, + explorerUrl: 'https://etherscan.com', + explorerName: 'Etherscan', + blockTime: 12000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/ethereum.4a372106.svg', + networkName: 'Ethereum Mainnet', + networkUrl: 'https://eth.llamarpc.com', + nativeCurrency: { + name: 'Ethereum', + symbol: 'ETH', + decimals: 18, + }, +} + +export const ARBITRUM: Chain = { + id: 42161, + name: 'Arbitrum', + rpcUrls: { + primary: 'https://arbitrum.blockpi.network/v1/rpc/public', + fallback: 'https://arb1.arbitrum.io/rpc', + }, + explorerUrl: 'https://arbiscan.io', + explorerName: 'Arbiscan', + blockTime: 300, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/arbitrum.8ddb1b22.svg', + networkName: 'Arbitrum One', + networkUrl: 'https://arb1.arbitrum.io/rpc', + nativeCurrency: { + name: 'Ethereum', + symbol: 'ETH', + decimals: 18, + }, +} + +export const BNBCHAIN: Chain = { + id: 56, + name: 'BNB Chain', + rpcUrls: { + primary: 'https://bsc-dataseed1.ninicoin.io/', + fallback: 'https://bsc-dataseed2.ninicoin.io', + }, + explorerUrl: 'https://bscscan.com', + explorerName: 'BscScan', + blockTime: 3000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/bnb.5948fe5e.svg', + networkName: 'BNB Smart Chain Mainnet', + networkUrl: 'https://bsc-dataseed1.bnbchain.org', + nativeCurrency: { + name: 'Binance Coin', + symbol: 'BNB', + decimals: 18, + }, +} + +export const AVALANCHE: Chain = { + id: 43114, + name: 'Avalanche', + rpcUrls: { + primary: 'https://api.avax.network/ext/bc/C/rpc', + fallback: 'https://1rpc.io/avax/c', + }, + explorerUrl: 'https://snowtrace.io/', + explorerName: 'Snowtrace', + blockTime: 2000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/avalanche.9d53cbf0.svg', + networkName: 'Avalanche C-Chain', + networkUrl: 'https://api.avax.network/ext/bc/C/rpc', + nativeCurrency: { + name: 'Avax', + symbol: 'AVAX', + decimals: 18, + }, +} + +export const CANTO: Chain = { + id: 7700, + name: 'Canto', + rpcUrls: { + primary: 'https://mainnode.plexnode.org:8545', + fallback: 'https://canto.slingshot.finance', + }, + explorerUrl: 'https://tuber.build/', + explorerName: 'Canto Explorer', + blockTime: 6000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/canto.cb85e14f.svg', + networkName: 'Canto', + networkUrl: 'https://canto.slingshot.finance', + nativeCurrency: { + name: 'Canto', + symbol: 'CANTO', + decimals: 18, + }, +} + +export const OPTIMISM: Chain = { + id: 10, + name: 'Optimism', + rpcUrls: { + primary: 'https://mainnet.optimism.io', + fallback: 'https://1rpc.io/op', + }, + explorerUrl: 'https://optimistic.etherscan.io', + explorerName: 'Optimism Explorer', + blockTime: 2000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/optimism.84d4f0ef.svg', + networkName: 'OP Mainnet', + networkUrl: 'https://mainnet.optimism.io', + nativeCurrency: { + name: 'Ethereum', + symbol: 'ETH', + decimals: 18, + }, +} + +export const POLYGON: Chain = { + id: 137, + name: 'Polygon', + rpcUrls: { + primary: 'https://polygon-bor.publicnode.com', + fallback: 'https://polygon.llamarpc.com', + }, + explorerUrl: 'https://polygonscan.com', + explorerName: 'PolygonScan', + blockTime: 2000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/polygon.237cd2b6.svg', + networkName: 'Polygon Mainnet', + networkUrl: 'https://polygon-rpc.com', + nativeCurrency: { + name: 'Matic', + symbol: 'MATIC', + decimals: 18, + }, +} + +export const DFK: Chain = { + id: 53935, + name: 'DFK Chain', + rpcUrls: { + primary: 'https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc', + fallback: 'https://dfkchain.api.onfinality.io/public', + }, + explorerUrl: 'https://subnets.avax.network/defi-kingdoms', + explorerName: 'DFK Subnet Explorer', + blockTime: 2000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/dfk.2bd1f0e4.svg', + networkName: 'DFK Chain', + networkUrl: 'https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc', + nativeCurrency: { + name: 'Jewel', + symbol: 'JEWEL', + decimals: 18, + }, +} + +export const KLAYTN: Chain = { + id: 8217, + name: 'Klaytn', + rpcUrls: { + primary: 'https://klaytn.blockpi.network/v1/rpc/public', + fallback: 'https://klaytn.api.onfinality.io/public', + }, + explorerUrl: 'https://scope.klaytn.com', + explorerName: 'Klaytn Explorer', + blockTime: 1000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/klaytn.59495fbb.svg', + networkName: 'Klaytn Mainnet Cypress', + networkUrl: 'https://public-en-cypress.klaytn.net', + nativeCurrency: { + name: 'Klaytn', + symbol: 'KLAY', + decimals: 18, + }, +} + +export const FANTOM: Chain = { + id: 250, + name: 'Fantom', + rpcUrls: { + primary: 'https://rpc.ftm.tools', + fallback: 'https://fantom-rpc.gateway.pokt.network/', + }, + explorerUrl: 'https://ftmscan.com', + explorerName: 'FTMScan', + blockTime: 1000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/fantom.1e444dad.svg', + networkName: 'Fantom Opera', + networkUrl: 'https://rpc.ftm.tools', + nativeCurrency: { + name: 'Fantom', + symbol: 'FTM', + decimals: 18, + }, +} + +export const CRONOS: Chain = { + id: 25, + name: 'Cronos', + rpcUrls: { + primary: 'https://evm-cronos.crypto.org', + fallback: 'https://cronos.blockpi.network/v1/rpc/public', + }, + explorerUrl: 'https://cronoscan.com', + explorerName: 'CronoScan', + blockTime: 6000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/cronos.b06f8311.svg', + networkName: 'Cronos Mainnet', + networkUrl: 'https://evm.cronos.org', + nativeCurrency: { + name: 'Cronos', + symbol: 'CRO', + decimals: 18, + }, +} + +export const BOBA: Chain = { + id: 288, + name: 'Boba Chain', + rpcUrls: { + primary: 'https://mainnet.boba.network', + fallback: 'https://replica.boba.network', + }, + explorerUrl: 'https://bobascan.com', + explorerName: 'Boba Explorer', + blockTime: 1000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/boba.2072e50b.svg', + networkName: 'Boba Network', + networkUrl: 'https://mainnet.boba.network', + nativeCurrency: { + name: 'Ethereum', + symbol: 'ETH', + decimals: 18, + }, +} + +export const METIS: Chain = { + id: 1088, + name: 'Metis', + rpcUrls: { + primary: 'https://andromeda.metis.io/?owner=1088', + fallback: 'https://metis-mainnet.public.blastapi.io', + }, + explorerUrl: 'https://andromeda-explorer.metis.io', + explorerName: 'Metis Explorer', + blockTime: 4000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/metis.3114f675.svg', + networkName: 'Metis Andromeda Mainnet', + networkUrl: 'https://andromeda.metis.io/?owner=1088', + nativeCurrency: { + name: 'Metis', + symbol: 'METIS', + decimals: 18, + }, +} + +export const AURORA: Chain = { + id: 1313161554, + name: 'Aurora', + rpcUrls: { + primary: 'https://mainnet.aurora.dev', + fallback: 'https://1rpc.io/aurora', + }, + explorerUrl: 'https://explorer.mainnet.aurora.dev', + explorerName: 'Aurora Explorer', + blockTime: 1000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/aurora.5a46037d.svg', + networkName: 'Aurora Mainnet', + networkUrl: 'https://mainnet.aurora.dev', + nativeCurrency: { + name: 'Ethereum', + symbol: 'ETH', + decimals: 18, + }, +} + +export const HARMONY: Chain = { + id: 1666600000, + name: 'Harmony', + rpcUrls: { + primary: 'https://api.harmony.one', + fallback: 'https://api.s0.t.hmny.io', + }, + explorerUrl: 'https://explorer.harmony.one', + explorerName: 'Harmony Explorer', + blockTime: 2000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/harmony.af12f77e.svg', + networkName: 'Harmony Mainnet Shard 0', + networkUrl: 'https://api.harmony.one', + nativeCurrency: { + name: 'Harmony One', + symbol: 'ONE', + decimals: 18, + }, +} + +export const MOONBEAM: Chain = { + id: 1284, + name: 'Moonbeam', + rpcUrls: { + primary: 'https://rpc.api.moonbeam.network', + fallback: 'https://moonbeam.public.blastapi.io', + }, + explorerUrl: 'https://moonbeam.moonscan.io', + explorerName: 'Moonbeam Explorer', + blockTime: 12000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/moonbeam.284ab9b4.svg', + networkName: 'Moonbeam', + networkUrl: 'https://rpc.api.moonbeam.network', + nativeCurrency: { + name: 'Glimmer', + symbol: 'GLMR', + decimals: 18, + }, +} + +export const MOONRIVER: Chain = { + id: 1285, + name: 'Moonriver', + rpcUrls: { + primary: 'https://rpc.api.moonriver.moonbeam.network', + fallback: 'https://moonriver.public.blastapi.io', + }, + explorerUrl: 'https://moonriver.moonscan.io', + explorerName: 'Moonriver Explorer', + blockTime: 12000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/moonriver.3fb35010.svg', + networkName: 'Moonriver', + networkUrl: 'https://rpc.api.moonriver.moonbeam.network', + nativeCurrency: { + name: 'Moonriver', + symbol: 'MOVR', + decimals: 18, + }, +} + +export const DOGE: Chain = { + id: 2000, + name: 'Dogechain', + rpcUrls: { + primary: 'https://rpc.dogechain.dog', + fallback: 'https://rpc01-sg.dogechain.dog', + }, + explorerUrl: 'https://explorer.dogechain.dog', + explorerName: 'Dogechain Explorer', + blockTime: 2000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/dogechain.36935650.svg', + networkName: 'Dogechain Mainnet', + networkUrl: 'https://rpc.dogechain.dog', + nativeCurrency: { + name: 'DOGE', + symbol: 'DOGE', + decimals: 18, + }, +} + +export const BASE: Chain = { + id: 8453, + name: 'Base', + rpcUrls: { + primary: 'https://base.blockpi.network/v1/rpc/public', + fallback: 'https://developer-access-mainnet.base.org', + }, + explorerUrl: 'https://basescan.org', + explorerName: 'BaseScan', + blockTime: 3000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/base.d919fbef.svg', + networkName: 'Base', + networkUrl: 'https://mainnet.base.org', + nativeCurrency: { + name: 'Ethereum', + symbol: 'ETH', + decimals: 18, + }, +} + +export const BLAST: Chain = { + id: 81457, + name: 'Blast', + rpcUrls: { + primary: + 'https://lingering-indulgent-replica.blast-mainnet.quiknode.pro/6667a8f4be701cb6549b415d567bc706fb2f13a8/', + fallback: 'https://blast.blockpi.network/v1/rpc/publicChain', + }, + explorerUrl: 'https://blastscan.io', + explorerName: 'Blastscan', + blockTime: 3000, + imgUrl: + 'https://45a97b3d.sanguine-fe.pages.dev/_next/static/media/blast.e39807f8.svg', + networkName: 'Blast', + networkUrl: 'https://rpc.blast.io', + nativeCurrency: { + name: 'Ethereum', + symbol: 'ETH', + decimals: 18, + }, +} + +export const SCROLL: Chain = { + id: 534352, + name: 'Scroll', + rpcUrls: { + primary: 'https://rpc.scroll.io/', + fallback: 'https://scroll.blockpi.network/v1/rpc/public', + }, + explorerUrl: 'https://scrollscan.com', + explorerName: 'Scrollscan', + blockTime: 3000, + imgUrl: + 'https://fe-adds-scroll.sanguine-fe.pages.dev/_next/static/media/scroll.a805c122.svg', + networkName: 'Scroll', + networkUrl: 'https://rpc.scroll.io', + nativeCurrency: { + name: 'Ethereum', + symbol: 'ETH', + decimals: 18, + }, +} + +export const LINEA: Chain = { + id: 59144, + name: 'Linea', + rpcUrls: { + primary: 'https://rpc.linea.build', + fallback: 'https://linea.blockpi.network/v1/rpc/public', + }, + explorerUrl: 'https://lineascan.build', + explorerName: 'LineaScan', + blockTime: 3000, + imgUrl: + 'https://master.sanguine-fe.pages.dev/_next/static/media/linea.e476f2ad.svg', + networkName: 'Linea', + networkUrl: 'https://rpc.linea.build', + nativeCurrency: { + name: 'Ethereum', + symbol: 'ETH', + decimals: 18, + }, +} + +export const CHAINS = { + ETHEREUM, + ARBITRUM, + BNBCHAIN, + AVALANCHE, + CANTO, + OPTIMISM, + POLYGON, + DFK, + KLAYTN, + FANTOM, + CRONOS, + BOBA, + METIS, + AURORA, + HARMONY, + MOONBEAM, + MOONRIVER, + DOGE, + BASE, + BLAST, + SCROLL, + LINEA, +} + +export const CHAINS_ARRAY = Object.values(CHAINS) + +export const CHAINS_BY_ID = _.keyBy(CHAINS, 'id') diff --git a/packages/rest-api/src/types/index.d.ts b/packages/rest-api/src/types/index.d.ts new file mode 100644 index 0000000000..b33182b1fa --- /dev/null +++ b/packages/rest-api/src/types/index.d.ts @@ -0,0 +1,98 @@ +export interface BridgeableToken { + addresses: {} + decimals: {} + symbol: string + name: string + swapableType: string + color: string + priorityRank: number + routeSymbol: string + imgUrl: string +} + +export type CustomRpcs = { + [chainId: number]: string +} + +export interface Chain { + id: number + name: string + rpcUrls: { + primary: string + fallback: string + } + explorerUrl: string + explorerName: string + blockTime: number + imgUrl: string + networkName: string + networkUrl: string + nativeCurrency: { + name: string + symbol: string + decimals: number + } +} + +export declare const AGEUR: BridgeableToken +export declare const AVAX: BridgeableToken +export declare const BTCB: BridgeableToken +export declare const BUSD: BridgeableToken +export declare const CRVUSD: BridgeableToken +export declare const DAI: BridgeableToken +export declare const DAIe: BridgeableToken +export declare const DOG: BridgeableToken +export declare const ETH: BridgeableToken +export declare const FRAX: BridgeableToken +export declare const FTM: BridgeableToken +export declare const GMX: BridgeableToken +export declare const GOHM: BridgeableToken +export declare const H2O: BridgeableToken +export declare const HIGH: BridgeableToken +export declare const JEWEL: BridgeableToken +export declare const JUMP: BridgeableToken +export declare const KLAY: BridgeableToken +export declare const L2DAO: BridgeableToken +export declare const LINK: BridgeableToken +export declare const LUSD: BridgeableToken +export declare const MATIC: BridgeableToken +export declare const METISUSDC: BridgeableToken +export declare const MOVR: BridgeableToken +export declare const NETH: BridgeableToken +export declare const NEWO: BridgeableToken +export declare const NFD: BridgeableToken +export declare const NOTE: BridgeableToken +export declare const NUSD: BridgeableToken +export declare const ONEDAI: BridgeableToken +export declare const ONEETH: BridgeableToken +export declare const ONEUSDC: BridgeableToken +export declare const ONEUSDT: BridgeableToken +export declare const PEPE: BridgeableToken +export declare const PLS: BridgeableToken +export declare const SDT: BridgeableToken +export declare const SFI: BridgeableToken +export declare const SOLAR: BridgeableToken +export declare const SUSD: BridgeableToken +export declare const SYN: BridgeableToken +export declare const SYNFRAX: BridgeableToken +export declare const SYNJEWEL: BridgeableToken +export declare const SPECTRAL: BridgeableToken +export declare const UNIDX: BridgeableToken +export declare const USDB: BridgeableToken +export declare const USDBC: BridgeableToken +export declare const USDC: BridgeableToken +export declare const USDCe: BridgeableToken +export declare const USDT: BridgeableToken +export declare const USDTe: BridgeableToken +export declare const VSTA: BridgeableToken +export declare const WAVAX: BridgeableToken +export declare const WBTC: BridgeableToken +export declare const WETH: BridgeableToken +export declare const WETHE: BridgeableToken +export declare const WFTM: BridgeableToken +export declare const WJEWEL: BridgeableToken +export declare const WKLAY: BridgeableToken +export declare const WMATIC: BridgeableToken +export declare const WMOVR: BridgeableToken +export declare const WSOHM: BridgeableToken +export declare const XJEWEL: BridgeableToken diff --git a/packages/rest-api/tsconfig.json b/packages/rest-api/tsconfig.json index e8e32f24b7..7fcbd74c35 100644 --- a/packages/rest-api/tsconfig.json +++ b/packages/rest-api/tsconfig.json @@ -1,7 +1,7 @@ { - // see https://www.typescriptlang.org/tsconfig to better understand tsconfigs "include": [ - "./src/**/*" + "./src/**/*", + "./src/config/**/*" ], "compilerOptions": { "target": "esnext", @@ -11,31 +11,21 @@ "dom.iterable", "esnext" ], - "outDir": "./dist", + "outDir": "./dist", // Transpiled files will be output to the 'dist' folder "importHelpers": true, - // output .d.ts declaration files for consumers "declaration": true, - // output .js.map sourcemap files for consumers "sourceMap": true, - // match output dir to input dir. e.g. dist/index instead of dist/src/index "rootDir": "./src", - // stricter type-checking for stronger correctness. Recommended by TS "strict": false, // linter checks for common issues "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, - // noUnused* overlap with @typescript-eslint/no-unused-vars, can disable if duplicative "noUnusedLocals": true, "noUnusedParameters": true, - // use Node's module resolution algorithm, instead of the legacy TS one "moduleResolution": "node", - // transpile JSX to React.createElement "jsx": "react", - // interop between ESM and CJS modules. Recommended by TS "esModuleInterop": true, - // significant perf increase by skipping checking .d.ts files, particularly those in node_modules. Recommended by TS "skipLibCheck": true, - // error out if import and file system have a casing mismatch. Recommended by TS "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, "allowSyntheticDefaultImports": true, diff --git a/yarn.lock b/yarn.lock index 75a961b751..982bae061d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9899,6 +9899,11 @@ dependencies: "@types/node" "*" +"@types/cookiejar@^2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@types/cookiejar/-/cookiejar-2.1.5.tgz#14a3e83fa641beb169a2dd8422d91c3c345a9a78" + integrity sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q== + "@types/d3-array@3.0.3": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/d3-array/-/d3-array-3.0.3.tgz#87d990bf504d14ad6b16766979d04e943c046dac" @@ -10308,6 +10313,11 @@ resolved "https://registry.yarnpkg.com/@types/mdx/-/mdx-2.0.13.tgz#68f6877043d377092890ff5b298152b0a21671bd" integrity sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw== +"@types/methods@^1.1.4": + version "1.1.4" + resolved "https://registry.yarnpkg.com/@types/methods/-/methods-1.1.4.tgz#d3b7ac30ac47c91054ea951ce9eed07b1051e547" + integrity sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ== + "@types/mime@^1": version "1.3.5" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690" @@ -10634,6 +10644,24 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== +"@types/superagent@^8.1.0": + version "8.1.9" + resolved "https://registry.yarnpkg.com/@types/superagent/-/superagent-8.1.9.tgz#28bfe4658e469838ed0bf66d898354bcab21f49f" + integrity sha512-pTVjI73witn+9ILmoJdajHGW2jkSaOzhiFYF1Rd3EQ94kymLqB9PjD9ISg7WaALC7+dCHT0FGe9T2LktLq/3GQ== + dependencies: + "@types/cookiejar" "^2.1.5" + "@types/methods" "^1.1.4" + "@types/node" "*" + form-data "^4.0.0" + +"@types/supertest@^6.0.2": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@types/supertest/-/supertest-6.0.2.tgz#2af1c466456aaf82c7c6106c6b5cbd73a5e86588" + integrity sha512-137ypx2lk/wTQbW6An6safu9hXmajAifU/s7szAHLN/FeIm5w7yR0Wkl9fdJMRSHwOn4HLAI0DaB2TOORuhPDg== + dependencies: + "@types/methods" "^1.1.4" + "@types/superagent" "^8.1.0" + "@types/tapable@^1", "@types/tapable@^1.0.5": version "1.0.12" resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.12.tgz#bc2cab12e87978eee89fb21576b670350d6d86ab"