Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Staging: SIN #3479

Draft
wants to merge 19 commits into
base: feat/sdk-syn-intents
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f5a7232
feat: disable RFQ V1 in staging
ChiTimesChi Dec 30, 2024
f909ead
feat: prioritize SIN quotes in staging
ChiTimesChi Dec 30, 2024
c96ebdb
Merge branch 'feat/sdk-syn-intents' into staging/syn-intents
ChiTimesChi Dec 30, 2024
6ba77dd
feat: use pino for logging in staging
ChiTimesChi Dec 30, 2024
664be47
feat: expand bridge map connections in staging
ChiTimesChi Dec 30, 2024
b62687c
feat: increase API timeout to 5s in staging
ChiTimesChi Dec 30, 2024
6068604
Merge branch 'feat/sdk-syn-intents' into staging/syn-intents
ChiTimesChi Jan 2, 2025
bc852b0
Merge branch 'feat/sdk-syn-intents' into staging/syn-intents
ChiTimesChi Jan 2, 2025
c66e5b4
Merge branch 'feat/sdk-syn-intents' into staging/syn-intents
ChiTimesChi Jan 2, 2025
ad45c77
fix: apply default slippage
ChiTimesChi Jan 2, 2025
6b24beb
Merge branch 'feat/sdk-syn-intents' into staging/syn-intents
ChiTimesChi Jan 10, 2025
9082946
Merge branch 'feat/sdk-syn-intents' into staging/syn-intents
ChiTimesChi Jan 10, 2025
9a08234
Merge branch 'feat/sdk-syn-intents' into staging/syn-intents
ChiTimesChi Jan 13, 2025
76223f5
Merge branch 'feat/sdk-syn-intents' into staging/syn-intents
ChiTimesChi Jan 15, 2025
009764a
Merge branch 'feat/sdk-syn-intents' into staging/syn-intents
ChiTimesChi Jan 16, 2025
7025e26
Merge branch 'feat/sdk-syn-intents' into staging/syn-intents
ChiTimesChi Jan 23, 2025
b9422d0
Merge branch 'feat/sdk-syn-intents' into staging/syn-intents
ChiTimesChi Jan 24, 2025
fd29290
Merge branch 'feat/sdk-syn-intents' into staging/syn-intents
ChiTimesChi Feb 4, 2025
f93be9e
Merge branch 'feat/sdk-syn-intents' into staging/syn-intents
ChiTimesChi Feb 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"**/@openzeppelin/*",
"**/@synapsecns/solidity-devops",
"**/ds-test",
"**/forge-std"
"**/forge-std",
"**/pino"
]
},
"repository": {
Expand Down
48 changes: 24 additions & 24 deletions packages/rest-api/src/constants/bridgeMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ export const BRIDGE_MAP = {
'0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85': {
decimals: 6,
symbol: 'USDC',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC', 'RFQ.USDC'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'RFQ.USDC', 'Intents'],
swappable: [
'0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00',
'0x7F5c764cBc14f9669B88837ca1490cCa17c31607',
Expand Down Expand Up @@ -365,8 +365,8 @@ export const BRIDGE_MAP = {
'0x7F5c764cBc14f9669B88837ca1490cCa17c31607': {
decimals: 6,
symbol: 'USDC.e',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC', 'nUSD'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'nUSD', 'Intents'],
swappable: [
'0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85',
'0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00',
Expand All @@ -388,8 +388,8 @@ export const BRIDGE_MAP = {
'0x8c6f28f2F1A3C87F0f938b96d27520d9751ec8d9': {
decimals: 18,
symbol: 'sUSD',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'Intents'],
swappable: [
'0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85',
'0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00',
Expand All @@ -401,8 +401,8 @@ export const BRIDGE_MAP = {
'0x94b008aA00579c1307B0EF2c499aD98a8ce58e58': {
decimals: 6,
symbol: 'USDT',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'Intents'],
swappable: [
'0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85',
'0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00',
Expand All @@ -421,8 +421,8 @@ export const BRIDGE_MAP = {
'0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1': {
decimals: 18,
symbol: 'DAI',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'Intents'],
swappable: [
'0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85',
'0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00',
Expand All @@ -441,8 +441,8 @@ export const BRIDGE_MAP = {
'0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': {
decimals: 18,
symbol: 'ETH',
origin: ['RFQ.ETH', 'nETH'],
destination: ['nETH', 'RFQ.ETH'],
origin: ['RFQ.ETH', 'nETH', 'Intents'],
destination: ['nETH', 'RFQ.ETH', 'Intents'],
swappable: [
'0x121ab82b49B2BC4c7901CA46B8277962b4350204',
'0x809DC529f07651bD43A172e8dB6f4a7a0d771036',
Expand Down Expand Up @@ -1527,8 +1527,8 @@ export const BRIDGE_MAP = {
'0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1': {
decimals: 18,
symbol: 'DAI',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'Intents'],
swappable: [
'0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F',
'0x2913E812Cf0dcCA30FB28E6Cac3d2DCFF4497688',
Expand All @@ -1540,8 +1540,8 @@ export const BRIDGE_MAP = {
'0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': {
decimals: 18,
symbol: 'ETH',
origin: ['RFQ.ETH', 'nETH'],
destination: ['nETH', 'RFQ.ETH'],
origin: ['RFQ.ETH', 'nETH', 'Intents'],
destination: ['nETH', 'RFQ.ETH', 'Intents'],
swappable: [
'0x3ea9B0ab55F34Fb188824Ee288CeaEfC63cf908e',
'0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
Expand All @@ -1550,8 +1550,8 @@ export const BRIDGE_MAP = {
'0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8': {
decimals: 6,
symbol: 'USDC.e',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC', 'nUSD'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'nUSD', 'Intents'],
swappable: [
'0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F',
'0x2913E812Cf0dcCA30FB28E6Cac3d2DCFF4497688',
Expand All @@ -1563,8 +1563,8 @@ export const BRIDGE_MAP = {
'0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9': {
decimals: 6,
symbol: 'USDT',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC', 'nUSD'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'nUSD', 'Intents'],
swappable: [
'0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F',
'0x2913E812Cf0dcCA30FB28E6Cac3d2DCFF4497688',
Expand All @@ -1583,8 +1583,8 @@ export const BRIDGE_MAP = {
'0xaf88d065e77c8cC2239327C5EDb3A432268e5831': {
decimals: 6,
symbol: 'USDC',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC', 'RFQ.USDC'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'RFQ.USDC', 'Intents'],
swappable: [
'0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F',
'0x2913E812Cf0dcCA30FB28E6Cac3d2DCFF4497688',
Expand All @@ -1596,8 +1596,8 @@ export const BRIDGE_MAP = {
'0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a': {
decimals: 18,
symbol: 'GMX',
origin: ['GMX'],
destination: ['GMX'],
origin: ['GMX', 'Intents'],
destination: ['GMX', 'Intents'],
swappable: [],
},
},
Expand Down
1 change: 1 addition & 0 deletions packages/sdk-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"jest": "^29.7.0",
"jsbi": "^4.3.0",
"node-cache": "^5.1.2",
"pino": "^9.6.0",
"tiny-invariant": "^1.2.0",
"toformat": "^2.0.0",
"ts-xor": "^1.1.0",
Expand Down
18 changes: 9 additions & 9 deletions packages/sdk-router/src/constants/chainIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ export const CCTP_SUPPORTED_CHAIN_IDS: number[] = [
*
*/
export const RFQ_SUPPORTED_CHAIN_IDS: number[] = [
SupportedChainId.ETH,
SupportedChainId.OPTIMISM,
SupportedChainId.BSC,
SupportedChainId.WORLDCHAIN,
SupportedChainId.BASE,
SupportedChainId.ARBITRUM,
SupportedChainId.LINEA,
SupportedChainId.BLAST,
SupportedChainId.SCROLL,
// SupportedChainId.ETH,
// SupportedChainId.OPTIMISM,
// SupportedChainId.BSC,
// SupportedChainId.WORLDCHAIN,
// SupportedChainId.BASE,
// SupportedChainId.ARBITRUM,
// SupportedChainId.LINEA,
// SupportedChainId.BLAST,
// SupportedChainId.SCROLL,
].filter((chainId) => !PAUSED_CHAIN_IDS.includes(chainId))

/**
Expand Down
4 changes: 3 additions & 1 deletion packages/sdk-router/src/utils/logger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export const logger = console
import pino from 'pino'

export const logger = pino()

// Decorator to log the execution time of a function
export const logExecutionTime =
Expand Down
48 changes: 24 additions & 24 deletions packages/synapse-interface/constants/bridgeMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ export const BRIDGE_MAP = {
'0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85': {
decimals: 6,
symbol: 'USDC',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC', 'RFQ.USDC'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'RFQ.USDC', 'Intents'],
swappable: [
'0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00',
'0x7F5c764cBc14f9669B88837ca1490cCa17c31607',
Expand Down Expand Up @@ -365,8 +365,8 @@ export const BRIDGE_MAP = {
'0x7F5c764cBc14f9669B88837ca1490cCa17c31607': {
decimals: 6,
symbol: 'USDC.e',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC', 'nUSD'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'nUSD', 'Intents'],
swappable: [
'0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85',
'0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00',
Expand All @@ -388,8 +388,8 @@ export const BRIDGE_MAP = {
'0x8c6f28f2F1A3C87F0f938b96d27520d9751ec8d9': {
decimals: 18,
symbol: 'sUSD',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'Intents'],
swappable: [
'0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85',
'0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00',
Expand All @@ -401,8 +401,8 @@ export const BRIDGE_MAP = {
'0x94b008aA00579c1307B0EF2c499aD98a8ce58e58': {
decimals: 6,
symbol: 'USDT',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'Intents'],
swappable: [
'0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85',
'0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00',
Expand All @@ -421,8 +421,8 @@ export const BRIDGE_MAP = {
'0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1': {
decimals: 18,
symbol: 'DAI',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'Intents'],
swappable: [
'0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85',
'0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00',
Expand All @@ -441,8 +441,8 @@ export const BRIDGE_MAP = {
'0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': {
decimals: 18,
symbol: 'ETH',
origin: ['RFQ.ETH', 'nETH'],
destination: ['nETH', 'RFQ.ETH'],
origin: ['RFQ.ETH', 'nETH', 'Intents'],
destination: ['nETH', 'RFQ.ETH', 'Intents'],
swappable: [
'0x121ab82b49B2BC4c7901CA46B8277962b4350204',
'0x809DC529f07651bD43A172e8dB6f4a7a0d771036',
Expand Down Expand Up @@ -1527,8 +1527,8 @@ export const BRIDGE_MAP = {
'0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1': {
decimals: 18,
symbol: 'DAI',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'Intents'],
swappable: [
'0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F',
'0x2913E812Cf0dcCA30FB28E6Cac3d2DCFF4497688',
Expand All @@ -1540,8 +1540,8 @@ export const BRIDGE_MAP = {
'0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': {
decimals: 18,
symbol: 'ETH',
origin: ['RFQ.ETH', 'nETH'],
destination: ['nETH', 'RFQ.ETH'],
origin: ['RFQ.ETH', 'nETH', 'Intents'],
destination: ['nETH', 'RFQ.ETH', 'Intents'],
swappable: [
'0x3ea9B0ab55F34Fb188824Ee288CeaEfC63cf908e',
'0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
Expand All @@ -1550,8 +1550,8 @@ export const BRIDGE_MAP = {
'0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8': {
decimals: 6,
symbol: 'USDC.e',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC', 'nUSD'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'nUSD', 'Intents'],
swappable: [
'0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F',
'0x2913E812Cf0dcCA30FB28E6Cac3d2DCFF4497688',
Expand All @@ -1563,8 +1563,8 @@ export const BRIDGE_MAP = {
'0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9': {
decimals: 6,
symbol: 'USDT',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC', 'nUSD'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'nUSD', 'Intents'],
swappable: [
'0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F',
'0x2913E812Cf0dcCA30FB28E6Cac3d2DCFF4497688',
Expand All @@ -1583,8 +1583,8 @@ export const BRIDGE_MAP = {
'0xaf88d065e77c8cC2239327C5EDb3A432268e5831': {
decimals: 6,
symbol: 'USDC',
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD'],
destination: ['CCTP.USDC', 'RFQ.USDC'],
origin: ['CCTP.USDC', 'RFQ.USDC', 'nUSD', 'Intents'],
destination: ['CCTP.USDC', 'RFQ.USDC', 'Intents'],
swappable: [
'0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F',
'0x2913E812Cf0dcCA30FB28E6Cac3d2DCFF4497688',
Expand All @@ -1596,8 +1596,8 @@ export const BRIDGE_MAP = {
'0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a': {
decimals: 18,
symbol: 'GMX',
origin: ['GMX'],
destination: ['GMX'],
origin: ['GMX', 'Intents'],
destination: ['GMX', 'Intents'],
swappable: [],
},
},
Expand Down
4 changes: 2 additions & 2 deletions packages/synapse-interface/slices/bridgeQuote/thunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ export const fetchBridgeQuote = createAsyncThunk(
}

const rfqQuote = activeQuotes.find(
(q) => q.bridgeModuleName === 'SynapseRFQ'
(q) => q.bridgeModuleName === 'SynapseIntents'
)

const nonRfqQuote = activeQuotes.find(
(quote) => quote.bridgeModuleName !== 'SynapseRFQ'
(quote) => quote.bridgeModuleName !== 'SynapseIntents'
)

let quote
Expand Down
Loading
Loading