-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
893c532
commit 8620f3c
Showing
16 changed files
with
400 additions
and
122 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
196 changes: 146 additions & 50 deletions
196
packages/synapse-constants/constants/tokens/bridgeMap.ts
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// URL for RFQ quotes | ||
const RFQ_URL = 'https://rfq-api.omnirpc.io/quotes' | ||
|
||
const fetchRfqData = async () => { | ||
try { | ||
const response = await fetch(RFQ_URL) | ||
if (!response.ok) { | ||
throw new Error(`HTTP error! status: ${response.status}`) | ||
} | ||
return await response.json() | ||
} catch (error) { | ||
console.error('Failed to fetch RFQ data:', error) | ||
return [] | ||
} | ||
} | ||
|
||
module.exports = { fetchRfqData } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const fs = require('fs') | ||
const { execSync } = require('child_process') | ||
|
||
// Writes map export to a TypeScript file, then runs prettier on the file | ||
const prettyPrintTS = (map, mapName, fn) => { | ||
console.log(`Writing ${mapName} to ${fn}`) | ||
const json = JSON.stringify(map) | ||
fs.writeFileSync(fn, `export const ${mapName} = ${json}`) | ||
// Run prettier on the file using terminal command: | ||
execSync(`npx prettier --write ${fn}`) | ||
} | ||
|
||
module.exports = { prettyPrintTS } |