Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Docs/lk exploration [SLT-170] #3141

Merged
merged 46 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
244e77f
update for eslint
lawsonkight Sep 17, 2024
eebb57c
eslint fix
lawsonkight Sep 17, 2024
1218b20
top-level content
lawsonkight Sep 17, 2024
32a85ac
bugfix: remove descriptions from Community links
lawsonkight Sep 17, 2024
8a6eb0d
eslint fix
lawsonkight Sep 18, 2024
866ebaa
folder organization
lawsonkight Sep 18, 2024
b9f11b6
wip: sidebar organization
lawsonkight Sep 18, 2024
6cb652a
cctp router docs refactor
lawsonkight Sep 20, 2024
81ea30d
WIP: RFQ Relayer doc
lawsonkight Sep 20, 2024
2330146
refactor of CCTP and RFQ docs pages
lawsonkight Sep 23, 2024
22855ca
fix build errors
lawsonkight Sep 23, 2024
e3a65c5
bugfix: css dark mode specificity
lawsonkight Sep 23, 2024
cb1118d
bugfix: wrong Redirect import
lawsonkight Sep 23, 2024
ab4a354
Fixes build issue
abtestingalpha Sep 24, 2024
186f0a9
Bridge SDK and Synapse Router
lawsonkight Sep 24, 2024
68ec346
fix broken links
lawsonkight Sep 24, 2024
56bd9c6
rename Bridge SDK Examples page
lawsonkight Sep 25, 2024
fe24140
rebuild yarn.lock
lawsonkight Sep 25, 2024
9eea390
Merge branch 'master' into docs/lk-exploration
abtestingalpha Sep 25, 2024
3d12d5a
Upgrades deps
abtestingalpha Sep 25, 2024
ef6e18a
bridge sdk animation
lawsonkight Sep 25, 2024
b03684b
move sdk animation to bridge page
lawsonkight Sep 25, 2024
32ac668
bugfix: svg initial values
lawsonkight Sep 26, 2024
a18c6b6
bugfix: remove css nesting
lawsonkight Sep 26, 2024
8a66ffd
intermediate token style
lawsonkight Sep 26, 2024
4c09296
wip: image buildout
lawsonkight Sep 26, 2024
4ebe307
additional router graphics
lawsonkight Sep 26, 2024
d07bf03
faux bridge svg
lawsonkight Sep 26, 2024
ecb3221
widget page
lawsonkight Sep 27, 2024
1f2553a
brand assets page
lawsonkight Sep 27, 2024
42629e9
move Bridge pages to Developers folder
lawsonkight Sep 27, 2024
e7b0e70
animated logo v1
lawsonkight Sep 27, 2024
8eca8ec
interactive animated logo
lawsonkight Sep 27, 2024
dae67c1
Supported routes
lawsonkight Sep 28, 2024
a4674eb
bugfix: React attribute names
lawsonkight Sep 28, 2024
33d8f99
move Supported Routes page
lawsonkight Sep 28, 2024
00d103b
bugfix: svg animation id collision
lawsonkight Sep 28, 2024
3b0da49
better css variable overrides
lawsonkight Sep 28, 2024
ceb8923
fix build errors
lawsonkight Sep 28, 2024
2993189
footer color
lawsonkight Sep 28, 2024
e23965e
small nits
Defi-Moses Sep 30, 2024
9d159ba
respond to feedback
lawsonkight Oct 1, 2024
d7b693c
Update CCTP Relayer description
lawsonkight Oct 2, 2024
bc0bf4c
cctp-typo
Defi-Moses Oct 2, 2024
9e9b993
Merge branch 'master' into docs/lk-exploration
abtestingalpha Oct 2, 2024
b3b7082
Fix constants v
abtestingalpha Oct 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions docs/bridge/docs/CCTP/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"label": "CCTP",
"position": 3,
"link": {
"type": "doc",
"id": "CCTP/Overview"
}
"label": "CCTP"
}
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
7 changes: 7 additions & 0 deletions docs/bridge/docs/Routers/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Routers

:::tip[TODO]
* Move router pages into this folder
* Move 'Observability' under 'Services'
* Rename 'Services' to ' 'Essential Tools'
:::
4 changes: 4 additions & 0 deletions docs/bridge/docs/Welcome/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"position": 0,
"label": "Overview"
}
49 changes: 49 additions & 0 deletions docs/bridge/docs/Welcome/index.md
Original file line number Diff line number Diff line change
@@ -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)].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the typo in the source link URL

The URL in the source link has a typo: "https://explorer.synapseprotol.com" should be "https://explorer.synapseprotocol.com".

Apply this fix:

-... generated $30M+ in fees [[source](https://explorer.synapseprotol.com)].
+... generated $30M+ in fees [[source](https://explorer.synapseprotocol.com)].
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
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)].
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.synapseprotocol.com)].

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid repetition of 'Synapse' in the introduction

