From 244e77f3e06661bbb5e366fd15a6dac5ceb43e4e Mon Sep 17 00:00:00 2001 From: Lawson Kight Date: Tue, 17 Sep 2024 12:37:51 -0700 Subject: [PATCH 01/20] update for eslint --- docs/bridge/docusaurus.config.ts | 94 +++++++++++++++++--------------- 1 file changed, 51 insertions(+), 43 deletions(-) diff --git a/docs/bridge/docusaurus.config.ts b/docs/bridge/docusaurus.config.ts index d7ed74fca7..5595187dad 100644 --- a/docs/bridge/docusaurus.config.ts +++ b/docs/bridge/docusaurus.config.ts @@ -1,8 +1,10 @@ -import {themes as prismThemes} from 'prism-react-renderer'; -import type {Config} from '@docusaurus/types'; -import type * as Preset from '@docusaurus/preset-classic'; -import * as path from "path"; -import {codecovWebpackPlugin} from "@codecov/webpack-plugin"; +/* eslint-disable prefer-arrow/prefer-arrow-functions */ +import * as path from 'path' + +import { themes as prismThemes } from 'prism-react-renderer' +import type { Config } from '@docusaurus/types' +import type * as Preset from '@docusaurus/preset-classic' +import { codecovWebpackPlugin } from '@codecov/webpack-plugin' const config: Config = { title: 'Synapse Bridge Docs', @@ -42,7 +44,7 @@ const config: Config = { editUrl: 'https://github.com/synapsecns/sanguine/tree/master/docs/bridge/', // docLayoutComponent: "@theme/DocPage", - docItemComponent: "@theme/ApiItem" // derived from docusaurus-theme-openapi-docs + docItemComponent: '@theme/ApiItem', // derived from docusaurus-theme-openapi-docs }, theme: { customCss: './src/css/custom.css', @@ -120,54 +122,60 @@ const config: Config = { darkTheme: prismThemes.dracula, }, } satisfies Preset.ThemeConfig, - themes: ["docusaurus-theme-openapi-docs"], // export theme components + themes: ['docusaurus-theme-openapi-docs'], // export theme components plugins: [ [ 'docusaurus-plugin-openapi-docs', { - id: "api", // plugin id - docsPluginId: "classic", // id of plugin-content-docs or preset for rendering docs + id: 'api', // plugin id + docsPluginId: 'classic', // id of plugin-content-docs or preset for rendering docs config: { - rfqapi: { // the referenced when running CLI commands - specPath: "../../services/rfq/api/docs/swagger.yaml", // path to OpenAPI spec, URLs supported - baseUrl: "https://rfq-api.omnirpc.io/", - outputDir: "docs/rfq/API", // output directory for generated files - sidebarOptions: { // optional, instructs plugin to generate sidebar.js - groupPathsBy: "tag", // group sidebar items by operation "tag" + rfqapi: { + // the referenced when running CLI commands + specPath: '../../services/rfq/api/docs/swagger.yaml', // path to OpenAPI spec, URLs supported + baseUrl: 'https://rfq-api.omnirpc.io/', + outputDir: 'docs/rfq/API', // output directory for generated files + sidebarOptions: { + // optional, instructs plugin to generate sidebar.js + groupPathsBy: 'tag', // group sidebar items by operation "tag" }, }, - } + }, }, ], // please see: https://github.com/facebook/docusaurus/issues/8091#issuecomment-1269112001 for an explanation. - () => ({ - name: 'resolve-react', - configureWebpack() { - return { - resolve: { - alias: { - // assuming root node_modules is up from "./packages/ - react: path.resolve('../../node_modules/react'), + function () { + return { + name: 'resolve-react', + configureWebpack() { + return { + resolve: { + alias: { + // assuming root node_modules is up from "./packages/ + react: path.resolve('../../node_modules/react'), + }, }, - }, - }; - }, - }), - () => ({ - name: 'bundle-analyzer', - configureWebpack() { - return { - plugins: [ - codecovWebpackPlugin({ - enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined, - bundleName: "docs-bridge", - uploadToken: process.env.CODECOV_TOKEN, - }), - ] - }; + } + }, } - }), + }, + function () { + return { + name: 'bundle-analyzer', + configureWebpack() { + return { + plugins: [ + codecovWebpackPlugin({ + enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined, + bundleName: 'docs-bridge', + uploadToken: process.env.CODECOV_TOKEN, + }), + ], + } + }, + } + }, ], -}; +} -export default config; +export default config From eebb57c10386235ab8c82a78b34cda7196be23e9 Mon Sep 17 00:00:00 2001 From: Lawson Kight Date: Tue, 17 Sep 2024 16:07:23 -0700 Subject: [PATCH 02/20] eslint fix --- docs/bridge/docs/rfq/API/sidebar.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/bridge/docs/rfq/API/sidebar.ts b/docs/bridge/docs/rfq/API/sidebar.ts index 3c0e12fc63..51cdd61453 100644 --- a/docs/bridge/docs/rfq/API/sidebar.ts +++ b/docs/bridge/docs/rfq/API/sidebar.ts @@ -1,26 +1,26 @@ -import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"; +import type { SidebarsConfig } from '@docusaurus/plugin-content-docs' const sidebar: SidebarsConfig = { apisidebar: [ { - type: "category", - label: "quotes", + type: 'category', + label: 'quotes', items: [ { - type: "doc", - id: "rfq/API/get-quotes", - label: "Get quotes", - className: "api-method get", + type: 'doc', + id: 'rfq/API/get-quotes', + label: 'Get quotes', + className: 'api-method get', }, { - type: "doc", - id: "rfq/API/upsert-quote", - label: "Upsert quote", - className: "api-method put", + type: 'doc', + id: 'rfq/API/upsert-quote', + label: 'Upsert quote', + className: 'api-method put', }, ], }, ], -}; +} -export default sidebar.apisidebar; +export default sidebar.apisidebar From 1218b201cb46fcbb30e71a483517addfc08f008e Mon Sep 17 00:00:00 2001 From: Lawson Kight Date: Tue, 17 Sep 2024 16:36:03 -0700 Subject: [PATCH 03/20] top-level content --- docs/bridge/docs/CCTP/_category_.json | 7 +-- .../docs/CCTP/{Overview.md => index.md} | 2 + docs/bridge/docs/Routers/index.md | 7 +++ docs/bridge/docs/Welcome/_category_.json | 4 ++ docs/bridge/docs/Welcome/index.md | 49 ++++++++++++++++ docs/bridge/src/css/custom.css | 56 ++++++++++++++----- docs/bridge/src/pages/index.tsx | 37 ++++++------ 7 files changed, 122 insertions(+), 40 deletions(-) rename docs/bridge/docs/CCTP/{Overview.md => index.md} (99%) create mode 100644 docs/bridge/docs/Routers/index.md create mode 100644 docs/bridge/docs/Welcome/_category_.json create mode 100644 docs/bridge/docs/Welcome/index.md diff --git a/docs/bridge/docs/CCTP/_category_.json b/docs/bridge/docs/CCTP/_category_.json index eda3422018..6aa756eaf5 100644 --- a/docs/bridge/docs/CCTP/_category_.json +++ b/docs/bridge/docs/CCTP/_category_.json @@ -1,8 +1,3 @@ { - "label": "CCTP", - "position": 3, - "link": { - "type": "doc", - "id": "CCTP/Overview" - } + "label": "CCTP" } diff --git a/docs/bridge/docs/CCTP/Overview.md b/docs/bridge/docs/CCTP/index.md similarity index 99% rename from docs/bridge/docs/CCTP/Overview.md rename to docs/bridge/docs/CCTP/index.md index cc6f4b1fc8..f8637073aa 100644 --- a/docs/bridge/docs/CCTP/Overview.md +++ b/docs/bridge/docs/CCTP/index.md @@ -1,3 +1,5 @@ +# Overview + Synapse CCTP is a custom module built on top of Circle's [Cross-Chain Transfer Protocol](https://www.circle.com/en/cross-chain-transfer-protocol) that allows for bridge requests to natively mint & burn USDC on [supported chains](https://developers.circle.com/stablecoins/docs/cctp-getting-started#supported-blockchains). Synapse's CCTP implementation consists of two main components: diff --git a/docs/bridge/docs/Routers/index.md b/docs/bridge/docs/Routers/index.md new file mode 100644 index 0000000000..b76f0103ae --- /dev/null +++ b/docs/bridge/docs/Routers/index.md @@ -0,0 +1,7 @@ +# Routers + +:::tip[TODO] +* Move router pages into this folder +* Move 'Observability' under 'Services' +* Rename 'Services' to ' 'Essential Tools' +::: \ No newline at end of file diff --git a/docs/bridge/docs/Welcome/_category_.json b/docs/bridge/docs/Welcome/_category_.json new file mode 100644 index 0000000000..594fa4b787 --- /dev/null +++ b/docs/bridge/docs/Welcome/_category_.json @@ -0,0 +1,4 @@ +{ + "position": 0, + "label": "Overview" +} diff --git a/docs/bridge/docs/Welcome/index.md b/docs/bridge/docs/Welcome/index.md new file mode 100644 index 0000000000..23499ddbab --- /dev/null +++ b/docs/bridge/docs/Welcome/index.md @@ -0,0 +1,49 @@ +# Use Synapse +Synapse is an Interchain Programming Interface. Developers read and write interchain data with Synapse, which has settled $50B in transactions between 2M+ users, and generated $30M+ in fees [[source](https://explorer.synapseprotol.com)]. + +## Why Synapse? +_Description of top benefits Synapse brings to developers and users._ + + +## Get started +* **[Send and receive interchain data](#)** +* **[On-chain swaps](#)** +* **[Interchain swaps](#)** +* **[Upgrade to Synapse](#)** + +:::tip[Supported Chains] +Synapse supports every chain and token that can be found on the [Synapse Bridge](https://synapseprotocol.com). +::: + +## Interchain Bridge +Embed the Synapse Widget or build your own custom instance. +* **[Widget](#)** – Embed a customized Synapse Bridge in your application. +* **[Client SDK](#)** – Call Synapse Router functions from your client application. +* **[Server SDK](#)** – Call Synapse Router functions from your remote application. + +## Routers +Synapse offers several of routers for different transaction types. +* **[Synapse Router](#)** – Executable quotes for arbitrary blockchain transactions. +* **[CCTP](#)** – Native router for USDC transactions. +* **[RFQ](#)** – Fast router that allows on-chain agents to bid on interchain delivery. + +## Essential Tools +Bolt-on services for reliability and ease-of-use: +* **[Scribe](/docs/Services/Scribe)** – Index logs, receipts and transactions across multiple chains +* **[Omnirpc](/docs/Services/Omnirpc)** – Interchain RPC load balancer and verifier +* **[Key management](/docs/Services/Signer)** – Support for the AWS Key Management System (KMS) +* **[Ethergo](/docs/Services/Submitter)** – Gas management service to ensure transaction confirmation +* **[Telemetry](/docs/Observability)** – Open telemetry system for Synapse SDK + + +## Community & Support +Connect with other developers and the Synapse team +* **[Discord](https://discord.gg/synapseprotocol)** – Bridge, Swap, and Stake via Synapse's cross-chain pools. +* **[Twitter](https://twitter.com/SynapseProtocol)** – Bridge, Swap, and Stake via Synapse's cross-chain pools. +* **[Telegram](https://t.me/synapseprotocol)** – Public explorer for Synapse Bridge transactions. +* **[Forum](https://forum.synapseprotocol.com/)** – Public explorer for Synapse Bridge transactions. + +## Additional Links +Synapse transactions can be observed confirmed via the following methods: +* **[Synapse Bridge](https://synapseprotocol.com)** – Bridge, Swap, and Stake via Synapse's cross-chain pools. +* **[Synapse Explorer](https://explorer.synapseprotocol.com)** – Public explorer for Synapse Bridge transactions. \ No newline at end of file diff --git a/docs/bridge/src/css/custom.css b/docs/bridge/src/css/custom.css index 2bc6a4cfde..d3d57030f0 100644 --- a/docs/bridge/src/css/custom.css +++ b/docs/bridge/src/css/custom.css @@ -6,25 +6,53 @@ /* You can override the default Infima variables here. */ :root { - --ifm-color-primary: #2e8555; - --ifm-color-primary-dark: #29784c; - --ifm-color-primary-darker: #277148; - --ifm-color-primary-darkest: #205d3b; - --ifm-color-primary-light: #33925d; - --ifm-color-primary-lighter: #359962; - --ifm-color-primary-lightest: #3cad6e; + --ifm-color-primary: hsl(285deg 100% 35%); + --ifm-color-primary-dark: hsl(285deg 100% 32%); + --ifm-color-primary-darker: hsl(285deg 100% 30%); + --ifm-color-primary-darkest: hsl(285deg 100% 25%); + --ifm-color-primary-light: hsl(285deg 100% 39%); + --ifm-color-primary-lighter: hsl(285deg 100% 40%); + --ifm-color-primary-lightest: hsl(285deg 100% 46%); --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); + + --synapse-green: hsl(135deg 50% 90%); + --synapse-green-secondary: hsl(135deg 50% 80%); + + letter-spacing: .0125em; + line-height: 1.7; } /* For readability concerns, you should choose a lighter palette in dark mode. */ [data-theme='dark'] { - --ifm-color-primary: #25c2a0; - --ifm-color-primary-dark: #21af90; - --ifm-color-primary-darker: #1fa588; - --ifm-color-primary-darkest: #1a8870; - --ifm-color-primary-light: #29d5b0; - --ifm-color-primary-lighter: #32d8b4; - --ifm-color-primary-lightest: #4fddbf; + --ifm-color-primary: hsl(285deg 100% 80%); + --ifm-color-primary-dark: hsl(285deg 100% 41%); + --ifm-color-primary-darker: hsl(285deg 100% 38%); + --ifm-color-primary-darkest: hsl(285deg 100% 32%); + --ifm-color-primary-light: hsl(285deg 100% 50%); + --ifm-color-primary-lighter: hsl(285deg 100% 52%); + --ifm-color-primary-lightest: hsl(285deg 100% 59%); --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); + + --synapse-green: hsl(165deg 50% 10%); + --synapse-green-secondary: hsl(165deg 50% 20%); + + background: hsl(240deg 25% 7.5%); } + +h1 { font-weight: 400 } +h2 { + font-weight: 600; + border-top: 1px solid hsl(285deg 20% 50% / 20%); + margin-top: 1.5em; + padding-top: 1em; +} +h3 { font-size: 1.2rem } + +ol, ul { margin-bottom: 1.5em } +ol a, ul a { font-weight: 500 } + +.theme-admonition-tip { + background: var(--synapse-green); + border-color: var(--synapse-green-secondary); +} \ No newline at end of file diff --git a/docs/bridge/src/pages/index.tsx b/docs/bridge/src/pages/index.tsx index 2323a056b4..3a7007e0ba 100644 --- a/docs/bridge/src/pages/index.tsx +++ b/docs/bridge/src/pages/index.tsx @@ -1,15 +1,15 @@ import clsx from 'clsx'; import Link from '@docusaurus/Link'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Layout from '@theme/Layout'; -import HomepageFeatures from '@site/src/components/HomepageFeatures'; -import Heading from '@theme/Heading'; -import { Redirect } from 'react-router-dom'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext' +import Layout from '@theme/Layout' +// import HomepageFeatures from '@site/src/components/HomepageFeatures' +import Heading from '@theme/Heading' +import { Redirect } from 'react-router-dom' -import styles from './index.module.css'; +import styles from './index.module.css' -function HomepageHeader() { - const {siteConfig} = useDocusaurusContext(); +const HomepageHeader = () => { + const { siteConfig } = useDocusaurusContext() return (
@@ -18,30 +18,27 @@ function HomepageHeader() {

{siteConfig.tagline}

- + Docusaurus Tutorial - 5min ⏱️
- ); + ) } -export default function Home(): JSX.Element { - const {siteConfig} = useDocusaurusContext(); +export default () => { + const { siteConfig } = useDocusaurusContext() // TODO: a homepage // for now, just disable entirely: https://v1.docusaurus.io/docs/en/site-creation#docs-landing-page return ( - + description="Description will go into a meta tag in " + > + {/**/} -
- {/**/} -
+
{/**/}
- ); + ) } From 32a85acc6da5927147873e7f3c83bf21c70247bc Mon Sep 17 00:00:00 2001 From: Lawson Kight Date: Tue, 17 Sep 2024 16:47:11 -0700 Subject: [PATCH 04/20] bugfix: remove descriptions from Community links --- docs/bridge/docs/Welcome/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/bridge/docs/Welcome/index.md b/docs/bridge/docs/Welcome/index.md index 23499ddbab..0c57e8ee19 100644 --- a/docs/bridge/docs/Welcome/index.md +++ b/docs/bridge/docs/Welcome/index.md @@ -38,10 +38,10 @@ Bolt-on services for reliability and ease-of-use: ## Community & Support Connect with other developers and the Synapse team -* **[Discord](https://discord.gg/synapseprotocol)** – Bridge, Swap, and Stake via Synapse's cross-chain pools. -* **[Twitter](https://twitter.com/SynapseProtocol)** – Bridge, Swap, and Stake via Synapse's cross-chain pools. -* **[Telegram](https://t.me/synapseprotocol)** – Public explorer for Synapse Bridge transactions. -* **[Forum](https://forum.synapseprotocol.com/)** – Public explorer for Synapse Bridge transactions. +* **[Discord](https://discord.gg/synapseprotocol)** +* **[Twitter](https://twitter.com/SynapseProtocol)** +* **[Telegram](https://t.me/synapseprotocol)** +* **[Forum](https://forum.synapseprotocol.com/)** ## Additional Links Synapse transactions can be observed confirmed via the following methods: From 8a6eb0d636a647edd42e82b1ff2253803c801bfc Mon Sep 17 00:00:00 2001 From: Lawson Kight Date: Wed, 18 Sep 2024 13:43:21 -0700 Subject: [PATCH 05/20] eslint fix --- docs/bridge/sidebars.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/bridge/sidebars.ts b/docs/bridge/sidebars.ts index acc7685acd..cf181d50cd 100644 --- a/docs/bridge/sidebars.ts +++ b/docs/bridge/sidebars.ts @@ -1,18 +1,18 @@ -import type {SidebarsConfig} from '@docusaurus/plugin-content-docs'; +import type { SidebarsConfig } from '@docusaurus/plugin-content-docs' /** * Creating a sidebar enables you to: - create an ordered group of docs - render a sidebar for each doc of that group - provide next/previous navigation - + The sidebars can be generated from the filesystem, or explicitly defined here. - + Create as many sidebars as you want. */ const sidebars: SidebarsConfig = { // By default, Docusaurus generates a sidebar from the docs folder structure - tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], + tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }], // But you can create a sidebar manually /* @@ -26,6 +26,6 @@ const sidebars: SidebarsConfig = { }, ], */ -}; +} -export default sidebars; +export default sidebars From 866ebaa87e9694f4a38dde72ebd0c06d9c3bc4b2 Mon Sep 17 00:00:00 2001 From: Lawson Kight Date: Wed, 18 Sep 2024 14:20:54 -0700 Subject: [PATCH 06/20] folder organization --- docs/bridge/docs/Bridge/Client SDK.md | 3 ++ docs/bridge/docs/Bridge/Server SDK.md | 3 ++ docs/bridge/docs/Bridge/Widget.md | 3 ++ docs/bridge/docs/Bridge/index.md | 7 +++ docs/bridge/docs/Guides/Interchain.md | 3 ++ docs/bridge/docs/Guides/Messages.md | 3 ++ docs/bridge/docs/Guides/On-chain.md | 3 ++ docs/bridge/docs/Guides/Upgrade.md | 3 ++ docs/bridge/docs/Guides/_category_.json | 3 ++ docs/bridge/docs/Guides/index.md | 6 +++ .../docs/{ => Routers}/CCTP/Contracts.md | 0 .../bridge/docs/{ => Routers}/CCTP/Relayer.md | 2 +- .../docs/{ => Routers}/CCTP/_category_.json | 0 docs/bridge/docs/{ => Routers}/CCTP/index.md | 0 .../docs/{rfq => Routers/RFQ}/API/API.md | 2 +- .../RFQ}/API/get-contract-addresses.api.mdx | 0 .../RFQ}/API/get-quotes.api.mdx | 0 .../RFQ}/API/relay-ack.api.mdx | 0 .../RFQ}/API/upsert-quote.api.mdx | 0 .../RFQ}/API/upsert-quotes.api.mdx | 0 .../docs/{rfq => Routers/RFQ}/Contracts.md | 0 .../{rfq => Routers/RFQ}/Relayer/Relayer.md | 2 +- .../RFQ}/Relayer/dashboard.png | Bin .../docs/{rfq/RFQ.md => Routers/RFQ/index.md} | 0 docs/bridge/docs/Routers/index.md | 12 ++--- .../docs/{ => Services}/Observability.md | 0 docs/bridge/docs/Services/Scribe.md | 2 +- docs/bridge/docs/Services/index.md | 9 ++++ docs/bridge/docs/Support/index.md | 8 +++ .../docs/Welcome/{index.md => Welcome.md} | 19 ++++++- docs/bridge/docs/rfq/API/sidebar.ts | 26 --------- docs/bridge/docs/rfq/_category_.json | 8 --- docs/bridge/src/css/custom.css | 15 +++++- docs/bridge/src/pages/index.tsx | 50 +++++++++--------- 34 files changed, 120 insertions(+), 72 deletions(-) create mode 100644 docs/bridge/docs/Bridge/Client SDK.md create mode 100644 docs/bridge/docs/Bridge/Server SDK.md create mode 100644 docs/bridge/docs/Bridge/Widget.md create mode 100644 docs/bridge/docs/Bridge/index.md create mode 100644 docs/bridge/docs/Guides/Interchain.md create mode 100644 docs/bridge/docs/Guides/Messages.md create mode 100644 docs/bridge/docs/Guides/On-chain.md create mode 100644 docs/bridge/docs/Guides/Upgrade.md create mode 100644 docs/bridge/docs/Guides/_category_.json create mode 100644 docs/bridge/docs/Guides/index.md rename docs/bridge/docs/{ => Routers}/CCTP/Contracts.md (100%) rename docs/bridge/docs/{ => Routers}/CCTP/Relayer.md (97%) rename docs/bridge/docs/{ => Routers}/CCTP/_category_.json (100%) rename docs/bridge/docs/{ => Routers}/CCTP/index.md (100%) rename docs/bridge/docs/{rfq => Routers/RFQ}/API/API.md (99%) rename docs/bridge/docs/{rfq => Routers/RFQ}/API/get-contract-addresses.api.mdx (100%) rename docs/bridge/docs/{rfq => Routers/RFQ}/API/get-quotes.api.mdx (100%) rename docs/bridge/docs/{rfq => Routers/RFQ}/API/relay-ack.api.mdx (100%) rename docs/bridge/docs/{rfq => Routers/RFQ}/API/upsert-quote.api.mdx (100%) rename docs/bridge/docs/{rfq => Routers/RFQ}/API/upsert-quotes.api.mdx (100%) rename docs/bridge/docs/{rfq => Routers/RFQ}/Contracts.md (100%) rename docs/bridge/docs/{rfq => Routers/RFQ}/Relayer/Relayer.md (98%) rename docs/bridge/docs/{rfq => Routers/RFQ}/Relayer/dashboard.png (100%) rename docs/bridge/docs/{rfq/RFQ.md => Routers/RFQ/index.md} (100%) rename docs/bridge/docs/{ => Services}/Observability.md (100%) create mode 100644 docs/bridge/docs/Services/index.md create mode 100644 docs/bridge/docs/Support/index.md rename docs/bridge/docs/Welcome/{index.md => Welcome.md} (93%) delete mode 100644 docs/bridge/docs/rfq/API/sidebar.ts delete mode 100644 docs/bridge/docs/rfq/_category_.json diff --git a/docs/bridge/docs/Bridge/Client SDK.md b/docs/bridge/docs/Bridge/Client SDK.md new file mode 100644 index 0000000000..b0c65194b3 --- /dev/null +++ b/docs/bridge/docs/Bridge/Client SDK.md @@ -0,0 +1,3 @@ +# Client SDK + +Lorem ipsum diff --git a/docs/bridge/docs/Bridge/Server SDK.md b/docs/bridge/docs/Bridge/Server SDK.md new file mode 100644 index 0000000000..23960ef447 --- /dev/null +++ b/docs/bridge/docs/Bridge/Server SDK.md @@ -0,0 +1,3 @@ +# Server SDK + +Lorem ipsum diff --git a/docs/bridge/docs/Bridge/Widget.md b/docs/bridge/docs/Bridge/Widget.md new file mode 100644 index 0000000000..fb208b00ba --- /dev/null +++ b/docs/bridge/docs/Bridge/Widget.md @@ -0,0 +1,3 @@ +# Bridge Widget + +Lorem ipsum diff --git a/docs/bridge/docs/Bridge/index.md b/docs/bridge/docs/Bridge/index.md new file mode 100644 index 0000000000..6fba0a645b --- /dev/null +++ b/docs/bridge/docs/Bridge/index.md @@ -0,0 +1,7 @@ +# Synapse Bridge + +Embed the Synapse Widget or build your own custom instance. + +* **[Widget](#)** – Embed a customized Synapse Bridge in your application. +* **[Client SDK](#)** – Call Synapse Router functions from your client application. +* **[Server SDK](#)** – Call Synapse Router functions from your remote application. diff --git a/docs/bridge/docs/Guides/Interchain.md b/docs/bridge/docs/Guides/Interchain.md new file mode 100644 index 0000000000..786b1abfef --- /dev/null +++ b/docs/bridge/docs/Guides/Interchain.md @@ -0,0 +1,3 @@ +# Interchain Swaps + +Lorem ipsum diff --git a/docs/bridge/docs/Guides/Messages.md b/docs/bridge/docs/Guides/Messages.md new file mode 100644 index 0000000000..5dbe5e5845 --- /dev/null +++ b/docs/bridge/docs/Guides/Messages.md @@ -0,0 +1,3 @@ +# Send & Receive Interchain Data + +Lorem ipsum diff --git a/docs/bridge/docs/Guides/On-chain.md b/docs/bridge/docs/Guides/On-chain.md new file mode 100644 index 0000000000..76f7eb709f --- /dev/null +++ b/docs/bridge/docs/Guides/On-chain.md @@ -0,0 +1,3 @@ +# On-chain Swaps + +Lorem ipsum diff --git a/docs/bridge/docs/Guides/Upgrade.md b/docs/bridge/docs/Guides/Upgrade.md new file mode 100644 index 0000000000..c4d2192827 --- /dev/null +++ b/docs/bridge/docs/Guides/Upgrade.md @@ -0,0 +1,3 @@ +# Upgrade to Synapse + +Lorem ipsum diff --git a/docs/bridge/docs/Guides/_category_.json b/docs/bridge/docs/Guides/_category_.json new file mode 100644 index 0000000000..818afe3014 --- /dev/null +++ b/docs/bridge/docs/Guides/_category_.json @@ -0,0 +1,3 @@ +{ + "position": 1 +} diff --git a/docs/bridge/docs/Guides/index.md b/docs/bridge/docs/Guides/index.md new file mode 100644 index 0000000000..841e78a888 --- /dev/null +++ b/docs/bridge/docs/Guides/index.md @@ -0,0 +1,6 @@ +# Get Started + +* **[Send and receive interchain data](#)** +* **[On-chain swaps](#)** +* **[Interchain swaps](#)** +* **[Upgrade to Synapse](#)** diff --git a/docs/bridge/docs/CCTP/Contracts.md b/docs/bridge/docs/Routers/CCTP/Contracts.md similarity index 100% rename from docs/bridge/docs/CCTP/Contracts.md rename to docs/bridge/docs/Routers/CCTP/Contracts.md diff --git a/docs/bridge/docs/CCTP/Relayer.md b/docs/bridge/docs/Routers/CCTP/Relayer.md similarity index 97% rename from docs/bridge/docs/CCTP/Relayer.md rename to docs/bridge/docs/Routers/CCTP/Relayer.md index 35a309cbfc..529bde2b2b 100644 --- a/docs/bridge/docs/CCTP/Relayer.md +++ b/docs/bridge/docs/Routers/CCTP/Relayer.md @@ -104,4 +104,4 @@ The CCTP Relayer is configured with a yaml file. The following is an example con ### Observability -The CCTP relayer implements open telemetry for both tracing and metrics. Please see the [Observability](../Observability) page for more info. We'd also highly recommend setting up the [submitter dashboard](../Services/Submitter) as well. +The CCTP relayer implements open telemetry for both tracing and metrics. Please see the [Observability](docs/Services/Observability) page for more info. We'd also highly recommend setting up the [submitter dashboard](../Services/Submitter) as well. diff --git a/docs/bridge/docs/CCTP/_category_.json b/docs/bridge/docs/Routers/CCTP/_category_.json similarity index 100% rename from docs/bridge/docs/CCTP/_category_.json rename to docs/bridge/docs/Routers/CCTP/_category_.json diff --git a/docs/bridge/docs/CCTP/index.md b/docs/bridge/docs/Routers/CCTP/index.md similarity index 100% rename from docs/bridge/docs/CCTP/index.md rename to docs/bridge/docs/Routers/CCTP/index.md diff --git a/docs/bridge/docs/rfq/API/API.md b/docs/bridge/docs/Routers/RFQ/API/API.md similarity index 99% rename from docs/bridge/docs/rfq/API/API.md rename to docs/bridge/docs/Routers/RFQ/API/API.md index dfbc77ffe3..b3c2f940f7 100644 --- a/docs/bridge/docs/rfq/API/API.md +++ b/docs/bridge/docs/Routers/RFQ/API/API.md @@ -72,7 +72,7 @@ Yaml settings: - `database` - The database settings for the API backend. A database is required to store quotes and other information. Using SQLite with a dsn set to a `/tmp/` directory is recommended for development. - `type` - the database driver to use, can be `mysql` or `sqlite`. - `dsn` - the dsn of your database. If using sqlite, this can be a path, if using mysql please see [here](https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration.html) for more information. - - `omnirpc_url` - The omnirpc url to use for querying chain data (no trailing slash). For more information on omnirpc, see [here](../../Services/Omnirpc.md). + - `omnirpc_url` - The omnirpc url to use for querying chain data (no trailing slash). For more information on omnirpc, see [here](docs/Services/Omnirpc.md). - `bridges` - A key value map of chain id to FastBridge contract address. The API will only allow quotes to be posted on these chains. - `port` - The port to run the http server on. diff --git a/docs/bridge/docs/rfq/API/get-contract-addresses.api.mdx b/docs/bridge/docs/Routers/RFQ/API/get-contract-addresses.api.mdx similarity index 100% rename from docs/bridge/docs/rfq/API/get-contract-addresses.api.mdx rename to docs/bridge/docs/Routers/RFQ/API/get-contract-addresses.api.mdx diff --git a/docs/bridge/docs/rfq/API/get-quotes.api.mdx b/docs/bridge/docs/Routers/RFQ/API/get-quotes.api.mdx similarity index 100% rename from docs/bridge/docs/rfq/API/get-quotes.api.mdx rename to docs/bridge/docs/Routers/RFQ/API/get-quotes.api.mdx diff --git a/docs/bridge/docs/rfq/API/relay-ack.api.mdx b/docs/bridge/docs/Routers/RFQ/API/relay-ack.api.mdx similarity index 100% rename from docs/bridge/docs/rfq/API/relay-ack.api.mdx rename to docs/bridge/docs/Routers/RFQ/API/relay-ack.api.mdx diff --git a/docs/bridge/docs/rfq/API/upsert-quote.api.mdx b/docs/bridge/docs/Routers/RFQ/API/upsert-quote.api.mdx similarity index 100% rename from docs/bridge/docs/rfq/API/upsert-quote.api.mdx rename to docs/bridge/docs/Routers/RFQ/API/upsert-quote.api.mdx diff --git a/docs/bridge/docs/rfq/API/upsert-quotes.api.mdx b/docs/bridge/docs/Routers/RFQ/API/upsert-quotes.api.mdx similarity index 100% rename from docs/bridge/docs/rfq/API/upsert-quotes.api.mdx rename to docs/bridge/docs/Routers/RFQ/API/upsert-quotes.api.mdx diff --git a/docs/bridge/docs/rfq/Contracts.md b/docs/bridge/docs/Routers/RFQ/Contracts.md similarity index 100% rename from docs/bridge/docs/rfq/Contracts.md rename to docs/bridge/docs/Routers/RFQ/Contracts.md diff --git a/docs/bridge/docs/rfq/Relayer/Relayer.md b/docs/bridge/docs/Routers/RFQ/Relayer/Relayer.md similarity index 98% rename from docs/bridge/docs/rfq/Relayer/Relayer.md rename to docs/bridge/docs/Routers/RFQ/Relayer/Relayer.md index b47e066ea6..88a6c72665 100644 --- a/docs/bridge/docs/rfq/Relayer/Relayer.md +++ b/docs/bridge/docs/Routers/RFQ/Relayer/Relayer.md @@ -271,7 +271,7 @@ The relayer is configured with a yaml file. The following is an example configur ### Observability -The RFQ relayer implements open telemetry for both tracing and metrics. Please see the [Observability](../../Observability) page for more info. There is also a custom [grafana dashboard](https://github.com/synapsecns/sanguine/tree/master/services/rfq/relayer/dashboards/dashboard.json) available for the relayer. We'd also highly recommend setting up the [submitter dashboard](../../Services/Submitter) as well. +The RFQ relayer implements open telemetry for both tracing and metrics. Please see the [Observability](docs/Services/Observability) page for more info. There is also a custom [grafana dashboard](https://github.com/synapsecns/sanguine/tree/master/services/rfq/relayer/dashboards/dashboard.json) available for the relayer. We'd also highly recommend setting up the [submitter dashboard](../../Services/Submitter) as well. ![Relayer Grafana Dashboard](dashboard.png) diff --git a/docs/bridge/docs/rfq/Relayer/dashboard.png b/docs/bridge/docs/Routers/RFQ/Relayer/dashboard.png similarity index 100% rename from docs/bridge/docs/rfq/Relayer/dashboard.png rename to docs/bridge/docs/Routers/RFQ/Relayer/dashboard.png diff --git a/docs/bridge/docs/rfq/RFQ.md b/docs/bridge/docs/Routers/RFQ/index.md similarity index 100% rename from docs/bridge/docs/rfq/RFQ.md rename to docs/bridge/docs/Routers/RFQ/index.md diff --git a/docs/bridge/docs/Routers/index.md b/docs/bridge/docs/Routers/index.md index b76f0103ae..5f43a11abf 100644 --- a/docs/bridge/docs/Routers/index.md +++ b/docs/bridge/docs/Routers/index.md @@ -1,7 +1,7 @@ -# Routers +# Synapse Routers -:::tip[TODO] -* Move router pages into this folder -* Move 'Observability' under 'Services' -* Rename 'Services' to ' 'Essential Tools' -::: \ No newline at end of file +Synapse offers several of routers for different transaction types. + +* **[Synapse Router](#)** – Executable quotes for arbitrary blockchain transactions. +* **[CCTP](CCTP)** – Native router for USDC transactions. +* **[RFQ](RFQ)** – Fast router that allows on-chain agents to bid on interchain delivery. diff --git a/docs/bridge/docs/Observability.md b/docs/bridge/docs/Services/Observability.md similarity index 100% rename from docs/bridge/docs/Observability.md rename to docs/bridge/docs/Services/Observability.md diff --git a/docs/bridge/docs/Services/Scribe.md b/docs/bridge/docs/Services/Scribe.md index 0b58a1edab..589f1cc59b 100644 --- a/docs/bridge/docs/Services/Scribe.md +++ b/docs/bridge/docs/Services/Scribe.md @@ -117,4 +117,4 @@ For a full list of available queries, refer to the GraphQL schema. ## Observability -Scribe implements open telemetry for both tracing and metrics. Please see the [Observability](../Observability) page for more info. +Scribe implements open telemetry for both tracing and metrics. Please see the [Observability](./Observability) page for more info. diff --git a/docs/bridge/docs/Services/index.md b/docs/bridge/docs/Services/index.md new file mode 100644 index 0000000000..42087cd3f5 --- /dev/null +++ b/docs/bridge/docs/Services/index.md @@ -0,0 +1,9 @@ +# Essential Tools + +Synapse offers a number of bolt-on services for reliability and ease-of-use. + +* **[Scribe](/docs/Services/Scribe)** – Index logs, receipts and transactions across multiple chains +* **[Omnirpc](/docs/Services/Omnirpc)** – Interchain RPC load balancer and verifier +* **[Key management](/docs/Services/Signer)** – Support for the AWS Key Management System (KMS) +* **[Ethergo](/docs/Services/Submitter)** – Gas management service to ensure transaction confirmation +* **[Telemetry](/docs/Services/Observability)** – Open telemetry system for Synapse SDK diff --git a/docs/bridge/docs/Support/index.md b/docs/bridge/docs/Support/index.md new file mode 100644 index 0000000000..83efd9734c --- /dev/null +++ b/docs/bridge/docs/Support/index.md @@ -0,0 +1,8 @@ +# Community & Support + +Connect with other developers and the Synapse team + +* **[Discord](https://discord.gg/synapseprotocol)** +* **[Twitter](https://twitter.com/SynapseProtocol)** +* **[Telegram](https://t.me/synapseprotocol)** +* **[Forum](https://forum.synapseprotocol.com/)** diff --git a/docs/bridge/docs/Welcome/index.md b/docs/bridge/docs/Welcome/Welcome.md similarity index 93% rename from docs/bridge/docs/Welcome/index.md rename to docs/bridge/docs/Welcome/Welcome.md index 0c57e8ee19..b54c238cd1 100644 --- a/docs/bridge/docs/Welcome/index.md +++ b/docs/bridge/docs/Welcome/Welcome.md @@ -1,49 +1,64 @@ # Use Synapse + Synapse is an Interchain Programming Interface. Developers read and write interchain data with Synapse, which has settled $50B in transactions between 2M+ users, and generated $30M+ in fees [[source](https://explorer.synapseprotol.com)]. ## Why Synapse? + _Description of top benefits Synapse brings to developers and users._ ## Get started + * **[Send and receive interchain data](#)** * **[On-chain swaps](#)** * **[Interchain swaps](#)** * **[Upgrade to Synapse](#)** :::tip[Supported Chains] + Synapse supports every chain and token that can be found on the [Synapse Bridge](https://synapseprotocol.com). + ::: ## Interchain Bridge + Embed the Synapse Widget or build your own custom instance. + * **[Widget](#)** – Embed a customized Synapse Bridge in your application. * **[Client SDK](#)** – Call Synapse Router functions from your client application. * **[Server SDK](#)** – Call Synapse Router functions from your remote application. ## Routers + Synapse offers several of routers for different transaction types. + * **[Synapse Router](#)** – Executable quotes for arbitrary blockchain transactions. * **[CCTP](#)** – Native router for USDC transactions. * **[RFQ](#)** – Fast router that allows on-chain agents to bid on interchain delivery. ## Essential Tools + Bolt-on services for reliability and ease-of-use: + * **[Scribe](/docs/Services/Scribe)** – Index logs, receipts and transactions across multiple chains * **[Omnirpc](/docs/Services/Omnirpc)** – Interchain RPC load balancer and verifier * **[Key management](/docs/Services/Signer)** – Support for the AWS Key Management System (KMS) * **[Ethergo](/docs/Services/Submitter)** – Gas management service to ensure transaction confirmation -* **[Telemetry](/docs/Observability)** – Open telemetry system for Synapse SDK +* **[Telemetry](/docs/Services/Observability)** – Open telemetry system for Synapse SDK ## Community & Support + Connect with other developers and the Synapse team + * **[Discord](https://discord.gg/synapseprotocol)** * **[Twitter](https://twitter.com/SynapseProtocol)** * **[Telegram](https://t.me/synapseprotocol)** * **[Forum](https://forum.synapseprotocol.com/)** ## Additional Links + Synapse transactions can be observed confirmed via the following methods: + * **[Synapse Bridge](https://synapseprotocol.com)** – Bridge, Swap, and Stake via Synapse's cross-chain pools. -* **[Synapse Explorer](https://explorer.synapseprotocol.com)** – Public explorer for Synapse Bridge transactions. \ No newline at end of file +* **[Synapse Explorer](https://explorer.synapseprotocol.com)** – Public explorer for Synapse Bridge transactions. diff --git a/docs/bridge/docs/rfq/API/sidebar.ts b/docs/bridge/docs/rfq/API/sidebar.ts deleted file mode 100644 index 51cdd61453..0000000000 --- a/docs/bridge/docs/rfq/API/sidebar.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { SidebarsConfig } from '@docusaurus/plugin-content-docs' - -const sidebar: SidebarsConfig = { - apisidebar: [ - { - type: 'category', - label: 'quotes', - items: [ - { - type: 'doc', - id: 'rfq/API/get-quotes', - label: 'Get quotes', - className: 'api-method get', - }, - { - type: 'doc', - id: 'rfq/API/upsert-quote', - label: 'Upsert quote', - className: 'api-method put', - }, - ], - }, - ], -} - -export default sidebar.apisidebar diff --git a/docs/bridge/docs/rfq/_category_.json b/docs/bridge/docs/rfq/_category_.json deleted file mode 100644 index 8097372c06..0000000000 --- a/docs/bridge/docs/rfq/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "RFQ", - "position": 3, - "link": { - "type": "doc", - "id": "rfq/RFQ" - } -} diff --git a/docs/bridge/src/css/custom.css b/docs/bridge/src/css/custom.css index d3d57030f0..0fe3c30a8e 100644 --- a/docs/bridge/src/css/custom.css +++ b/docs/bridge/src/css/custom.css @@ -16,6 +16,9 @@ --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); + --synapse-neutral: hsl(285deg 25% 90%); + --synapse-neutral-secondary: hsl(285deg 25% 80%); + --synapse-green: hsl(135deg 50% 90%); --synapse-green-secondary: hsl(135deg 50% 80%); @@ -34,8 +37,11 @@ --ifm-color-primary-lightest: hsl(285deg 100% 59%); --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); - --synapse-green: hsl(165deg 50% 10%); - --synapse-green-secondary: hsl(165deg 50% 20%); + --synapse-neutral: hsl(285deg 40% 12.5%); + --synapse-neutral-secondary: hsl(285deg 40% 25%); + + --synapse-green: hsl(165deg 40% 12.5%); + --synapse-green-secondary: hsl(165deg 40% 25%); background: hsl(240deg 25% 7.5%); } @@ -52,6 +58,11 @@ h3 { font-size: 1.2rem } ol, ul { margin-bottom: 1.5em } ol a, ul a { font-weight: 500 } +.theme-admonition-note { + background: var(--synapse-neutral); + border-color: var(--synapse-neutral-secondary); +} + .theme-admonition-tip { background: var(--synapse-green); border-color: var(--synapse-green-secondary); diff --git a/docs/bridge/src/pages/index.tsx b/docs/bridge/src/pages/index.tsx index 3a7007e0ba..590ca9b658 100644 --- a/docs/bridge/src/pages/index.tsx +++ b/docs/bridge/src/pages/index.tsx @@ -1,31 +1,31 @@ -import clsx from 'clsx'; -import Link from '@docusaurus/Link'; +// import clsx from 'clsx'; +// import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext' import Layout from '@theme/Layout' // import HomepageFeatures from '@site/src/components/HomepageFeatures' -import Heading from '@theme/Heading' +// import Heading from '@theme/Heading' import { Redirect } from 'react-router-dom' -import styles from './index.module.css' +// import styles from './index.module.css' -const HomepageHeader = () => { - const { siteConfig } = useDocusaurusContext() - return ( -
-
- - {siteConfig.title} - -

