diff --git a/packages/widget/examples/with-next/package.json b/packages/widget/examples/with-next/package.json index 6b2549f3ae..afb3da5197 100644 --- a/packages/widget/examples/with-next/package.json +++ b/packages/widget/examples/with-next/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@synapsecns/widget": "^0.1.0", + "@synapsecns/widget": "^0.6.3", "ethers": "^6.9.1", "next": "14.0.4", "react": "^18", diff --git a/packages/widget/examples/with-react/package.json b/packages/widget/examples/with-react/package.json index 94d240de00..f7fcd2a988 100644 --- a/packages/widget/examples/with-react/package.json +++ b/packages/widget/examples/with-react/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { - "@synapsecns/widget": "0.1.0", + "@synapsecns/widget": "0.6.3", "@types/node": "^16.18.65", "@types/react": "^18.2.39", "@types/react-dom": "^18.2.17", diff --git a/packages/widget/src/constants/bridgeMap.ts b/packages/widget/src/constants/bridgeMap.ts index 8d6d3be23b..e2ad92cb29 100644 --- a/packages/widget/src/constants/bridgeMap.ts +++ b/packages/widget/src/constants/bridgeMap.ts @@ -1793,6 +1793,36 @@ 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, @@ -1811,7 +1841,7 @@ export const BRIDGE_MAP = { '0x4300000000000000000000000000000000000004': { decimals: 18, symbol: 'WETH', - origin: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], destination: ['nETH'], swappable: [ '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', @@ -1828,8 +1858,8 @@ export const BRIDGE_MAP = { '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': { decimals: 18, symbol: 'ETH', - origin: ['nETH'], - destination: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], + destination: ['nETH', 'RFQ.ETH'], swappable: [ '0x4300000000000000000000000000000000000004', '0xce971282fAAc9faBcF121944956da7142cccC855', @@ -1838,7 +1868,7 @@ export const BRIDGE_MAP = { '0xce971282fAAc9faBcF121944956da7142cccC855': { decimals: 18, symbol: 'nETH', - origin: ['nETH'], + origin: ['RFQ.ETH', 'nETH'], destination: ['nETH'], swappable: [ '0x4300000000000000000000000000000000000004', @@ -1848,18 +1878,32 @@ export const BRIDGE_MAP = { }, '534352': { '0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4': { + decimals: 6, + symbol: 'USDC', origin: ['RFQ.USDC'], destination: ['RFQ.USDC'], + swappable: ['0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df'], + }, + '0x5300000000000000000000000000000000000004': { + decimals: 18, + symbol: 'WETH', + origin: ['RFQ.ETH'], + destination: [], swappable: [], - symbol: 'USDC', - decimals: 6, }, '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': { + decimals: 18, + symbol: 'ETH', origin: ['RFQ.ETH'], destination: ['RFQ.ETH'], swappable: [], - symbol: 'ETH', - decimals: 18, + }, + '0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df': { + decimals: 6, + symbol: 'USDT', + origin: ['RFQ.USDC'], + destination: [], + swappable: ['0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4'], }, }, '1313161554': { diff --git a/packages/widget/src/constants/bridgeable.ts b/packages/widget/src/constants/bridgeable.ts index e582823678..8a20a58e7e 100644 --- a/packages/widget/src/constants/bridgeable.ts +++ b/packages/widget/src/constants/bridgeable.ts @@ -436,6 +436,7 @@ export const USDC: BridgeableToken = { [CHAINS.BASE.id]: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', [CHAINS.POLYGON.id]: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', [CHAINS.SCROLL.id]: '0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4', + [CHAINS.LINEA.id]: '0x176211869cA2b568f2A7D4EE941E073a821EE1ff', }, decimals: { [CHAINS.ETHEREUM.id]: 6, @@ -452,6 +453,7 @@ export const USDC: BridgeableToken = { [CHAINS.BASE.id]: 6, [CHAINS.POLYGON.id]: 6, [CHAINS.SCROLL.id]: 6, + [CHAINS.LINEA.id]: 6, }, symbol: 'USDC', name: 'USD Coin', @@ -802,6 +804,7 @@ export const ETH: BridgeableToken = { [CHAINS.DFK.id]: '0xfBDF0E31808d0aa7b9509AA6aBC9754E48C58852', [CHAINS.BLAST.id]: ZeroAddress, [CHAINS.SCROLL.id]: ZeroAddress, + [CHAINS.LINEA.id]: ZeroAddress, }, decimals: { [CHAINS.ETHEREUM.id]: 18, @@ -813,6 +816,7 @@ export const ETH: BridgeableToken = { [CHAINS.DFK.id]: 18, [CHAINS.BLAST.id]: 18, [CHAINS.SCROLL.id]: 18, + [CHAINS.LINEA.id]: 18, }, symbol: 'ETH', name: 'Ethereum', diff --git a/packages/widget/src/constants/chains.ts b/packages/widget/src/constants/chains.ts index 70a31d0d9e..0d2a0cc1a6 100644 --- a/packages/widget/src/constants/chains.ts +++ b/packages/widget/src/constants/chains.ts @@ -443,6 +443,27 @@ export const SCROLL: Chain = { }, } +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, @@ -465,6 +486,7 @@ export const CHAINS = { BASE, BLAST, SCROLL, + LINEA, } export const CHAINS_ARRAY = Object.values(CHAINS)