The heading 'Use Synapse' is immediately followed by 'Synapse is an Interchain Programming Interface...', resulting in 'Use Synapse Synapse is...'. Consider rephrasing to improve readability.

Tools
LanguageTool

[duplication] ~1-~1: Possible typo: you repeated a word
Context: # Use Synapse Synapse is an Interchain Programming Interface....

(ENGLISH_WORD_REPEAT_RULE)


## Why Synapse?
_Description of top benefits Synapse brings to developers and users._
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace placeholder text with actual content

The line 'Description of top benefits Synapse brings to developers and users.' appears to be a placeholder. Please provide a meaningful description to inform users about the key benefits of Synapse.



## Get started
* **[Send and receive interchain data](#)**
* **[On-chain swaps](#)**
* **[Interchain swaps](#)**
* **[Upgrade to Synapse](#)**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace placeholder links with valid URLs or remove them

The links in "Get started", "Interchain Bridge", and "Routers" sections have empty URLs (#). Updating them to valid links or removing them will enhance user navigation and comply with Markdown best practices.

Also applies to: 20-22, 26-28

Tools
Markdownlint

9-9: null
No empty links

(MD042, no-empty-links)


10-10: null
No empty links

(MD042, no-empty-links)


11-11: null
No empty links

(MD042, no-empty-links)


12-12: null
No empty links

(MD042, no-empty-links)


:::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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the grammatical error in the sentence

The sentence 'Synapse offers several of routers for different transaction types.' contains an unnecessary 'of'. It should be 'Synapse offers several routers for different transaction types.'

Apply this fix:

-Synapse offers several of routers for different transaction types.
+Synapse offers several routers for different transaction types.
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Synapse offers several of routers for different transaction types.
Synapse offers several 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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarify the sentence to remove redundancy

The phrase 'Synapse transactions can be observed confirmed via the following methods:' is unclear. Consider revising it to remove redundancy and improve clarity.

Apply this fix:

Option 1:

-Synapse transactions can be observed confirmed via the following methods:
+Synapse transactions can be observed via the following methods:

Option 2:

-Synapse transactions can be observed confirmed via the following methods:
+Synapse transactions can be confirmed via the following methods:

Choose the option that best conveys the intended meaning.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Synapse transactions can be observed confirmed via the following methods:
Synapse transactions can be observed 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.
26 changes: 13 additions & 13 deletions docs/bridge/docs/rfq/API/sidebar.ts
Original file line number Diff line number Diff line change
@@ -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
94 changes: 51 additions & 43 deletions docs/bridge/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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 <id> 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 <id> 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/<your-docusaurus>
react: path.resolve('../../node_modules/react'),
function () {
return {
name: 'resolve-react',
configureWebpack() {
return {
resolve: {
alias: {
// assuming root node_modules is up from "./packages/<your-docusaurus>
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
56 changes: 42 additions & 14 deletions docs/bridge/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Comment on lines +24 to +25
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider moving text styling properties out of :root selector

The properties letter-spacing and line-height are defined within the :root selector, which is typically used for CSS variable declarations. It would be better practice to move these properties to a more appropriate selector, such as body, to ensure proper cascading and maintainability.

Apply this diff to move the properties:

:root {
  --ifm-color-primary: hsl(285deg 100% 35%);
  /* ... other variables ... */
-  letter-spacing: .0125em;
-  line-height: 1.7;
}

+body {
+  letter-spacing: .0125em;
+  line-height: 1.7;
+}

Committable suggestion was skipped due to low confidence.

}

/* 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);
}
37 changes: 17 additions & 20 deletions docs/bridge/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
Expand All @@ -18,30 +18,27 @@ function HomepageHeader() {
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="#">
<Link className="button button--secondary button--lg" to="#">
Docusaurus Tutorial - 5min ⏱️
</Link>
</div>
</div>
</header>
);
)
}

export default function Home(): JSX.Element {
const {siteConfig} = useDocusaurusContext();
export default () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name the default exported component for better debugging

Exporting an anonymous function can make debugging more difficult, as the component will appear as "Unknown" in React DevTools and stack traces. Naming the component enhances maintainability and eases debugging.

Apply this diff to name the exported component:

-export default () => {
+export default function Home() {
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export default () => {
export default function Home() {

const { siteConfig } = useDocusaurusContext()
// TODO: a homepage
// for now, just disable entirely: https://v1.docusaurus.io/docs/en/site-creation#docs-landing-page
return (
<Layout
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />">
<Redirect to={"/docs/CCTP/Overview"} />
description="Description will go into a meta tag in <head />"
>
<Redirect to={'/docs/Welcome'} />
{/*<HomepageHeader />*/}
<main>
{/*<HomepageFeatures />*/}
</main>
<main>{/*<HomepageFeatures />*/}</main>
</Layout>
);
)
}
Loading