{siteConfig.tagline}

-
- - Docusaurus Tutorial - 5min ⏱️ - -
-
-
- ) -} +// const HomepageHeader = () => { +// const { siteConfig } = useDocusaurusContext() +// return ( +//
+//
+// +// {siteConfig.title} +// +//

{siteConfig.tagline}

+//
+// +// Docusaurus Tutorial - 5min ⏱️ +// +//
+//
+//
+// ) +// } export default () => { const { siteConfig } = useDocusaurusContext() @@ -37,8 +37,10 @@ export default () => { description="Description will go into a meta tag in " > - {/**/} -
{/**/}
+ {/* +
+ +
*/} ) } From b9f11b6f3bd7f8088674233a5f0173f70c706016 Mon Sep 17 00:00:00 2001 From: Lawson Kight Date: Wed, 18 Sep 2024 16:18:27 -0700 Subject: [PATCH 07/20] wip: sidebar organization --- docs/bridge/docs/About/_category_.json | 4 ++ .../{Welcome/Welcome.md => About/index.md} | 0 .../Bridge/{Client SDK.md => 01-Widget.md} | 2 +- .../docs/Bridge/{Server SDK.md => 02-SDK.md} | 2 +- docs/bridge/docs/Bridge/Widget.md | 3 -- docs/bridge/docs/Bridge/_category_.json | 4 ++ docs/bridge/docs/Bridge/index.md | 39 +++++++++++++++++-- docs/bridge/docs/Developers/01-Messages.md | 3 ++ docs/bridge/docs/Developers/02-On-chain.md | 3 ++ docs/bridge/docs/Developers/03-Interchain.md | 3 ++ .../docs/Developers/04-Advanced-Projects.md | 3 ++ docs/bridge/docs/Developers/05-Add-Synapse.md | 3 ++ .../docs/{Guides => Developers}/index.md | 2 +- docs/bridge/docs/Guides/Interchain.md | 3 -- docs/bridge/docs/Guides/Messages.md | 3 -- docs/bridge/docs/Guides/On-chain.md | 3 -- docs/bridge/docs/Guides/Upgrade.md | 3 -- docs/bridge/docs/Guides/_category_.json | 3 -- docs/bridge/docs/Routers/01-Router-v2.md | 3 ++ docs/bridge/docs/Welcome/_category_.json | 4 -- docs/bridge/src/pages/index.tsx | 2 +- 21 files changed, 65 insertions(+), 30 deletions(-) create mode 100644 docs/bridge/docs/About/_category_.json rename docs/bridge/docs/{Welcome/Welcome.md => About/index.md} (100%) rename docs/bridge/docs/Bridge/{Client SDK.md => 01-Widget.md} (50%) rename docs/bridge/docs/Bridge/{Server SDK.md => 02-SDK.md} (50%) delete mode 100644 docs/bridge/docs/Bridge/Widget.md create mode 100644 docs/bridge/docs/Bridge/_category_.json create mode 100644 docs/bridge/docs/Developers/01-Messages.md create mode 100644 docs/bridge/docs/Developers/02-On-chain.md create mode 100644 docs/bridge/docs/Developers/03-Interchain.md create mode 100644 docs/bridge/docs/Developers/04-Advanced-Projects.md create mode 100644 docs/bridge/docs/Developers/05-Add-Synapse.md rename docs/bridge/docs/{Guides => Developers}/index.md (87%) delete mode 100644 docs/bridge/docs/Guides/Interchain.md delete mode 100644 docs/bridge/docs/Guides/Messages.md delete mode 100644 docs/bridge/docs/Guides/On-chain.md delete mode 100644 docs/bridge/docs/Guides/Upgrade.md delete mode 100644 docs/bridge/docs/Guides/_category_.json create mode 100644 docs/bridge/docs/Routers/01-Router-v2.md delete mode 100644 docs/bridge/docs/Welcome/_category_.json diff --git a/docs/bridge/docs/About/_category_.json b/docs/bridge/docs/About/_category_.json new file mode 100644 index 0000000000..b915cf826a --- /dev/null +++ b/docs/bridge/docs/About/_category_.json @@ -0,0 +1,4 @@ +{ + "position": 0, + "label": "About" +} diff --git a/docs/bridge/docs/Welcome/Welcome.md b/docs/bridge/docs/About/index.md similarity index 100% rename from docs/bridge/docs/Welcome/Welcome.md rename to docs/bridge/docs/About/index.md diff --git a/docs/bridge/docs/Bridge/Client SDK.md b/docs/bridge/docs/Bridge/01-Widget.md similarity index 50% rename from docs/bridge/docs/Bridge/Client SDK.md rename to docs/bridge/docs/Bridge/01-Widget.md index b0c65194b3..8801be3bb4 100644 --- a/docs/bridge/docs/Bridge/Client SDK.md +++ b/docs/bridge/docs/Bridge/01-Widget.md @@ -1,3 +1,3 @@ -# Client SDK +# Widget Lorem ipsum diff --git a/docs/bridge/docs/Bridge/Server SDK.md b/docs/bridge/docs/Bridge/02-SDK.md similarity index 50% rename from docs/bridge/docs/Bridge/Server SDK.md rename to docs/bridge/docs/Bridge/02-SDK.md index 23960ef447..7770235c0d 100644 --- a/docs/bridge/docs/Bridge/Server SDK.md +++ b/docs/bridge/docs/Bridge/02-SDK.md @@ -1,3 +1,3 @@ -# Server SDK +# SDK Lorem ipsum diff --git a/docs/bridge/docs/Bridge/Widget.md b/docs/bridge/docs/Bridge/Widget.md deleted file mode 100644 index fb208b00ba..0000000000 --- a/docs/bridge/docs/Bridge/Widget.md +++ /dev/null @@ -1,3 +0,0 @@ -# Bridge Widget - -Lorem ipsum diff --git a/docs/bridge/docs/Bridge/_category_.json b/docs/bridge/docs/Bridge/_category_.json new file mode 100644 index 0000000000..5e41b399a1 --- /dev/null +++ b/docs/bridge/docs/Bridge/_category_.json @@ -0,0 +1,4 @@ +{ + "position": 1, + "label": "Bridge" +} diff --git a/docs/bridge/docs/Bridge/index.md b/docs/bridge/docs/Bridge/index.md index 6fba0a645b..9d8117fcc2 100644 --- a/docs/bridge/docs/Bridge/index.md +++ b/docs/bridge/docs/Bridge/index.md @@ -1,7 +1,38 @@ # Synapse Bridge -Embed the Synapse Widget or build your own custom instance. +The [Synapse Bridge](https://synapseprotocol.com) and [Solana Bridge](https://solana.synapseprotocol.com/) seamlessly swap on-chain assets between 20+ EVM and non-EVM blockchains in a safe and secure manner. -* **[Widget](#)** – Embed a customized Synapse Bridge in your application. -* **[Client SDK](#)** – Call Synapse Router functions from your client application. -* **[Server SDK](#)** – Call Synapse Router functions from your remote application. +## Developers + +Add the [Custom Widget](#) to your DeFi application, or build your own DeFi applications using the [Synapse SDK](#). + +## Bridge Functions + +The [Synapse Router](#) will return an appropriate bridge function based on the chains and tokens involved. + +* **Canonical** – Assets are wrapped and then bridged. +* **[Liquidity Pools](#)** – Assets are swapped via Synapse liquidity pools. +* **[CCTP](#)** – Native router for USDC + +## Pool Liquidity + +Synapse liquidity pools use the nexus USD (nUSD) and nexus ETH (nETH) interchain stablecoins. nUSD and nETH are fully backed by the nexus USD and nexus ETH liquidity pools on Ethereum. + +When a token is bridged using a Synapse Liquidity Pool, it is converted to a nexus token on the source chain, which is then bridged to the destination chain, before being converted back into a native token. + +## Using the Bridge + +To use the [Synapse Bridge](https://synapseprotocol.com): + +1. Connect your wallet +2. Select your origin and destination chains from the dropdown menus +3. Select your origin token from the portfolio view, or dropdown menu +4. Enter the amount you wish to send +5. If you wish to send assets to a different wallet address, enable `Show withdrawal address` from the Settings menu (optional). +5. Connect your wallet to the origin chain, if necessary +6. Click `Bridge` to send a quote to your wallet for confirmation +7. Sign and Confirm the Bridge action from your wallet + +## Bridge Contracts + +Synapse Bridge contracts are available [here](https://docs.synapseprotocol.com/synapse-bridge/contract-addresses). diff --git a/docs/bridge/docs/Developers/01-Messages.md b/docs/bridge/docs/Developers/01-Messages.md new file mode 100644 index 0000000000..5f7de2184a --- /dev/null +++ b/docs/bridge/docs/Developers/01-Messages.md @@ -0,0 +1,3 @@ +# Interchain Data + +Lorem ipsum diff --git a/docs/bridge/docs/Developers/02-On-chain.md b/docs/bridge/docs/Developers/02-On-chain.md new file mode 100644 index 0000000000..b62be720d5 --- /dev/null +++ b/docs/bridge/docs/Developers/02-On-chain.md @@ -0,0 +1,3 @@ +# On-chain asset swaps + +Lorem ipsum diff --git a/docs/bridge/docs/Developers/03-Interchain.md b/docs/bridge/docs/Developers/03-Interchain.md new file mode 100644 index 0000000000..9aa15e63ad --- /dev/null +++ b/docs/bridge/docs/Developers/03-Interchain.md @@ -0,0 +1,3 @@ +# Interchain asset swaps + +Lorem ipsum diff --git a/docs/bridge/docs/Developers/04-Advanced-Projects.md b/docs/bridge/docs/Developers/04-Advanced-Projects.md new file mode 100644 index 0000000000..f83fdb2b21 --- /dev/null +++ b/docs/bridge/docs/Developers/04-Advanced-Projects.md @@ -0,0 +1,3 @@ +# Advanced projects + +Lorem ipsum diff --git a/docs/bridge/docs/Developers/05-Add-Synapse.md b/docs/bridge/docs/Developers/05-Add-Synapse.md new file mode 100644 index 0000000000..f92c424127 --- /dev/null +++ b/docs/bridge/docs/Developers/05-Add-Synapse.md @@ -0,0 +1,3 @@ +# Add Synapse to my app + +Lorem ipsum diff --git a/docs/bridge/docs/Guides/index.md b/docs/bridge/docs/Developers/index.md similarity index 87% rename from docs/bridge/docs/Guides/index.md rename to docs/bridge/docs/Developers/index.md index 841e78a888..6e839cf1ee 100644 --- a/docs/bridge/docs/Guides/index.md +++ b/docs/bridge/docs/Developers/index.md @@ -1,4 +1,4 @@ -# Get Started +# Developer Guides * **[Send and receive interchain data](#)** * **[On-chain swaps](#)** diff --git a/docs/bridge/docs/Guides/Interchain.md b/docs/bridge/docs/Guides/Interchain.md deleted file mode 100644 index 786b1abfef..0000000000 --- a/docs/bridge/docs/Guides/Interchain.md +++ /dev/null @@ -1,3 +0,0 @@ -# Interchain Swaps - -Lorem ipsum diff --git a/docs/bridge/docs/Guides/Messages.md b/docs/bridge/docs/Guides/Messages.md deleted file mode 100644 index 5dbe5e5845..0000000000 --- a/docs/bridge/docs/Guides/Messages.md +++ /dev/null @@ -1,3 +0,0 @@ -# Send & Receive Interchain Data - -Lorem ipsum diff --git a/docs/bridge/docs/Guides/On-chain.md b/docs/bridge/docs/Guides/On-chain.md deleted file mode 100644 index 76f7eb709f..0000000000 --- a/docs/bridge/docs/Guides/On-chain.md +++ /dev/null @@ -1,3 +0,0 @@ -# On-chain Swaps - -Lorem ipsum diff --git a/docs/bridge/docs/Guides/Upgrade.md b/docs/bridge/docs/Guides/Upgrade.md deleted file mode 100644 index c4d2192827..0000000000 --- a/docs/bridge/docs/Guides/Upgrade.md +++ /dev/null @@ -1,3 +0,0 @@ -# Upgrade to Synapse - -Lorem ipsum diff --git a/docs/bridge/docs/Guides/_category_.json b/docs/bridge/docs/Guides/_category_.json deleted file mode 100644 index 818afe3014..0000000000 --- a/docs/bridge/docs/Guides/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "position": 1 -} diff --git a/docs/bridge/docs/Routers/01-Router-v2.md b/docs/bridge/docs/Routers/01-Router-v2.md new file mode 100644 index 0000000000..d21ae6ffb7 --- /dev/null +++ b/docs/bridge/docs/Routers/01-Router-v2.md @@ -0,0 +1,3 @@ +# Router v2 + +Lorem ipsum diff --git a/docs/bridge/docs/Welcome/_category_.json b/docs/bridge/docs/Welcome/_category_.json deleted file mode 100644 index 594fa4b787..0000000000 --- a/docs/bridge/docs/Welcome/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "position": 0, - "label": "Overview" -} diff --git a/docs/bridge/src/pages/index.tsx b/docs/bridge/src/pages/index.tsx index 590ca9b658..efa8b87d98 100644 --- a/docs/bridge/src/pages/index.tsx +++ b/docs/bridge/src/pages/index.tsx @@ -36,7 +36,7 @@ export default () => { title={`Hello from ${siteConfig.title}`} description="Description will go into a meta tag in " > - + {/*
From 6cb652a43a68a48a278ce844e644056ff3b284fb Mon Sep 17 00:00:00 2001 From: Lawson Kight Date: Fri, 20 Sep 2024 11:23:46 -0700 Subject: [PATCH 08/20] cctp router docs refactor --- docs/bridge/docs/About/_category_.json | 4 - docs/bridge/docs/Bridge/_category_.json | 4 - docs/bridge/docs/Bridge/index.md | 5 + .../docs/Contracts/01-Synapse-Token.mdx | 23 ++++ .../docs/Contracts/02-Synapse-Router.mdx | 26 ++++ .../docs/Contracts/03-Liquidity-Pools.md | 59 +++++++++ docs/bridge/docs/Contracts/04-CCTP.mdx | 15 +++ docs/bridge/docs/Contracts/05-RFQ.mdx | 14 ++ docs/bridge/docs/Contracts/08-Bridge-Zaps.md | 20 +++ docs/bridge/docs/Contracts/09-MiniChef.md | 19 +++ docs/bridge/docs/Contracts/index.md | 22 ++++ docs/bridge/docs/Developers/index.md | 6 +- docs/bridge/docs/Routers/01-Router-v2.md | 3 - docs/bridge/docs/Routers/CCTP/Contracts.md | 18 --- docs/bridge/docs/Routers/CCTP/Relayer.md | 107 --------------- docs/bridge/docs/Routers/CCTP/_category_.json | 3 - docs/bridge/docs/Routers/CCTP/index.md | 122 +++++++++++++++++- .../docs/Routers/Synapse-Router/index.md | 8 ++ docs/bridge/docs/Routers/index.md | 6 +- .../docs/Services/{Scribe.md => 01-Scribe.md} | 5 - .../Services/{Omnirpc.md => 02-Omnirpc.md} | 12 +- .../docs/Services/{Signer.md => 03-Signer.md} | 0 .../{Submitter.md => 04-Submitter.md} | 6 +- .../{Observability.md => 05-Observability.md} | 2 + docs/bridge/docs/Services/index.md | 6 +- .../docs/Support/Transaction-Support.md | 51 ++++++++ docs/bridge/docs/Support/index.md | 6 +- docs/bridge/docs/{About => }/index.md | 9 +- docs/bridge/src/css/custom.css | 30 ++++- docs/bridge/src/pages/index.tsx | 40 +++--- 30 files changed, 467 insertions(+), 184 deletions(-) delete mode 100644 docs/bridge/docs/About/_category_.json delete mode 100644 docs/bridge/docs/Bridge/_category_.json create mode 100644 docs/bridge/docs/Contracts/01-Synapse-Token.mdx create mode 100644 docs/bridge/docs/Contracts/02-Synapse-Router.mdx create mode 100644 docs/bridge/docs/Contracts/03-Liquidity-Pools.md create mode 100644 docs/bridge/docs/Contracts/04-CCTP.mdx create mode 100644 docs/bridge/docs/Contracts/05-RFQ.mdx create mode 100644 docs/bridge/docs/Contracts/08-Bridge-Zaps.md create mode 100644 docs/bridge/docs/Contracts/09-MiniChef.md create mode 100644 docs/bridge/docs/Contracts/index.md delete mode 100644 docs/bridge/docs/Routers/01-Router-v2.md delete mode 100644 docs/bridge/docs/Routers/CCTP/Contracts.md delete mode 100644 docs/bridge/docs/Routers/CCTP/Relayer.md delete mode 100644 docs/bridge/docs/Routers/CCTP/_category_.json create mode 100644 docs/bridge/docs/Routers/Synapse-Router/index.md rename docs/bridge/docs/Services/{Scribe.md => 01-Scribe.md} (98%) rename docs/bridge/docs/Services/{Omnirpc.md => 02-Omnirpc.md} (89%) rename docs/bridge/docs/Services/{Signer.md => 03-Signer.md} (100%) rename docs/bridge/docs/Services/{Submitter.md => 04-Submitter.md} (98%) rename docs/bridge/docs/Services/{Observability.md => 05-Observability.md} (99%) create mode 100644 docs/bridge/docs/Support/Transaction-Support.md rename docs/bridge/docs/{About => }/index.md (96%) diff --git a/docs/bridge/docs/About/_category_.json b/docs/bridge/docs/About/_category_.json deleted file mode 100644 index b915cf826a..0000000000 --- a/docs/bridge/docs/About/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "position": 0, - "label": "About" -} diff --git a/docs/bridge/docs/Bridge/_category_.json b/docs/bridge/docs/Bridge/_category_.json deleted file mode 100644 index 5e41b399a1..0000000000 --- a/docs/bridge/docs/Bridge/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "position": 1, - "label": "Bridge" -} diff --git a/docs/bridge/docs/Bridge/index.md b/docs/bridge/docs/Bridge/index.md index 9d8117fcc2..9aad9186d8 100644 --- a/docs/bridge/docs/Bridge/index.md +++ b/docs/bridge/docs/Bridge/index.md @@ -1,3 +1,8 @@ +--- +sidebar_position: 1 +title: Bridge +--- + # Synapse Bridge The [Synapse Bridge](https://synapseprotocol.com) and [Solana Bridge](https://solana.synapseprotocol.com/) seamlessly swap on-chain assets between 20+ EVM and non-EVM blockchains in a safe and secure manner. diff --git a/docs/bridge/docs/Contracts/01-Synapse-Token.mdx b/docs/bridge/docs/Contracts/01-Synapse-Token.mdx new file mode 100644 index 0000000000..102504b441 --- /dev/null +++ b/docs/bridge/docs/Contracts/01-Synapse-Token.mdx @@ -0,0 +1,23 @@ +# Synapse Token + +| Chain | Address | +|-----------|----------------------------------------------| +| Arbitrum | `0x080f6aed32fc474dd5717105dba5ea57268f46eb` [↗](https://arbiscan.io/token/0x080f6aed32fc474dd5717105dba5ea57268f46eb)| +| Aurora | `0xd80d8688b02B3FD3afb81cDb124F188BB5aD0445` [↗](https://explorer.mainnet.aurora.dev/address/0xd80d8688b02B3FD3afb81cDb124F188BB5aD0445/transactions)| +| Avalanche | `0x1f1E7c893855525b303f99bDF5c3c05Be09ca251` [↗](https://snowtrace.io/address/0x1f1E7c893855525b303f99bDF5c3c05Be09ca251)| +| Base | `0x432036208d2717394d2614d6697c46DF3Ed69540` [↗](https://basescan.org/address/0x432036208d2717394d2614d6697c46DF3Ed69540)| +| Blast | `0x9592f08387134e218327E6E8423400eb845EdE0E` [↗](https://blastscan.io/address/0x9592f08387134e218327E6E8423400eb845EdE0E)| +| Boba | `0xb554A55358fF0382Fb21F0a478C3546d1106Be8c` [↗](https://blockexplorer.boba.network/tokens/0xb554A55358fF0382Fb21F0a478C3546d1106Be8c/token-transfers)| +| BSC | `0xa4080f1778e69467e905b8d6f72f6e441f9e9484` [↗](https://bscscan.com/token/0xa4080f1778e69467e905b8d6f72f6e441f9e9484)| +| Canto | `0x555982d2E211745b96736665e19D9308B615F78e` [↗](https://canto.dex.guru/address/0x555982d2e211745b96736665e19d9308b615f78e)| +| Cronos | `0xFD0F80899983b8D46152aa1717D76cba71a31616` [↗](https://cronoscan.com/address/0xFD0F80899983b8D46152aa1717D76cba71a31616)| +| DFK | `0xB6b5C854a8f71939556d4f3a2e5829F7FcC1bf2A` [↗](https://subnets.avax.network/defi-kingdoms/dfk-chain/explorer/address/0xB6b5C854a8f71939556d4f3a2e5829F7FcC1bf2A)| +| Dogechain | `0xDfA53EeBA61D69E1D2b56b36d78449368F0265c1` [↗](https://explorer.dogechain.dog/address/0xDfA53EeBA61D69E1D2b56b36d78449368F0265c1)| +| Ethereum | `0x0f2D719407FdBeFF09D87557AbB7232601FD9F29` [↗](https://etherscan.io/token/0x0f2D719407FdBeFF09D87557AbB7232601FD9F29)| +| Fantom | `0xE55e19Fb4F2D85af758950957714292DAC1e25B2` [↗](https://ftmscan.com/address/0xe55e19fb4f2d85af758950957714292dac1e25b2)| +| Harmony | `0xE55e19Fb4F2D85af758950957714292DAC1e25B2` [↗](https://explorer.harmony.one/address/0xe55e19fb4f2d85af758950957714292dac1e25b2)| +| Moonbeam | `0xF44938b0125A6662f9536281aD2CD6c499F22004` [↗](https://moonscan.io/address/0xF44938b0125A6662f9536281aD2CD6c499F22004)| +| Moonriver | `0xd80d8688b02B3FD3afb81cDb124F188BB5aD0445` [↗](https://moonriver.moonscan.io/address/0xd80d8688b02B3FD3afb81cDb124F188BB5aD0445)| +| Optimism | `0x5A5fFf6F753d7C11A56A52FE47a177a87e431655` [↗](https://optimistic.etherscan.io/address/0x5A5fFf6F753d7C11A56A52FE47a177a87e431655)| +| Polygon | `0xf8f9efc0db77d8881500bb06ff5d6abc3070e695` [↗](https://polygonscan.com/token/0xf8f9efc0db77d8881500bb06ff5d6abc3070e695)| +| Metis | `0x67c10c397dd0ba417329543c1a40eb48aaa7cd00` [↗](https://andromeda-explorer.metis.io/address/0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00)| \ No newline at end of file diff --git a/docs/bridge/docs/Contracts/02-Synapse-Router.mdx b/docs/bridge/docs/Contracts/02-Synapse-Router.mdx new file mode 100644 index 0000000000..71658d6f5c --- /dev/null +++ b/docs/bridge/docs/Contracts/02-Synapse-Router.mdx @@ -0,0 +1,26 @@ +# Synapse Router + +**Address**: `0x7E7A0e201FD38d3ADAA9523Da6C109a07118C96a` + +| Chain | Address | +|-----------|----------------------------------------------| +| Arbitrum | `0x6F4e8eBa4D337f874Ab57478AcC2Cb5BACdc19c9` [↗](https://arbiscan.io/address/0x6F4e8eBa4D337f874Ab57478AcC2Cb5BACdc19c9) | +| Aurora | `0xaeD5b25BE1c3163c907a471082640450F928DDFE` [↗](https://explorer.mainnet.aurora.dev/address/0xaeD5b25BE1c3163c907a471082640450F928DDFE/transactions) | +| Avalanche | `0xC05e61d0E7a63D27546389B7aD62FdFf5A91aACE` [↗](https://snowtrace.io/address/0xC05e61d0E7a63D27546389B7aD62FdFf5A91aACE) | +| Base | `0xf07d1C752fAb503E47FEF309bf14fbDD3E867089` [↗](https://basescan.org/address/0xf07d1C752fAb503E47FEF309bf14fbDD3E867089) | +| Blast | `0x55769baf6ec39b3bf4aae948eb890ea33307ef3c` [↗](https://blastscan.io/address/0x55769baf6ec39b3bf4aae948eb890ea33307ef3c) | +| Boba | `0x432036208d2717394d2614d6697c46DF3Ed69540` [↗](https://blockexplorer.boba.network/address/0x432036208d2717394d2614d6697c46DF3Ed69540/transactions) | +| BSC | `0xd123f70AE324d34A9E76b67a27bf77593bA8749f` [↗](https://bscscan.com/address/0xd123f70AE324d34A9E76b67a27bf77593bA8749f) | +| Canto | `0xDde5BEC4815E1CeCf336fb973Ca578e8D83606E0` [↗](https://evm.explorer.canto.io/address/0xDde5BEC4815E1CeCf336fb973Ca578e8D83606E0) | +| Cronos | `0xE27BFf97CE92C3e1Ff7AA9f86781FDd6D48F5eE9` [↗](https://cronoscan.com/address/0xE27BFf97CE92C3e1Ff7AA9f86781FDd6D48F5eE9) | +| DFK | `0xE05c976d3f045D0E6E7A6f61083d98A15603cF6A` [↗](https://subnets.avax.network/defi-kingdoms/dfk-chain/explorer/address/0xE05c976d3f045D0E6E7A6f61083d98A15603cF6A) | +| Dogechain | `0x9508BF380c1e6f751D97604732eF1Bae6673f299` [↗](https://explorer.dogechain.dog/address/0x9508BF380c1e6f751D97604732eF1Bae6673f299) | +| Ethereum | `0x2796317b0fF8538F253012862c06787Adfb8cEb6` [↗](https://etherscan.io/address/0x2796317b0fF8538F253012862c06787Adfb8cEb6) | +| Fantom | `0xAf41a65F786339e7911F4acDAD6BD49426F2Dc6b` [↗](https://ftmscan.com/address/0xAf41a65F786339e7911F4acDAD6BD49426F2Dc6b) | +| Harmony | `0xAf41a65F786339e7911F4acDAD6BD49426F2Dc6b` [↗](https://explorer.harmony.one/address/0xaf41a65f786339e7911f4acdad6bd49426f2dc6b) | +| Klaytn | `0xAf41a65F786339e7911F4acDAD6BD49426F2Dc6b` [↗](https://scope.klaytn.com/account/0xAf41a65F786339e7911F4acDAD6BD49426F2Dc6b?tabId=txList) | +| Metis | `0x06Fea8513FF03a0d3f61324da709D4cf06F42A5c` [↗](https://andromeda-explorer.metis.io/address/0x06Fea8513FF03a0d3f61324da709D4cf06F42A5c) | +| Moonbeam | `0x84A420459cd31C3c34583F67E0f0fB191067D32f` [↗](https://moonscan.io/address/0x84A420459cd31C3c34583F67E0f0fB191067D32f) | +| Moonriver | `0xaeD5b25BE1c3163c907a471082640450F928DDFE` [↗](https://moonriver.moonscan.io/address/0xaeD5b25BE1c3163c907a471082640450F928DDFE) | +| Optimism | `0xAf41a65F786339e7911F4acDAD6BD49426F2Dc6b` [↗](https://optimistic.etherscan.io/address/0xAf41a65F786339e7911F4acDAD6BD49426F2Dc6b) | +| Polygon | `0x8F5BBB2BB8c2Ee94639E55d5F41de9b4839C1280` [↗](https://polygonscan.com/address/0x8F5BBB2BB8c2Ee94639E55d5F41de9b4839C1280) | diff --git a/docs/bridge/docs/Contracts/03-Liquidity-Pools.md b/docs/bridge/docs/Contracts/03-Liquidity-Pools.md new file mode 100644 index 0000000000..3f7159ba47 --- /dev/null +++ b/docs/bridge/docs/Contracts/03-Liquidity-Pools.md @@ -0,0 +1,59 @@ +# Liquidity Pools + +## ETH Pools + +| Chain | Address | +|-----------|----------------------------------------------| +| Arbitrum | `0xa067668661C84476aFcDc6fA5D758C4c01C34352` [↗](https://arbiscan.io/address/0x6f4e8eba4d337f874ab57478acc2cb5bacdc19c9) | +| Avalanche | `0x77a7e60555bC18B4Be44C181b2575eee46212d44` [↗](https://snowtrace.io/address/0x77a7e60555bC18B4Be44C181b2575eee46212d44) | +| Base | `0x6223bD82010E2fB69F329933De20897e7a4C225f` [↗](https://basescan.org/address/0x6223bd82010e2fb69f329933de20897e7a4c225f) | +| Blast | `0x999fcd13C54B26E02a6Ccd185f71550b3a4641c0` [↗](https://blastscan.io/address/0x999fcd13C54B26E02a6Ccd185f71550b3a4641c0) | +| Metis | `0x09fEC30669d63A13c666d2129230dD5588E2e240` [↗](https://andromeda-explorer.metis.io/address/0x09fEC30669d63A13c666d2129230dD5588E2e240) | +| Optimism | `0xE27BFf97CE92C3e1Ff7AA9f86781FDd6D48F5eE9` [↗](https://optimistic.etherscan.io/address/0xE27BFf97CE92C3e1Ff7AA9f86781FDd6D48F5eE9) | + +## nETH + +| Chain | Address | +|-----------|----------------------------------------------| +| Arbitrum | `0x3ea9B0ab55F34Fb188824Ee288CeaEfC63cf908e` [↗](https://arbiscan.io/address/0x3ea9B0ab55F34Fb188824Ee288CeaEfC63cf908e) | +| Base | `0xb554A55358fF0382Fb21F0a478C3546d1106Be8c` [↗](https://basescan.org/address/0xb554A55358fF0382Fb21F0a478C3546d1106Be8c) | +| Blast | `0xce971282faac9fabcf121944956da7142cccc855` [↗](https://blastscan.io/token/0xce971282faac9fabcf121944956da7142cccc855) | +| Boba | `0x96419929d7949D6A801A6909c145C8EEf6A40431` [↗](https://blockexplorer.boba.network/address/0x96419929d7949D6A801A6909c145C8EEf6A40431/transactions) | +| Optimism | `0x809DC529f07651bD43A172e8dB6f4a7a0d771036` [↗](https://optimistic.etherscan.io/address/0x809DC529f07651bD43A172e8dB6f4a7a0d771036) | +| Metis | `0x931b8f17764362a3325d30681009f0edd6211231` [↗](https://andromeda-explorer.metis.io/address/0x931B8f17764362A3325D30681009f0eDd6211231) | + +## Stableswap Pools + +| Chain | Address | +|-----------|----------------------------------------------| +| Arbitrum | `0x9Dd329F5411466d9e0C488fF72519CA9fEf0cb40` [↗](https://arbiscan.io/address/0x9Dd329F5411466d9e0C488fF72519CA9fEf0cb40) | +| Aurora | `0x3CE7AAD78B9eb47Fd2b487c463A17AAeD038B7EC` [↗](https://explorer.aurora.dev/address/0x3CE7AAD78B9eb47Fd2b487c463A17AAeD038B7EC) | +| Avalanche | `0xED2a7edd7413021d440b09D654f3b87712abAB66` [↗](https://snowtrace.io/address/0xED2a7edd7413021d440b09D654f3b87712abAB66) | +| Blast | `0xa4bd1AAD7cF04567c10f38FC4355E91bba32aC9c` [↗](https://blastscan.io/address/0xa4bd1AAD7cF04567c10f38FC4355E91bba32aC9c) | +| BNB Chain | `0x28ec0B36F0819ecB5005cAB836F4ED5a2eCa4D13` [↗](https://bscscan.com/address/0x28ec0B36F0819ecB5005cAB836F4ED5a2eCa4D13) | +| Boba | `0x75FF037256b36F15919369AC58695550bE72fead` [↗](https://bobascan.com/address/0x75FF037256b36F15919369AC58695550bE72fead) | +| Canto | `0x07379565cD8B0CaE7c60Dc78e7f601b34AF2A21c` [↗](https://evm.explorer.canto.io/address/0x07379565cD8B0CaE7c60Dc78e7f601b34AF2A21c) | +| Ethereum | `0x1116898DdA4015eD8dDefb84b6e8Bc24528Af2d8` [↗](https://etherscan.io/address/0x1116898DdA4015eD8dDefb84b6e8Bc24528Af2d8) | +| Fantom | `0x85662fd123280827e11C59973Ac9fcBE838dC3B4` [↗](https://ftmscan.com/address/0x85662fd123280827e11C59973Ac9fcBE838dC3B4) | +| Metis | `0x555982d2E211745b96736665e19D9308B615F78e` [↗](https://andromeda-explorer.metis.io/address/0x555982d2E211745b96736665e19D9308B615F78e) | +| Optimism | `0xF44938b0125A6662f9536281aD2CD6c499F22004` [↗](https://optimistic.etherscan.io/address/0xf44938b0125a6662f9536281ad2cd6c499f22004) | +| Polygon | `0x85fCD7Dd0a1e1A9FCD5FD886ED522dE8221C3EE5` [↗](https://polygonscan.com/address/0x85fCD7Dd0a1e1A9FCD5FD886ED522dE8221C3EE5) | + +## nUSD + +| Chain | Address | +|-----------|----------------------------------------------| +| Arbitrum | `0x2913e812cf0dcca30fb28e6cac3d2dcff4497688` [↗](https://arbiscan.io/token/0x2913e812cf0dcca30fb28e6cac3d2dcff4497688) | +| Aurora | `0x07379565cD8B0CaE7c60Dc78e7f601b34AF2A21c` [↗](https://explorer.mainnet.aurora.dev/address/0x07379565cD8B0CaE7c60Dc78e7f601b34AF2A21c/transactions) | +| Avalanche | `0xCFc37A6AB183dd4aED08C204D1c2773c0b1BDf46` [↗](https://snowtrace.io/address/0xCFc37A6AB183dd4aED08C204D1c2773c0b1BDf46) | +| Blast | `0x3194B0A295D87fDAA54DF852c248F7a6BAF6c6e0` [↗](https://blastscan.io/address/0x3194B0A295D87fDAA54DF852c248F7a6BAF6c6e0) | +| Boba | `0x6B4712AE9797C199edd44F897cA09BC57628a1CF` [↗](https://blockexplorer.boba.network/tokens/0x6B4712AE9797C199edd44F897cA09BC57628a1CF/token-transfers) | +| BSC | `0x23b891e5c62e0955ae2bd185990103928ab817b3` [↗](https://bscscan.com/token/0x23b891e5c62e0955ae2bd185990103928ab817b3) | +| Cronos | `0x396c9c192dd323995346632581BEF92a31AC623b` [↗](https://cronoscan.com/address/0x396c9c192dd323995346632581BEF92a31AC623b) | +| DFK | `0x52285D426120aB91F378b3dF4A15a036a62200aE` [↗](https://subnets.avax.network/defi-kingdoms/dfk-chain/explorer/address/0x52285D426120aB91F378b3dF4A15a036a62200aE) | +| Ethereum | `0x1B84765dE8B7566e4cEAF4D0fD3c5aF52D3DdE4F` [↗](https://etherscan.io/token/0x1B84765dE8B7566e4cEAF4D0fD3c5aF52D3DdE4F) | +| Fantom | `0xed2a7edd7413021d440b09d654f3b87712abab66` [↗](https://ftmscan.com/token/0xed2a7edd7413021d440b09d654f3b87712abab66) | +| Harmony | `0xed2a7edd7413021d440b09d654f3b87712abab66` [↗](https://explorer.harmony.one/address/0xed2a7edd7413021d440b09d654f3b87712abab66) | +| Optimism | `0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00` [↗](https://optimistic.etherscan.io/address/0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00) | +| Polygon | `0xb6c473756050de474286bed418b77aeac39b02af` [↗](https://polygonscan.com/token/0xb6c473756050de474286bed418b77aeac39b02af) | +| Metis | `0x961318fc85475e125b99cc9215f62679ae5200ab` [↗](https://andromeda-explorer.metis.io/address/0x961318Fc85475E125B99Cc9215f62679aE5200aB) | diff --git a/docs/bridge/docs/Contracts/04-CCTP.mdx b/docs/bridge/docs/Contracts/04-CCTP.mdx new file mode 100644 index 0000000000..ad2efda79c --- /dev/null +++ b/docs/bridge/docs/Contracts/04-CCTP.mdx @@ -0,0 +1,15 @@ +# CCTP + +Synapse CCTP contracts interact with [Circle CCTP contracts](https://developers.circle.com/stablecoins/docs/evm-smart-contracts) to mint and burn USDC on supported chains. + +**Address**: `0xd5a597d6e7ddf373a92c8f477daaa673b0902f48`\ +**Contract**: [SynapseCCTP.sol](https://github.com/synapsecns/synapse-contracts/blob/master/contracts/cctp/SynapseCCTP.sol) + +| Chain | Address | +| --------- | ---------------------------------------------| +| Arbitrum | `0x12715a66773bd9c54534a01abf01d05f6b4bd35e` [↗](https://arbiscan.io/address/0x12715a66773bd9c54534a01abf01d05f6b4bd35e) | +| Avalanche | `0x12715a66773bd9c54534a01abf01d05f6b4bd35e` [↗](https://snowtrace.io/address/0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E) | +| Base | `0x12715a66773bd9c54534a01abf01d05f6b4bd35e` [↗](https://basescan.org/address/0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E) | +| Ethereum | `0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E` [↗](https://etherscan.io/address/0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E) | +| Optimism | `0x12715a66773bd9c54534a01abf01d05f6b4bd35e` [↗](https://optimistic.etherscan.io/address/0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E) | +| Polygon | `0x12715a66773bd9c54534a01abf01d05f6b4bd35e` [↗](https://polygonscan.com/address/0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E) | diff --git a/docs/bridge/docs/Contracts/05-RFQ.mdx b/docs/bridge/docs/Contracts/05-RFQ.mdx new file mode 100644 index 0000000000..de20ff076a --- /dev/null +++ b/docs/bridge/docs/Contracts/05-RFQ.mdx @@ -0,0 +1,14 @@ +# RFQ + +**Address**: `0x00cD000000003f7F682BE4813200893d4e690000` + +| Chain | Address | +| -------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| Arbitrum | `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://arbiscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | +| Base | `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://basescan.org/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | +| Ethereum | `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://etherscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | +| Optimism | `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://optimistic.etherscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | +| Scroll | `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://scrollscan.com/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | +| Linea | `0x34F52752975222d5994C206cE08C1d5B329f24dD` [↗](https://lineascan.build/address/0x34F52752975222d5994C206cE08C1d5B329f24dD) | +| BNB Chain| `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://bscscan.com/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | +| Blast | `0x34F52752975222d5994C206cE08C1d5B329f24dD` [↗](https://blastscan.io/address/0x34F52752975222d5994C206cE08C1d5B329f24dD) | diff --git a/docs/bridge/docs/Contracts/08-Bridge-Zaps.md b/docs/bridge/docs/Contracts/08-Bridge-Zaps.md new file mode 100644 index 0000000000..076c5ce403 --- /dev/null +++ b/docs/bridge/docs/Contracts/08-Bridge-Zaps.md @@ -0,0 +1,20 @@ +# Bridge Zaps + +| Chain | Address | +|-----------|----------------------------------------------| +| Arbitrum | `0x37f9aE2e0Ea6742b9CAD5AbCfB6bBC3475b3862B` [↗](https://arbiscan.io/address/0x37f9aE2e0Ea6742b9CAD5AbCfB6bBC3475b3862B) | +| Aurora | `0x2D8Ee8d6951cB4Eecfe4a79eb9C2F973C02596Ed` [↗](https://aurorascan.dev/address/0x2D8Ee8d6951cB4Eecfe4a79eb9C2F973C02596Ed) | +| Avalanche | `0x0EF812f4c68DC84c22A4821EF30ba2ffAB9C2f3A` [↗](https://snowtrace.io/address/0x0EF812f4c68DC84c22A4821EF30ba2ffAB9C2f3A) | +| Boba | `0x64B4097bCCD27D49BC2A081984C39C3EeC427a2d` [↗](https://blockexplorer.boba.network/address/0x64B4097bCCD27D49BC2A081984C39C3EeC427a2d/transactions) | +| BSC | `0x749F37Df06A99D6A8E065dd065f8cF947ca23697` [↗](https://bscscan.com/address/0x749F37Df06A99D6A8E065dd065f8cF947ca23697) | +| Canto | `0x8671A0465844a15eb7230C5dd8d6032c26c655B7` [↗](https://evm.explorer.canto.io/address/0x8671A0465844a15eb7230C5dd8d6032c26c655B7) | +| Cronos | `0x991adb00eF4c4a6D1eA6036811138Db4379377C2` [↗](https://cronoscan.com/address/0x991adb00eF4c4a6D1eA6036811138Db4379377C2) | +| DFK | `0x75224b0f245Fe51d5bf47A898DbB6720D4150BA7` [↗](https://subnets.avax.network/defi-kingdoms/dfk-chain/explorer/address/0x75224b0f245Fe51d5bf47A898DbB6720D4150BA7) | +| Dogechain | `0x544450Ffdfa5EA20528F21918E8aAC7B2C733381` [↗](https://explorer.dogechain.dog/address/0x544450Ffdfa5EA20528F21918E8aAC7B2C733381) | +| Ethereum | `0x6571d6be3d8460CF5F7d6711Cd9961860029D85F` [↗](https://etherscan.io/address/0x6571d6be3d8460CF5F7d6711Cd9961860029D85F) | +| Fantom | `0xB003e75f7E0B5365e814302192E99b4EE08c0DEd` [↗](https://ftmscan.com/address/0xB003e75f7E0B5365e814302192E99b4EE08c0DEd) | +| Harmony | `0xB003e75f7E0B5365e814302192E99b4EE08c0DEd` [↗](https://explorer.harmony.one/address/0xb003e75f7e0b5365e814302192e99b4ee08c0ded) | +| Optimism | `0x470f9522ff620eE45DF86C58E54E6A645fE3b4A7` [↗](https://optimistic.etherscan.io/address/0x470f9522ff620eE45DF86C58E54E6A645fE3b4A7) | +| Moonbeam | `0x73783F028c60D463bc604cc53852C37C31dEC5e9` [↗](https://moonscan.io/address/0x73783F028c60D463bc604cc53852C37C31dEC5e9) | +| Moonriver | `0x06Fea8513FF03a0d3f61324da709D4cf06F42A5c` [↗](https://moonriver.moonscan.io/address/0x06Fea8513FF03a0d3f61324da709D4cf06F42A5c) | +| Polygon | `0x1c6aE197fF4BF7BA96c66C5FD64Cb22450aF9cC8` [↗](https://polygonscan.com/address/0x1c6aE197fF4BF7BA96c66C5FD64Cb22450aF9cC8) | diff --git a/docs/bridge/docs/Contracts/09-MiniChef.md b/docs/bridge/docs/Contracts/09-MiniChef.md new file mode 100644 index 0000000000..906961d79c --- /dev/null +++ b/docs/bridge/docs/Contracts/09-MiniChef.md @@ -0,0 +1,19 @@ +# MiniChef + +| Chain | Address | +|-----------|----------------------------------------------| +| Arbitrum | `0x73186f2Cf2493f20836b17b21ae79fc12934E207` [↗](https://arbiscan.io/address/0x73186f2Cf2493f20836b17b21ae79fc12934E207) | +| Aurora | `0x809DC529f07651bD43A172e8dB6f4a7a0d771036` [↗](https://explorer.mainnet.aurora.dev/address/0x809DC529f07651bD43A172e8dB6f4a7a0d771036/transactions) | +| Avalanche | `0x3a01521F8E7F012eB37eAAf1cb9490a5d9e18249` [↗](https://snowtrace.io/address/0x3a01521F8E7F012eB37eAAf1cb9490a5d9e18249) | +| Base | `0xfFC2d603fde1F99ad94026c00B6204Bb9b8c36E9` [↗](https://basescan.org/address/0xfFC2d603fde1F99ad94026c00B6204Bb9b8c36E9) | +| Blast | `0x3100dC8464A8523306c3C5034de24a8927d6E590` [↗](https://blastscan.io/address/0x3100dC8464A8523306c3C5034de24a8927d6E590) | +| Boba | `0xd5609cD0e1675331E4Fb1d43207C8d9D83AAb17C` [↗](https://blockexplorer.boba.network/address/0xd5609cD0e1675331E4Fb1d43207C8d9D83AAb17C/transactions) | +| BSC | `0x8F5BBB2BB8c2Ee94639E55d5F41de9b4839C1280` [↗](https://bscscan.com/address/0x8F5BBB2BB8c2Ee94639E55d5F41de9b4839C1280) | +| Canto | `0x93124c923dA389Bc0f13840fB822Ce715ca67ED6` [↗](https://canto.dex.guru/address/0x93124c923dA389Bc0f13840fB822Ce715ca67ED6) | +| Ethereum | `0xd10eF2A513cEE0Db54E959eF16cAc711470B62cF` [↗](https://etherscan.io/address/0xd10eF2A513cEE0Db54E959eF16cAc711470B62cF) | +| Fantom | `0xaeD5b25BE1c3163c907a471082640450F928DDFE` [↗](https://ftmscan.com/address/0xaed5b25be1c3163c907a471082640450f928ddfe) | +| Harmony | `0xaeD5b25BE1c3163c907a471082640450F928DDFE` [↗](https://explorer.harmony.one/address/0xaed5b25be1c3163c907a471082640450f928ddfe) | +| Metis | `0xaB0D8Fc46249DaAcd5cB36c5F0bC4f0DAF34EBf5` [↗](https://andromeda-explorer.metis.io/address/0xaB0D8Fc46249DaAcd5cB36c5F0bC4f0DAF34EBf5) | +| Moonriver | `0x432036208d2717394d2614d6697c46DF3Ed69540` [↗](https://moonriver.moonscan.io/address/0x432036208d2717394d2614d6697c46DF3Ed69540) | +| Optimism | `0xe8c610fcb63A4974F02Da52f0B4523937012Aaa0` [↗](https://optimistic.etherscan.io/address/0xe8c610fcb63A4974F02Da52f0B4523937012Aaa0) | +| Polygon | `0x7875Af1a6878bdA1C129a4e2356A3fD040418Be5` [↗](https://polygonscan.com/address/0x7875Af1a6878bdA1C129a4e2356A3fD040418Be5) | diff --git a/docs/bridge/docs/Contracts/index.md b/docs/bridge/docs/Contracts/index.md new file mode 100644 index 0000000000..efb8ed98ad --- /dev/null +++ b/docs/bridge/docs/Contracts/index.md @@ -0,0 +1,22 @@ +--- +sidebar_position: 4 +title: Contracts +--- + +# Contract Addresses + +:::note + +Due to the number of deployments & contracts across multiple chains, this list may be incomplete. The canonical list is part of the Synapse CNS on [Github](https://github.com/synapsecns/synapse-contracts). + +::: + +## Categories + +* **[Synapse Token](Synapse-Token)** +* **[Synapse Router](Synapse-Router)** +* **[Liquidity Pools](Liquidity-Pools)** +* **[CCTP](CCTP)** +* **[RFQ](RFQ)** +* **[Bridge Zaps](Bridge-Zaps)** +* **[MiniChef](MiniChef)** diff --git a/docs/bridge/docs/Developers/index.md b/docs/bridge/docs/Developers/index.md index 6e839cf1ee..66cc575967 100644 --- a/docs/bridge/docs/Developers/index.md +++ b/docs/bridge/docs/Developers/index.md @@ -1,4 +1,8 @@ -# Developer Guides +--- +sidebar_position: 3 +--- + +# Developer Guide * **[Send and receive interchain data](#)** * **[On-chain swaps](#)** diff --git a/docs/bridge/docs/Routers/01-Router-v2.md b/docs/bridge/docs/Routers/01-Router-v2.md deleted file mode 100644 index d21ae6ffb7..0000000000 --- a/docs/bridge/docs/Routers/01-Router-v2.md +++ /dev/null @@ -1,3 +0,0 @@ -# Router v2 - -Lorem ipsum diff --git a/docs/bridge/docs/Routers/CCTP/Contracts.md b/docs/bridge/docs/Routers/CCTP/Contracts.md deleted file mode 100644 index 5707af69a6..0000000000 --- a/docs/bridge/docs/Routers/CCTP/Contracts.md +++ /dev/null @@ -1,18 +0,0 @@ -# Contracts - -Synapse CCTP contracts deployed on several chains and are documented inline. Synapse CCTP routes tokens through the CCTP module and [SynapseCCTP](https://github.com/synapsecns/synapse-contracts/blob/master/contracts/cctp/SynapseCCTP.sol) interacts with the Circle contracts to mint/burn USDC. These contracts sit on top of the Circle CCTP contracts and are responsible for minting and burning USDC on supported chains. - -### Synapse CCTP - -| Chain | Address | -| --------- | -------------------------------------------------------------------------------------------------------------------------------- | -| Arbitrum | [0x12715a66773bd9c54534a01abf01d05f6b4bd35e](https://arbiscan.io/address/0x12715a66773bd9c54534a01abf01d05f6b4bd35e) | -| Avalanche | [0x12715a66773bd9c54534a01abf01d05f6b4bd35e](https://snowtrace.io/address/0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E) | -| Base | [0x12715a66773bd9c54534a01abf01d05f6b4bd35e](https://basescan.org/address/0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E) | -| Ethereum | [0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E](https://etherscan.io/address/0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E) | -| Optimism | [0x12715a66773bd9c54534a01abf01d05f6b4bd35e](https://optimistic.etherscan.io/address/0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E) | -| Polygon | [0x12715a66773bd9c54534a01abf01d05f6b4bd35e](https://polygonscan.com/address/0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E) | - -## Circle Contracts - -Please refer to [this page](https://developers.circle.com/stablecoins/docs/evm-smart-contracts) for Circle contract addresses. diff --git a/docs/bridge/docs/Routers/CCTP/Relayer.md b/docs/bridge/docs/Routers/CCTP/Relayer.md deleted file mode 100644 index 529bde2b2b..0000000000 --- a/docs/bridge/docs/Routers/CCTP/Relayer.md +++ /dev/null @@ -1,107 +0,0 @@ -# CCTP Relayer - -The CCTP relayer is an off-chain service aimed at fulfilling transactions requested through the [CCTP Contracts](./Contracts.md). The relayer is responsible for fetching attestations from the [Circle API](https://developers.circle.com/stablecoin/reference) and submitting them to the CCTP contracts. Anyone can run a relayer. - -### Architecture - -The relayer is a Golang application that polls for events on chain and uses a combo state (db status) and event (on-chain logs) driven [architecture](https://medium.com/@matt.denobrega/state-vs-event-based-web-architectures-59ab1f47656b) to process transactions. The relayer is designed to be run by anyone and be easily observable. - -At a high level, the relayer works like this: - -1. Poll for new transactions from the CCTP contracts and add them to the database as [Pending](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageState) -2. Fetch the attestation from the Circle API. Once successful add attestation to the database and update status to be [Attested](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageState) -3. Submit the attestation to the CCTP contracts. Once the transaction has been added to [Submitter](../Services/Submitter#Observability), mark as [Submitted](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageState) -4. Poll for the transaction receipt and mark as [Confirmed](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageState) - -### Modes - -As specified by the [cctp_type](#Configuration), the CCTP relayer can be run in one of two modes. In [Synapse mode](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageType), the [Synapse CCTP](./Contracts.md)contracts are listened to and events relayed through there (including metadata). In [Circle Mode](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageType), raw [TokenMessenger](https://github.com/circlefin/evm-cctp-contracts/blob/817397db0a12963accc08ff86065491577bbc0e5/src/TokenMessenger.sol) events are relayed. This mode can only be used for USDC to USDC bridges and is not commonly used. - -## Running the Relayer - -### Building From Source - -To build the CCTP Relayer from source, you will need to clone the repository and run the main.go file with the config file. Building from source requires go 1.21 or higher and is generally not recommended for end-users. - -1. `git clone https://github.com/synapsecns/sanguine --recursive` -2. `cd sanguine/services/cctp-relayer` -3. `go run main.go --config /path/to/config.yaml` - -### Running the Docker Image - -The CCTP Relayer can also be run with docker. To do this, you will need to pull the [docker image](https://github.com/synapsecns/sanguine/pkgs/container/sanguine%2Fcctp-relayer) and run it with the config file: - -```bash -docker run ghcr.io/synapsecns/sanguine/cctp-relayer:latest --config /path/to/config -``` - -There is also a helm chart available for the CCTP Relayer [here](https://artifacthub.io/packages/helm/synapse/cctp/0.2.0), but it is recommended you create your own. - -### Configuration - -The CCTP Relayer is configured with a yaml file. The following is an example configuration: - -
- example config -```yaml - cctp_type: "synapse" - # prod contract addresses - chains: - - chain_id: 1 - synapse_cctp_address: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E" - - chain_id: 43114 - synapse_cctp_address: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E" - - chain_id: 42161 - synapse_cctp_address: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E" - - chain_id: 10 - synapse_cctp_address: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E" - - chain_id: 8453 - synapse_cctp_address: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E" - - chain_id: 137 - synapse_cctp_address: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E" - base_omnirpc_url: "http://omnrpc-url/" - unbonded_signer: - type: "AWS" - # should be a mounted secret - file: "/config/aws.txt" - http_backoff_initial_interval_ms: 1000 - http_backoff_max_elapsed_time_ms: 300000 - # submitter config for cctp - submitter_config: - chains: - 1: - supports_eip_1559: true - gas_estimate: 1000000 - 42161: - gas_estimate: 30000000 - max_gas_price: 10000000000 - supports_eip_1559: true - 43114: - gas_estimate: 5000000 - max_gas_price: 1000000000000 - supports_eip_1559: true - 10: - gas_estimate: 5000000 - max_gas_price: 2000000000 - supports_eip_1559: true - 8453: - gas_estimate: 5000000 - 137: - gas_estimate: 5000000 - max_gas_price: 10000000000000 - supports_eip_1559: true -``` -
- - - `cctp_type`: The type of CCTP to listen to. Can be either `synapse` or `circle`. - - `chains`: A list of chain ids and their corresponding CCTP contract addresses. If synapse mode, this should be `synapse_cctp_address` and if circle mode, this should be `token_messenger_address`. Both modes cannot be used at once and the other will be ignored if both are set. - - `base_omnirpc_url`: The base URL for the OmniRPC service. - - `unbonded_signer`: The signer to use for transactions. Can be either `AWS`, `File` or `GCP`. The file should be a mounted secret. More details can be found [here](../Services/Signer). - - `port`: The port to run the relayer on (e.g. 8080) - - `host`: The host to run the relayer on (e.g. localhost). Note: this should not be publicly exposed - - `http_backoff_initial_interval_ms`: The initial interval for the backoff in milliseconds. - - `retry_interval_ms`: The interval to wait between attestation request retries in milliseconds. The [CCTP API Rate Limit](https://developers.circle.com/stablecoins/docs/limits) should be kept in mind. - -### Observability - -The CCTP relayer implements open telemetry for both tracing and metrics. Please see the [Observability](docs/Services/Observability) page for more info. We'd also highly recommend setting up the [submitter dashboard](../Services/Submitter) as well. diff --git a/docs/bridge/docs/Routers/CCTP/_category_.json b/docs/bridge/docs/Routers/CCTP/_category_.json deleted file mode 100644 index 6aa756eaf5..0000000000 --- a/docs/bridge/docs/Routers/CCTP/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "label": "CCTP" -} diff --git a/docs/bridge/docs/Routers/CCTP/index.md b/docs/bridge/docs/Routers/CCTP/index.md index f8637073aa..13b0fe3f4d 100644 --- a/docs/bridge/docs/Routers/CCTP/index.md +++ b/docs/bridge/docs/Routers/CCTP/index.md @@ -1,10 +1,120 @@ -# Overview +--- +sidebar_position: 2 +sidebar_label: CCTP +--- -Synapse CCTP is a custom module built on top of Circle's [Cross-Chain Transfer Protocol](https://www.circle.com/en/cross-chain-transfer-protocol) that allows for bridge requests to natively mint & burn USDC on [supported chains](https://developers.circle.com/stablecoins/docs/cctp-getting-started#supported-blockchains). +# CCTP -Synapse's CCTP implementation consists of two main components: +Synapse CCTP Router uses Circle's [Cross-Chain Transfer Protocol](https://www.circle.com/en/cross-chain-transfer-protocol) to natively mint & burn USDC on [supported chains](/docs/Contracts/CCTP). It can be run by anyone, and is easily observable. -- [CCTP Relayer](./Relayer.md): An off-chain service that fulfills transactions requested through the CCTP contracts. The relayer is responsible for fetching attestations from the [Circle API](https://developers.circle.com/stablecoin/reference) and submitting them to the CCTP contracts. Anyone can run a relayer. -- [CCTP Contracts](./Contracts.md): A set of smart contracts that allow for the minting and burning of USDC on supported chains, and instant swaps to/from any supported asset. These contracts are deployed on each supported chain and are responsible for minting and burning USDC. +## Architecture -As a modular component of Synapse's router system, CCTP can be configured to bridge through any supported liquidity source, such as [Curve](https://github.com/synapsecns/synapse-contracts/blob/885cbe06a960591b1bdef330f3d3d57c49dba8e2/contracts/router/modules/pool/curve/CurveV1Module.sol), [Algebra](https://github.com/synapsecns/synapse-contracts/blob/885cbe06a960591b1bdef330f3d3d57c49dba8e2/contracts/router/modules/pool/algebra/AlgebraModule.sol), [DAI PSM](https://github.com/synapsecns/synapse-contracts/blob/885cbe06a960591b1bdef330f3d3d57c49dba8e2/contracts/router/modules/pool/dss/DssPsmModule.sol), and others. +### Contracts + +[Synapse CCTP contracts](/docs/Contracts/CCTP) overlay Circle CCTP contracts to mint and burn USDC and fulfill CCTP transactions. + +### Liquidity +As a modular component of [Synapse Router](../Synapse-Router), CCTP can be configured to bridge through any supported liquidity source, such as [Curve](https://github.com/synapsecns/synapse-contracts/blob/885cbe06a960591b1bdef330f3d3d57c49dba8e2/contracts/router/modules/pool/curve/CurveV1Module.sol), [Algebra](https://github.com/synapsecns/synapse-contracts/blob/885cbe06a960591b1bdef330f3d3d57c49dba8e2/contracts/router/modules/pool/algebra/AlgebraModule.sol), [DAI PSM](https://github.com/synapsecns/synapse-contracts/blob/885cbe06a960591b1bdef330f3d3d57c49dba8e2/contracts/router/modules/pool/dss/DssPsmModule.sol), and others. + +### Relayer + +Go application which uses on-chain events with off-chain message state to process transactions. CCTP Relayer can be run by anyone, and is easily observable. + +## Behavior + +CCTP Relayer polls for new transactions and and [message state](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageState) updates from CCTP contracts on-chain, which are stored in an off-chain database. + +Successful attestations fetched from the [Circle API](https://developers.circle.com/stablecoin/reference) are submitted to the destination CCTP contract, and marked as `Complete` once a transaction receipt is received. + +| State | Description | +|-------------|-------------| +| `Pending` | USDC transfer has been initiated on the origin chain and is pending attestation | +| `Attested` | USDC transfer is waiting for submittion on the destination chain | +| `Submitted` | USDC transfer has been confirmed on the destination chain | +| `Complete` | USDC transfer has been completed on the destination chain | + + + + +## Run a Relayer + +### Configure + +To run CCTP Relayer, first create your [YAML configuration file](#configuration-file), Which is required as part of the `run` command. + +### From Docker + +Run the Docker [image](https://github.com/synapsecns/sanguine/pkgs/container/sanguine%2Fcctp-relayer) along with the path to your [YAML configuration file](#configuration-file). + +1. `docker run ghcr.io/synapsecns/sanguine/cctp-relayer:latest --config /path/to/config.yaml` + +### From Source + +:::note Requires Go 1.21 or higher + +Not generally recommended for end-users. + +::: + +Clone the sanguine repository, then run the main.go file along with the path to your [YAML configuration file](#configuration-file). + +1. `git clone https://github.com/synapsecns/sanguine --recursive` +2. `cd sanguine/services/cctp-relayer` +3. `go run main.go --config /path/to/config.yaml` + +### With Helm + +There is a helm chart available for the CCTP Relayer [here](https://artifacthub.io/packages/helm/synapse/cctp/0.2.0), but it is recommended you create your own. + +### Recommended services + +CCTP Relayer uses open telemetry for tracing and metrics. See the [Observability](/docs/Services/Observability) page for details. We highly recommend setting up the [Submitter Dashboard](/docs/Services/Submitter) as well. + +## Configuration + +Relayer requires a YAML configuration file at run time. + +* `cctp_type` + * `synapse`: (Recommended) Follows and relays events & metadata from [Synapse CCTP contracts](docs/Contracts/CCTP) + * `circle`: Relays raw [TokenMessenger](https://github.com/circlefin/evm-cctp-contracts/blob/817397db0a12963accc08ff86065491577bbc0e5/src/TokenMessenger.sol) events — *USDC to USDC only* + * `chains`: `chain_id` list + * `synapse`: Use `synapse_cctp_address` + * `circle`: Use `token_messenger_address` + * `base_omnirpc_url`: Base url for the [OmniRPC](/docs/Services/Omnirpc) service + * `unbonded_signer`: [Signer](/docs/Services/Signer) to use for transactions — *should be a mounted secret* + * `AWS` + * `File` + * `GCP` + * `port`: Relayer port (e.g. 8080) + * `host`: Relayer host (e.g. localhost) — *do not publicly expose*. + * `http_backoff_initial_interval_ms`: Initial backoff interval in milliseconds. + * `retry_interval_ms`: Retry interval between attestation requests in milliseconds — *see [CCTP API Rate Limit](https://developers.circle.com/stablecoins/docs/limits)*. + + ### Example + +```yaml +cctp_type: "synapse" +# prod contract addresses +chains: + - chain_id: 1 + synapse_cctp_address: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E" + - chain_id: 42161 + synapse_cctp_address: "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E" +base_omnirpc_url: "http://omnrpc-url/" +unbonded_signer: + type: "AWS" + # should be a mounted secret + file: "/config/aws.txt" +http_backoff_initial_interval_ms: 1000 +http_backoff_max_elapsed_time_ms: 300000 +# submitter config for cctp +submitter_config: + chains: + 1: + supports_eip_1559: true + gas_estimate: 1000000 + 42161: + gas_estimate: 30000000 + max_gas_price: 10000000000 + supports_eip_1559: true +``` diff --git a/docs/bridge/docs/Routers/Synapse-Router/index.md b/docs/bridge/docs/Routers/Synapse-Router/index.md new file mode 100644 index 0000000000..d0d3fe0302 --- /dev/null +++ b/docs/bridge/docs/Routers/Synapse-Router/index.md @@ -0,0 +1,8 @@ +--- +sidebar_position: 0 +sidebar_label: Synapse Router +--- + +# Synapse Router + +Lorem ipsum diff --git a/docs/bridge/docs/Routers/index.md b/docs/bridge/docs/Routers/index.md index 5f43a11abf..a74550116a 100644 --- a/docs/bridge/docs/Routers/index.md +++ b/docs/bridge/docs/Routers/index.md @@ -1,4 +1,8 @@ -# Synapse Routers +--- +sidebar_position: 3 +--- + +# Routers Synapse offers several of routers for different transaction types. diff --git a/docs/bridge/docs/Services/Scribe.md b/docs/bridge/docs/Services/01-Scribe.md similarity index 98% rename from docs/bridge/docs/Services/Scribe.md rename to docs/bridge/docs/Services/01-Scribe.md index 589f1cc59b..07805f8485 100644 --- a/docs/bridge/docs/Services/Scribe.md +++ b/docs/bridge/docs/Services/01-Scribe.md @@ -1,8 +1,3 @@ ---- -sidebar_position: 0 -sidebar_label: Scribe ---- - # Scribe Scribe is a multi-chain indexing service designed to store logs, receipts, and transactions for every event from specified contracts across multiple blockchains. It provides a powerful tool for analytics, event streaming, and monitoring on-chain activities. diff --git a/docs/bridge/docs/Services/Omnirpc.md b/docs/bridge/docs/Services/02-Omnirpc.md similarity index 89% rename from docs/bridge/docs/Services/Omnirpc.md rename to docs/bridge/docs/Services/02-Omnirpc.md index e719fc0278..f0b804f104 100644 --- a/docs/bridge/docs/Services/Omnirpc.md +++ b/docs/bridge/docs/Services/02-Omnirpc.md @@ -1,10 +1,12 @@ -Omnirpc is an rpc load balancer and verifier that allows users to query chain data from multiple chains. It is a service that should be run by Quoters and interfaces that allow Solvers to post quotes. Omnirpc takes in a yaml config that allows the user to specify which chains it should run on. +# OmniRPC -### Running OmniRPC +OmniRPC is an RPC load balancer and verifier that allows users to query chain data from multiple chains. It is a service that should be run by Quoters and interfaces that allow Solvers to post quotes. OmniRPC takes in a yaml config that allows the user to specify which chains it should run on. + +## Running OmniRPC ### Building From Source -To build omnirpc from source, you will need to have Go installed. You can install Go by following the instructions [here](https://golang.org/doc/install). Once you have Go installed, you can build the relayer by running the following commands: +To build OmniRPC from source, you will need to have Go installed. You can install Go by following the instructions [here](https://golang.org/doc/install). Once you have Go installed, you can build the relayer by running the following commands: 1. `git clone https://github.com/synapsecns/sanguine --recursive` 2. `cd sanguine/services/omnirpc` @@ -18,11 +20,11 @@ The relayer can also be run with docker. To do this, you will need to pull the [ docker run ghcr.io/synapsecns/sanguine/omnirpc:latest --config /path/to/config ``` -There is also a helm chart available for omnirpc [here](https://artifacthub.io/packages/helm/synapse/omnirpc). +There is also a helm chart available for OmniRPC [here](https://artifacthub.io/packages/helm/synapse/omnirpc). ### Configuration -Omnirpc is configured with a yaml file. The following is an example configuration: +OmniRPC is configured with a yaml file. The following is an example configuration: ```yaml chains: diff --git a/docs/bridge/docs/Services/Signer.md b/docs/bridge/docs/Services/03-Signer.md similarity index 100% rename from docs/bridge/docs/Services/Signer.md rename to docs/bridge/docs/Services/03-Signer.md diff --git a/docs/bridge/docs/Services/Submitter.md b/docs/bridge/docs/Services/04-Submitter.md similarity index 98% rename from docs/bridge/docs/Services/Submitter.md rename to docs/bridge/docs/Services/04-Submitter.md index 379145a999..afa6435d42 100644 --- a/docs/bridge/docs/Services/Submitter.md +++ b/docs/bridge/docs/Services/04-Submitter.md @@ -1,6 +1,8 @@ -# Submitter +:::note In-progress -This section is still in progress, please see [here](https://pkg.go.dev/github.com/synapsecns/sanguine/ethergo/submitter#section-readme) for details. +Please see the [Go Submitter documentation page](https://pkg.go.dev/github.com/synapsecns/sanguine/ethergo/submitter#section-readme) for more details. + +::: # Ethergo Submitter diff --git a/docs/bridge/docs/Services/Observability.md b/docs/bridge/docs/Services/05-Observability.md similarity index 99% rename from docs/bridge/docs/Services/Observability.md rename to docs/bridge/docs/Services/05-Observability.md index 3a9fb2fadd..69466e087f 100644 --- a/docs/bridge/docs/Services/Observability.md +++ b/docs/bridge/docs/Services/05-Observability.md @@ -1,3 +1,5 @@ +# Observability + All off-chain systems are by default observable and configured through the [metrics](https://pkg.go.dev/github.com/synapsecns/sanguine/core/metrics#section-readme) package. The observability stack is built around [open telemetry](https://opentelemetry.io/) with metrics also being exported using this standard. "Metrics" themselves are divided into 3 different types of metrics: diff --git a/docs/bridge/docs/Services/index.md b/docs/bridge/docs/Services/index.md index 42087cd3f5..548b3cb887 100644 --- a/docs/bridge/docs/Services/index.md +++ b/docs/bridge/docs/Services/index.md @@ -1,4 +1,8 @@ -# Essential Tools +--- +sidebar_position: 5 +--- + +# Services Synapse offers a number of bolt-on services for reliability and ease-of-use. diff --git a/docs/bridge/docs/Support/Transaction-Support.md b/docs/bridge/docs/Support/Transaction-Support.md new file mode 100644 index 0000000000..5ebf4ccbb9 --- /dev/null +++ b/docs/bridge/docs/Support/Transaction-Support.md @@ -0,0 +1,51 @@ +# Transaction Support FAQ + +## What does a Bridge transaction look like? + +After submitting and signing a transaction from your wallet, gas fees are collected, and the transaction is sent to the origin chain router. Once accepted, the bridged asset is removed from your portfolio, and a progress bar shows the estimated confirmation time. + +Once confirmed on the destination chain, the asset is added to your portfolio, and destination hash is available from the progress menu dropdown. The transaction appears as part of your history in the Activity tab once it is index by the Synapse Explorer. + +Gas token airdrops and rebates are delivered to your wallet automatically. However, only bridgeable assets are shown in your Synapse portfolio. + +## Did my transaction initiate? + +Transactions that do not initiate on the origin chain return an error message. Your assets will remain in your portfolio, under your control. + +In the event that your transaction does not initiate, double check that you have sufficient funds to send, and to cover gas fees, and you can safely try again. + +## My transaction failed to initiate after several tries + +Occasionally, technical issues or a high volume of activity on the origin chain may prevent new transactions from being accepted. + +In most cases, these issues safely resolve within 30-60 minutes. Activity levels can be found on native block explorers (e.g the [Etherscan gas tracker](https://etherscan.io/gastracker)). + +You can also adjust your wallet’s gas settings to make transactions more likely to be accepted during times of peak activity. + +## Why is my transaction taking so long? +Synapse time estimates are based on destination block times. Occasionally, a transaction may post to a later block than expected. + +Block explorer links in the progress dropdown menu can confirm whether a confirmation on-chain but not yet received by Synapse. + +## My transaction failed to complete + +Transactions that fail to complete are not lost, and are manually addressed by the Synapse support team. You can reach Support via the [Synapse Discord channel](https://discord.com/invite/synapseprotocol) at any time. + +:::note For DeFi Kingdoms + +NFT transactions can take twice as long as tokens. Contact Support if your transaction has been pending for two hours or more. + +::: + +## I received a different asset than expected +In the event of an sudden increase in slippage, Synapse will deliver the intermediate asset sent to the destination chain instead of swapping it for an unexpected loss. + +This asset appears in your portfolio and can be safely [swapped](https://synapseprotocol.com/swap) for the asset of your choice on the destination chain. + +## Did I receive my rebate or gas airdrop? +While rebates and airdrops appear in your wallet automatically, only bridgeable assets are shown in your Synapse portfolio. + +If you don’t see an asset you should have received, first check your wallet while connected to the destination chain for your bridge transaction. + +## Help! +Don’t panic! Contact Synapse Support on Discord to answer any other questions you might have. diff --git a/docs/bridge/docs/Support/index.md b/docs/bridge/docs/Support/index.md index 83efd9734c..12ad2e4940 100644 --- a/docs/bridge/docs/Support/index.md +++ b/docs/bridge/docs/Support/index.md @@ -1,4 +1,4 @@ -# Community & Support +# Support Connect with other developers and the Synapse team @@ -6,3 +6,7 @@ Connect with other developers and the Synapse team * **[Twitter](https://twitter.com/SynapseProtocol)** * **[Telegram](https://t.me/synapseprotocol)** * **[Forum](https://forum.synapseprotocol.com/)** + +## Frequently Asked Questions + +* [Transaction Support FAQ](Transaction-Support) diff --git a/docs/bridge/docs/About/index.md b/docs/bridge/docs/index.md similarity index 96% rename from docs/bridge/docs/About/index.md rename to docs/bridge/docs/index.md index b54c238cd1..bec822acaa 100644 --- a/docs/bridge/docs/About/index.md +++ b/docs/bridge/docs/index.md @@ -1,3 +1,8 @@ +--- +sidebar_position: 0 +title: About +--- + # Use Synapse Synapse is an Interchain Programming Interface. Developers read and write interchain data with Synapse, which has settled $50B in transactions between 2M+ users, and generated $30M+ in fees [[source](https://explorer.synapseprotol.com)]. @@ -7,7 +12,7 @@ Synapse is an Interchain Programming Interface. Developers read and write interc _Description of top benefits Synapse brings to developers and users._ -## Get started +## Developer Guide * **[Send and receive interchain data](#)** * **[On-chain swaps](#)** @@ -36,7 +41,7 @@ Synapse offers several of routers for different transaction types. * **[CCTP](#)** – Native router for USDC transactions. * **[RFQ](#)** – Fast router that allows on-chain agents to bid on interchain delivery. -## Essential Tools +## Essential Services Bolt-on services for reliability and ease-of-use: diff --git a/docs/bridge/src/css/custom.css b/docs/bridge/src/css/custom.css index 0fe3c30a8e..902525a815 100644 --- a/docs/bridge/src/css/custom.css +++ b/docs/bridge/src/css/custom.css @@ -37,6 +37,21 @@ --ifm-color-primary-lightest: hsl(285deg 100% 59%); --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); + /* --ifm-color-gray-1000: hsl(285deg 100% 0%); */ + /* --ifm-color-gray-900: hsl(285deg 100% 10%); */ + /* --ifm-color-gray-800: hsl(285deg 100% 20%); */ + --ifm-color-gray-700: hsl(240deg 20% 20%); + /* --ifm-color-gray-600: hsl(285deg 100% 40%); */ + /* --ifm-color-gray-500: hsl(285deg 100% 50%); */ + /* --ifm-color-gray-400: hsl(285deg 100% 60%); */ + /* --ifm-color-gray-300: hsl(285deg 100% 70%); */ + /* --ifm-color-gray-200: hsl(285deg 100% 80%); */ + /* --ifm-color-gray-100: hsl(285deg 100% 90%); */ + /* --ifm-color-gray-0: hsl(285deg 100% 100%); */ + + --ifm-background-surface-color: hsl(240deg 25% 15%); + --ifm-table-stripe-background: hsl(240deg 25% 10%) !important; + --synapse-neutral: hsl(285deg 40% 12.5%); --synapse-neutral-secondary: hsl(285deg 40% 25%); @@ -47,13 +62,18 @@ } h1 { font-weight: 400 } + h2 { font-weight: 600; border-top: 1px solid hsl(285deg 20% 50% / 20%); margin-top: 1.5em; padding-top: 1em; } -h3 { font-size: 1.2rem } + +h3 { + font-size: 1.2rem; + margin: 1.5rem 0 .75rem 0; +} ol, ul { margin-bottom: 1.5em } ol a, ul a { font-weight: 500 } @@ -66,4 +86,10 @@ ol a, ul a { font-weight: 500 } .theme-admonition-tip { background: var(--synapse-green); border-color: var(--synapse-green-secondary); -} \ No newline at end of file +} + +table thead tr { + text-align: left; + border: none; +} + diff --git a/docs/bridge/src/pages/index.tsx b/docs/bridge/src/pages/index.tsx index efa8b87d98..18245597b8 100644 --- a/docs/bridge/src/pages/index.tsx +++ b/docs/bridge/src/pages/index.tsx @@ -1,7 +1,7 @@ // import clsx from 'clsx'; // import Link from '@docusaurus/Link'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext' -import Layout from '@theme/Layout' +// import useDocusaurusContext from '@docusaurus/useDocusaurusContext' +// import Layout from '@theme/Layout' // import HomepageFeatures from '@site/src/components/HomepageFeatures' // import Heading from '@theme/Heading' import { Redirect } from 'react-router-dom' @@ -27,20 +27,22 @@ import { Redirect } from 'react-router-dom' // ) // } -export default () => { - const { siteConfig } = useDocusaurusContext() - // TODO: a homepage - // for now, just disable entirely: https://v1.docusaurus.io/docs/en/site-creation#docs-landing-page - return ( - - - {/* -
- -
*/} -
- ) -} +// export default () => { +// const { siteConfig } = useDocusaurusContext() +// // TODO: a homepage +// // for now, just disable entirely: https://v1.docusaurus.io/docs/en/site-creation#docs-landing-page +// return ( +// +// +// {/* +//
+// +//
*/} +//
+// ) +// } + +export default () => From 81ea30d9628c9bb1c2639fb8145131e7208b5009 Mon Sep 17 00:00:00 2001 From: Lawson Kight Date: Fri, 20 Sep 2024 16:44:11 -0700 Subject: [PATCH 09/20] WIP: RFQ Relayer doc --- docs/bridge/docs/Contracts/05-RFQ.mdx | 6 +- docs/bridge/docs/Routers/CCTP/index.md | 4 +- .../RFQ/{Contracts.md => MOVED_Contracts.md} | 16 +- .../docs/Routers/RFQ/Relayer/Relayer.md | 142 ++++++++++-------- docs/bridge/docs/Routers/RFQ/index.md | 80 ++++++++-- docs/bridge/src/css/custom.css | 1 - 6 files changed, 164 insertions(+), 85 deletions(-) rename docs/bridge/docs/Routers/RFQ/{Contracts.md => MOVED_Contracts.md} (80%) diff --git a/docs/bridge/docs/Contracts/05-RFQ.mdx b/docs/bridge/docs/Contracts/05-RFQ.mdx index de20ff076a..9af9032768 100644 --- a/docs/bridge/docs/Contracts/05-RFQ.mdx +++ b/docs/bridge/docs/Contracts/05-RFQ.mdx @@ -2,8 +2,10 @@ **Address**: `0x00cD000000003f7F682BE4813200893d4e690000` -| Chain | Address | -| -------- | ------------------------------------------------------------------------------------------------------------------------------------ | +RFQ contract source code can be found [here](https://github.com/synapsecns/sanguine/tree/master/packages/contracts-rfq), along with generated documentation [here](https://vercel-rfq-docs.vercel.app/contracts/FastBridge.sol/contract.FastBridge.html). + +| Chain | Address | +| -------- | ------- | | Arbitrum | `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://arbiscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | | Base | `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://basescan.org/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | | Ethereum | `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://etherscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | diff --git a/docs/bridge/docs/Routers/CCTP/index.md b/docs/bridge/docs/Routers/CCTP/index.md index 13b0fe3f4d..5fa025e7ba 100644 --- a/docs/bridge/docs/Routers/CCTP/index.md +++ b/docs/bridge/docs/Routers/CCTP/index.md @@ -18,11 +18,11 @@ As a modular component of [Synapse Router](../Synapse-Router), CCTP can be confi ### Relayer -Go application which uses on-chain events with off-chain message state to process transactions. CCTP Relayer can be run by anyone, and is easily observable. +A Golang application which pairs on-chain events with stored message states to process transactions. A CCTP Relayer can be run by anyone, and is easily observable. ## Behavior -CCTP Relayer polls for new transactions and and [message state](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageState) updates from CCTP contracts on-chain, which are stored in an off-chain database. +CCTP Relayer polls for new transactions and and [message state](https://pkg.go.dev/github.com/synapsecns/sanguine/services/cctp-relayer@v0.10.0/types#MessageState) updates from CCTP contracts on-chain, to store in an off-chain database. Successful attestations fetched from the [Circle API](https://developers.circle.com/stablecoin/reference) are submitted to the destination CCTP contract, and marked as `Complete` once a transaction receipt is received. diff --git a/docs/bridge/docs/Routers/RFQ/Contracts.md b/docs/bridge/docs/Routers/RFQ/MOVED_Contracts.md similarity index 80% rename from docs/bridge/docs/Routers/RFQ/Contracts.md rename to docs/bridge/docs/Routers/RFQ/MOVED_Contracts.md index a5b0947942..c9414f575a 100644 --- a/docs/bridge/docs/Routers/RFQ/Contracts.md +++ b/docs/bridge/docs/Routers/RFQ/MOVED_Contracts.md @@ -4,14 +4,14 @@ The Synapse RFQ contract source code can be found [here](https://github.com/syna | Chain | Address | | -------- | -------------------------------------------------------------------------------------------------------------------------------- | -| Arbitrum | [0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E](https://arbiscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | -| Base | [0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E](https://basescan.org/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | -| Ethereum | [0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E](https://etherscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | -| Optimism | [0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E](https://optimistic.etherscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | -| Scroll | [0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E](https://scrollscan.com/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | -| Linea | [0x34F52752975222d5994C206cE08C1d5B329f24dD](https://lineascan.build/address/0x34F52752975222d5994C206cE08C1d5B329f24dD) | -| BNB Chain| [0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E](https://bscscan.com/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | -| Blast | [0x34F52752975222d5994C206cE08C1d5B329f24dD](https://blastscan.io/address/0x34F52752975222d5994C206cE08C1d5B329f24dD) | +| Arbitrum | `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://arbiscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | +| Base | `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://basescan.org/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | +| Ethereum | `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://etherscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | +| Optimism | `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://optimistic.etherscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | +| Scroll | `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://scrollscan.com/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | +| Linea | `0x34F52752975222d5994C206cE08C1d5B329f24dD` [↗](https://lineascan.build/address/0x34F52752975222d5994C206cE08C1d5B329f24dD) | +| BNB Chain| `0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E` [↗](https://bscscan.com/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) | +| Blast | `0x34F52752975222d5994C206cE08C1d5B329f24dD` [↗](https://blastscan.io/address/0x34F52752975222d5994C206cE08C1d5B329f24dD) | ### On-Chain Architecture & Transaction Flow diff --git a/docs/bridge/docs/Routers/RFQ/Relayer/Relayer.md b/docs/bridge/docs/Routers/RFQ/Relayer/Relayer.md index 88a6c72665..203f35031d 100644 --- a/docs/bridge/docs/Routers/RFQ/Relayer/Relayer.md +++ b/docs/bridge/docs/Routers/RFQ/Relayer/Relayer.md @@ -4,80 +4,112 @@ sidebar_label: Relayer --- :::note -Relayers must be whitelisted in order to fill bridgeRequests. +Relayers must be whitelisted in order to fulfill bridge requests. ::: -At a high level, the canonical implementation of the relayer has 3 different responsibilities. +## Architecture -- **Quoting** - Keep track of balances on each chain as well as in-flight funds and continuously post-quotes with these balances using the config to adjust quotes to the solvers specifications and posting to the API. -- **Relaying -** Fulfill users [BridgeRequests](https://vercel-rfq-docs.vercel.app/contracts/interfaces/IFastBridge.sol/interface.IFastBridge.html#bridgerequested) by relaying their funds on-chain. Once eligible, claim the users funds on the origin chain. -- **Rebalancing -** In order to handle the complexity of user flows, the Relayer provides an interface that allows funds to be rebalanced. This allows RFQ to be reflexive to cases where flows are mono-directional. +The RFQ Relayer is a Golang application which pairs on-chain events with stored message states to process transactions. -## Architecture +The canonical RFQ Relayer handles three event loops: -The relayer is a Golang application that polls for events on chain and uses a combo state (db status) and event (on-chain logs) driven architecture to process transactions. The relayer has 3 different event loops going at any given time, specified above and elaborated on below: +| Task | Description | +|-----------|-------------| +| **Quote** | Track on-chain and in-flight balances, and continuously post quotes with these balances. Adjust quotes accordiing to the solver’s configurations and update the API. +| **Relay** | Fulfill [bridge requests](https://vercel-rfq-docs.vercel.app/contracts/interfaces/IFastBridge.sol/interface.IFastBridge.html#bridgerequested). Once eligible, claim user funds from the origin chain. +| **Rebalance** | For cases where flows are mono-directional, the Relayer provides an interface for rebalancing funds. -### Quoting -The quoting loop is comparitively simple and updates the api on each route it supports. Quotes are posted using the following formula: +### Quote +The quote loop is relatively simple and updates the [API](../API) on each route it supports. Quotes are posted using the following requirements: - - **Do not quote above available balance**: Available balance is determined by `balance on chain - in-flight funds`. If the token is the gas token, then the minimum gas token amount is subtracted. The relayer will also not post quotes below the `min_quote_amount` specified in the config. - - **Quote offset**: The quote offset is a percentage of the price of the token. This is used to ensure that the relayer is profitable. The quote offset is added to the price of the token to determine the quote price. - - **Fee**: The fee is determined by the `fixed_fee_multiplier` in the config. This is multiplied by the `origin_gas_estimate` and `destination_gas_estimate` to determine the fee. This fee is added to the quote price. + * **Quote at or below available balance**: Available balance is determined by `balanceOnChain - inFlightFunds`. + * If a token is the gas token, `minimumGasTokenAmount` is also subtracted. + * Abouts below `min_quote_amount` specified in the config will not post. + * **Quote offset**: A percentage of the token price, used to ensure the relayer is profitable. Quote offset is added to the token price to determine the quote. + * **Fee**: `fixed_fee_multiplier` in the config is multiplied by the `origin_gas_estimate` and `destination_gas_estimate` to determine the fee, and added to the quote price. -### Rebalancing +### Relay -Automated rebalancing is configurable by token and currently supports CCTP routes as well as native bridging in the case of Scroll. Rebalancing evaluation follows this logic on every `rebalance_interval`: +The relay loop is responsible for relaying funds on-chain. It listens to on-chain events and database updates to move transactions through the following states: -- For every supported rebalance method, compute the 'total balance' of each token as the sum of all balances across chains that support the given rebalance method. -- For every supported token, compute the 'maintenance threshold' as the product of the `maintenance_balance_pct` and the 'total balance'. A token is eligible for rebalancing if the current balance is below the 'maintenance threshold'. +| State | Description +|-|- +| `Seen` | [`BridgeRequested`](https://vercel-rfq-docs.vercel.app/contracts/interfaces/IFastBridge.sol/interface.IFastBridge.html#bridgerequested) event stored in the db. +| `WillNotProcess` | [`BridgeRequested`](https://vercel-rfq-docs.vercel.app/contracts/interfaces/IFastBridge.sol/interface.IFastBridge.html#bridgerequested) event is invalid +| `NotEnoughInventory` | Retry later +| `CommittedPending` | All checks pass, waiting for transaction to finalize +| `CommittedConfirmed` | Transaction is finalized on-chain +| `RelayPending` | Called [`relay`](https://vercel-rfq-docs.vercel.app/contracts/FastBridge.sol/contract.FastBridge.html#relay) +| `RelayComplete` | Relay completed on-chain +| `ProvePosting` | Called [`prove`](https://vercel-rfq-docs.vercel.app/contracts/FastBridge.sol/contract.FastBridge.html#prove) +| `ClaimPending` | Called [`claim`](https://vercel-rfq-docs.vercel.app/contracts/FastBridge.sol/contract.FastBridge.html#claim) +| `ClaimComplete` | Dispute period expired, funds received. -To limit the amount of inventory that is inflight, only one rebalance can be pending at a time for each token. As such, we select the 'best' rebalance candidate as the rebalance with the largest delta between origin balance and destination balance. +### Rebalance -The final step in evaluating a rebalance is determining the rebalance amount: +Automated rebalancing is configurable by token and currently supports CCTP routes as well as native bridging on Scroll. Rebalancing evaluation follows this logic every `rebalance_interval`: -- Arrive at an initial rebalance amount by computing the delta between current balance and the initial threshold on origin. -- Check if this rebalance amount is too much, i.e. it would take the destination balance above its initial threshold. If so, clip the rebalance amount to target the destination initial threshold. -- Filter the rebalance amount by the configured min and max. +For each supported rebalance method, calculate the `total_balance` of each token across the chains that support that rebalance method, and which tokens have a balance below `total_balance * maintenance_balance_pct`. + +:::note + +To limit in-flight inventory, only one rebalance can be pending at a time for each token. We select the 'best' rebalance candidate as the rebalance with the largest delta between origin and destination balance. + +::: -An example of this process is given below: +The rebalance amount is the smaller of the maximum rebalance amount on origin, and minimum rebalance amount on destination, clamped to the `min` and `max` values in the configuration file. -We are dealing with chains 1, 2, and 3. Chains 1 and 2 support USDC with CCTP, and chain 3 supports USDC but does not support CCTP. Each chain has a `maintenance_pct` of 20%, while chains 1 and 2 have `initial_pct` of 40% and chain 3 has 20%. Assume chain 1 has a balance of 100 USDC, chain 2 has 900 USDC, and chain 3 has 2000 USDC. +#### Example -The system would trigger a rebalance from chain 2 to chain 1, since the total balance of CCTP-supported chains is 1000 USDC, and chain 1 is below the 20% maintenance threshold. Chain 3 is not considered for rebalance since it does not support CCTP. +| # | CCTP | USDC | `maintenence_pct` | `initial_pct` +|-|-|-|-|- +| 1 | Yes | 20% | 40% | 100 USDC +| 2 | Yes | 20% | 40% | 900 USDC +| 3 | No | 20% | 40% | 2000 USDC -The rebalance amount would be initially be targeted as 600 since this would take chain 2 to its 40% initial threshold. However, since chain 1 only needs 300 to reach its initial 40% threshold, the rebalance amount is clipped at 300. + -So, the final result is a rebalance of 300 USDC from chain 2 to chain 1, leading to chain 1 having 400 USDC, chain 2 having 600 USDC, and chain 3 having 2000 USDC. +The total balance of CCTP-supported chains is `1000 USDC`. Since chain 1, with 10% of the total inventory, is below the 20% maintenance threshold, the system triggers a rebalance from Chain 2 to Chain 1. +Chain 3 does not support CCTP, and is not considered for rebalance. -1. At `rebalance_interval`, check the `maintenance_balance_pct` of each token on each chain and compare it to the current balance. If the balance is below the `maintenance_balance_pct`, continue +The maximum rebalance amount is `600 USDC` which takes chain 2 to its 40% initial threshold + +`300 USDC` is sent from chain 2 to chain 1 is, which is the minimum required to reach chain 1's initial 40% threshold. + + +:::note Scroll -### Relaying +Rebalancing for certain native bridges (e.g Scroll) is supported. It works slightly differently as flows are only supported between Scroll and Mainnet. -The relaying loop is the most complex and is responsible for relaying funds on-chain. The relayer listens to events on-chain and status updates in the database to take move transactions through the states. The states are as follows: +At a high level, the rebalancer checks inventory on Scroll versus other chains, and if imbalanced, initiates a bridge to mainnet, allowing the CCTP relayer to rebalance funds where needed. -1. An on-chain transaction emits the event [`BridgeRequested`](https://vercel-rfq-docs.vercel.app/contracts/interfaces/IFastBridge.sol/interface.IFastBridge.html#bridgerequested). We store this event in the db with the status [`Seen`](https://pkg.go.dev/github.com/synapsecns/sanguine/services/rfq/relayer/reldb#Seen). -1. Check if the request is valid, If not, it is marked as [`WillNotProcess`](https://pkg.go.dev/github.com/synapsecns/sanguine/services/rfq/relayer/reldb#WillNotProcess) -1. Check if there's enough inventory, if not mark as [`NotEnoughInventory`](https://pkg.go.dev/github.com/synapsecns/sanguine/services/rfq/relayer/reldb#NotEnoughInventory) and try again later. -1. If these checks pass, it's stored as [`CommittedPending`](https://pkg.go.dev/github.com/synapsecns/sanguine/services/rfq/relayer/reldb#CommittedPending). This will automatically reduce the next quote amount posted to the api since the relayers liquidity has been committed. -1. Check the chain to see if transaction is finalized yet, if not wait until it is. -1. Once the transaction is finalized on chain, update the status to [`CommitedConfirmed`](https://pkg.go.dev/github.com/synapsecns/sanguine/services/rfq/relayer/reldb#CommitedConfirmed). This means the transaction is finalized on chain and we can now relay it to the destination chain. -1. Call [`relay`](https://vercel-rfq-docs.vercel.app/contracts/FastBridge.sol/contract.FastBridge.html#relay) on the contract to relay the transaction and update the status to [`RelayPending`](https://pkg.go.dev/github.com/synapsecns/sanguine/services/rfq/relayer/reldb#RelayPending) -1. Listen for the relay in the logs. Once we get it we mark the transaction as [`RelayComplete`](https://pkg.go.dev/github.com/synapsecns/sanguine/services/rfq/relayer/reldb#RelayComplete) -1. Call [`Prove()`](https://vercel-rfq-docs.vercel.app/contracts/FastBridge.sol/contract.FastBridge.html#prove) on the contract to prove that we relayed the transaction. Once this is done, we mark the transaction as [`ProvePosting`](https://pkg.go.dev/github.com/synapsecns/sanguine/services/rfq/relayer/reldb#ProvePosting) -1. Wait for the dispute period to expire. Once it does call [`claim`](https://vercel-rfq-docs.vercel.app/contracts/FastBridge.sol/contract.FastBridge.html#claim) mark the transaction as [`ClaimPending`](https://pkg.go.dev/github.com/synapsecns/sanguine/services/rfq/relayer/reldb#ClaimPending) -1. Wait for the dispute period to expire. Once it does mark the transaction as [`ClaimComplete`](https://pkg.go.dev/github.com/synapsecns/sanguine/services/rfq/relayer/reldb#ClaimComplete) +::: ## Running a Relayer -### Building From Source +### Configure + +To run an RFQ Relayer, first create your [YAML configuration file](#configuration-file), Which is required as part of the `run` command. + +### From Docker + +Run the Docker [image](https://github.com/synapsecns/sanguine/pkgs/container/sanguine%2Frfq-relayer) along with the path to your [YAML configuration file](#configuration-file). + +1. `docker run ghcr.io/synapsecns/sanguine/rfq-relayer:latest --config /path/to/config` + +### From Source + +:::note Requires Go 1.21 or higher + +Not generally recommended for end-users. + +::: To build the relayer from source, you will need to have Go installed. You can install Go by following the instructions [here](https://golang.org/doc/install). Once you have Go installed, you can build the relayer by running the following commands: @@ -85,14 +117,6 @@ To build the relayer from source, you will need to have Go installed. You can in 2. `cd sanguine/services/rfq/relayer` 3. `go run main.go --config /path/to/config.yaml` -### Running the Docker Image - -The relayer can also be run with docker. To do this, you will need to pull the [docker image](https://github.com/synapsecns/sanguine/pkgs/container/sanguine%2Frfq-relayer) and run it with the config file: - -```bash -docker run ghcr.io/synapsecns/sanguine/rfq-relayer:latest --config /path/to/config -``` - ### Withdrawals The `POST /withdraw` endpoint is exposed to allow for withdrawing from the relayer wallet without having to deal with the private key directly. This can be used for manual rebalancing, if desired. To use this feature, the following config values must be set: @@ -111,7 +135,7 @@ go run main.go withdraw --relayer-url https://localhost:8081 --chain-id 1 --amou Be sure to sub in your respective `to` address! -### Configuration +## Configuration The relayer is configured with a yaml file. The following is an example configuration: @@ -231,22 +255,22 @@ The relayer is configured with a yaml file. The following is an example configur - - `submitter_config` - This is covered [here](../../Services/Submitter#Observability). At a high level this controls gas parameters used for on-chain transactions. + - `submitter_config` - This is covered [here](/docs/Services/Submitter#Observability). At a high level this controls gas parameters used for on-chain transactions. - `database` - The database settings for the API backend. A database is required to store quotes and other information. Using SQLite with a dsn set to a `/tmp/` directory is recommended for development. - `type` - the database driver to use, can be `mysql` or `sqlite`. - `dsn` - the dsn of your database. If using sqlite, this can be a path, if using mysql please see [here](https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration.html) for more information. - `screener_api_url` (optional) - Please see [here](https://github.com/synapsecns/sanguine/tree/master/contrib/screener-api#screening-api) for an api spec, this is used descision on wether to bridge to given addresses. - `rfq_url` - URL of the rfq api, please see the [API](../API#api-urls) page for details and the mainnet/testnet urls. - - `omnirpc_url` - URL of omnirpc to use, Please see [here](../../Services/Omnirpc) for details on running an omnirpc instance. + - `omnirpc_url` - URL of omnirpc to use, Please see [here](/docs/Services/Omnirpc) for details on running an omnirpc instance. - `rebalance_interval` - How often to rebalance, formatted as (s = seconds, m = minutes, h = hours) - `relayer_api_port` - the relayer api is used to control the relayer. This api should be secured/not public. - `base_chain_config`: Base chain config is the default config applied for each chain if the other chains do not override it. This is covered in the chains section. - `enable_guard` - Run a guard on the same instance. - `submit_single_quotes` - Wether to use the batch endpoint for posting quotes to the api. This can be useful for debugging. - `chains` - each chain has a different config that overrides base_chain_config. Here are the parameters for each chain - - `rfq_address` - the address of the rfq contract on this chain. These addresses are available [here](../Contracts.md). + - `rfq_address` - the address of the rfq contract on this chain. These addresses are available [here](/docs/Contracts/RFQ). - - `synapse_cctp_address` (optional) - this is only applicable if **rebalance_method** is set to synapse. This is the address of the CCTP contract available [here](../../CCTP/Contracts). + - `synapse_cctp_address` (optional) - this is only applicable if **rebalance_method** is set to synapse. This is the address of the CCTP contract available [here](/docs/Contracts/CCTP). - `token_messenger_address` (optional) - this is only applicable if **rebalance_method** is set to cctp. Tells the relayer to use the token messenger instead of synapse.