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 43 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
19 changes: 19 additions & 0 deletions docs/bridge/docs/01-About/01-DAO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Synapse DAO
---

# Synapse DAO

Since launch of the Synapse Protocol, a number of governance initiatives have been put forward and voted on by the Synapse DAO.

## Governance Model

SYN holders with more than 100,000 SYN tokens can put forward proposals to be voted on by the DAO. SYN holders can vote using SYN on multiple chains, or delegate their votes to other token holders.

In order to be adopted by the DAO, a proposal must gather at least `50% + 1` of all votes and reach the minimum quorum of 5 million SYN tokens.

## Governance Components

* **[Forum](https://forum.synapseprotocol.com/)**: A Platform to post proposals for discussion before an official vote
* **[Snapshot](https://snapshot.org/#/synapseprotocol.eth)**: A decentralized governance platform for conducting official votes.
* **[Discord](https://discord.gg/synapseprotocol)**: Discussion channel for general Synapse matters
21 changes: 21 additions & 0 deletions docs/bridge/docs/01-About/02-Brand-Assets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Brand Assets

### [synapse-brand-assets.zip](/brand-assets/synapse-brand-assets.zip)
Comment on lines +1 to +3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Adjust heading level for consistency

The file structure looks good, but there's a minor issue with the heading levels. The download link is currently an h3, which doesn't follow the logical hierarchy.

Consider changing the heading level for the download link. Here's a suggested fix:

 # Brand Assets

-### [synapse-brand-assets.zip](/brand-assets/synapse-brand-assets.zip)
+## [Download All Assets](/brand-assets/synapse-brand-assets.zip)

This change maintains a logical heading structure and provides a clear call-to-action for users who want to download all assets at once.

📝 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
# Brand Assets
### [synapse-brand-assets.zip](/brand-assets/synapse-brand-assets.zip)
# Brand Assets
## [Download All Assets](/brand-assets/synapse-brand-assets.zip)
🧰 Tools
🪛 Markdownlint

3-3: Expected: h2; Actual: h3
Heading levels should only increment by one level at a time

(MD001, heading-increment)


## Logo

| Name | Image |
|----------------------------------------------------------------------|-
| [`synapse-logo-onLight.svg`](/brand-assets/synapse-logo-onLight.svg) | ![Synapse logo](/brand-assets/synapse-logo-onLight.svg)
| [`synapse-logo-onDark.svg`](/brand-assets/synapse-logo-onDark.svg) | ![Synapse logo](/brand-assets/synapse-logo-onDark.svg)
| [`synapse-logo-black.svg`](/brand-assets/synapse-logo-black.svg) | ![Synapse logo](/brand-assets/synapse-logo-black.svg)
| [`synapse-logo-white.svg`](/brand-assets/synapse-logo-white.svg) | ![Synapse logo](/brand-assets/synapse-logo-white.svg)

## Mark

| Name | Image |
|--------------------------------------------------------------------|-
| [`synapse-mark.svg`](/brand-assets/synapse-mark.svg) | ![Synapse logo](/brand-assets/synapse-mark.svg)
| [`synapse-mark-white.svg`](/brand-assets/synapse-mark-white.svg) | ![Synapse logo](/brand-assets/synapse-mark-white.svg)
| [`synapse-mark-black.svg`](/brand-assets/synapse-mark-black.svg) | ![Synapse logo](/brand-assets/synapse-mark-black.svg)
| [`synapse-border-mark.svg`](/brand-assets/synapse-border-mark.svg) | ![Synapse logo](/brand-assets/synapse-border-mark.svg)
7 changes: 7 additions & 0 deletions docs/bridge/docs/01-About/03-Routes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Routes from '@site/src/components/Routes'

# Chains & Tokens

This page contains a list of supported tokens, listed per-chain. For a given pair, use the [Synapse Bridge](https://synapseprotocol.com) to see if a route between them exists.

<Routes />
75 changes: 75 additions & 0 deletions docs/bridge/docs/01-About/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: About
---

import AnimatedLogo from '@site/src/components/AnimatedLogo'
import SVGBridge from '@site/src/components/SVGBridge'
import { BridgeFlow } from '@site/src/components/BridgeFlow'
import { CCTPFlow } from '@site/src/components/CCTPFlow'
import { RFQFlow } from '@site/src/components/RFQFlow'

<AnimatedLogo />

# 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: [Synapse Explorer analytics](https://explorer.synapseprotocol.com).

## Interchain Bridge

<figure>
<SVGBridge />
<figcaption>Synapse Bridge</figcaption>
</figure>

* [Overview](/docs/Bridge)
* [Bridge guide](/docs/Bridge#how-to-bridge)
<!-- * [Supported routes](/docs/Bridge#how-to-bridge) -->

## Developers

Embed or build a custom Bridge application.

* **[SDK](/docs/Bridge/SDK)** – Call Synapse Router functions from your frontend or backend application.
* **[REST API](/docs/Bridge/REST-API)** – Endpoints and example code
* **[Widget](/docs/Bridge/Widget)** – Embed a customized Synapse Bridge in your application.
Comment on lines +30 to +36
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Comprehensive developer resources with clear descriptions.

The section provides essential links and descriptions for developers to integrate Synapse into their applications, aligning well with the documentation improvement objectives.

Update the REST API link to point to the Swagger documentation as mentioned in the PR comments:

-* **[REST API](/docs/Bridge/REST-API)** – Endpoints and example code
+* **[REST API](https://api.synapseprotocol.com/api-docs)** – Comprehensive API documentation (Swagger)
📝 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
## Developers
Embed or build a custom Bridge application.
* **[SDK](/docs/Bridge/SDK)** Call Synapse Router functions from your frontend or backend application.
* **[REST API](/docs/Bridge/REST-API)**Endpoints and example code
* **[Widget](/docs/Bridge/Widget)** – Embed a customized Synapse Bridge in your application.
## Developers
Embed or build a custom Bridge application.
* **[SDK](/docs/Bridge/SDK)** Call Synapse Router functions from your frontend or backend application.
* **[REST API](https://api.synapseprotocol.com/api-docs)**Comprehensive API documentation (Swagger)
* **[Widget](/docs/Bridge/Widget)** – Embed a customized Synapse Bridge in your application.


## Synapse Routers

Synapse Router automatically determines the appropriate router for each Bridge transaction.

* **[Synapse Router](/docs/Routers/Synapse-Router)** – Returns and executes quotes for supported interchain transactions.
* **[CCTP](/docs/Routers/CCTP)** – Native router for USDC transactions.
* **[RFQ](/docs/Routers/RFQ)** – Relayers bid for the right to provide immediate delivery.

<figure id="flowGroup">
<figure>
<BridgeFlow />
<figcaption>Synapse Router &ndash; Mint and burn any token between chains</figcaption>
</figure>
<figure>
<CCTPFlow />
<figcaption>CCTP &ndash; Use Circle contracts to mint and burn native USDC</figcaption>
</figure>
<figure>
<RFQFlow />
<figcaption>RFQ &ndash; Take Immediate delivery from a destination relayer, who receives your origin chain assets on confirmation.</figcaption>
</figure>
</figure>

## 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.
222 changes: 222 additions & 0 deletions docs/bridge/docs/02-Bridge/01-SDK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
---
title: Bridge SDK
---

# Bridge SDK

The Synapse Bridge SDK is the easiest way to integrate cross-chain token & liquidity transfers into your application. It is fully isomorphic and can be used on both client and server sides.

The Synapse Bridge SDK is built on top of the [Synapse Router](/docs/Routers/Synapse-Router) contract.

### Use cases
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Adjust heading level for consistency

The heading "Use cases" is currently an h3 (###) but should be an h2 (##) to maintain proper document structure. This ensures a logical hierarchy of headings throughout the document.

🧰 Tools
🪛 Markdownlint

11-11: Expected: h2; Actual: h3
Heading levels should only increment by one level at a time

(MD001, heading-increment)


* Integrate your front-end application with the Synapse Bridge.
* Provide bridge liquidity.
* Perform cross-chain arbitrage.
* Integrate the Synapse Javascript SDK with your non-Javascript application.

## Install

:::note requires Node v16+

The SDK has only been fully tested on Node 16+ or greater. Earlier versions are not guaranteed to work.

:::

Requires either the `npx` or `yarn` package manager.

| Options
|-
| `npx install @synapsecns/sdk-router`
| `yarn install @synapsecns/sdk-router`

## Configure Ethers

The SDK package relies on the `@ethersproject` and `ethers` dependencies, installed from `npm`.

To begin constructing bridge-related transactions, first set up your environment wiht your providers, and format them, along with the `chainIds` you will be using, to set up a `SynapseSDK` instance.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typo in configuration instructions

There's a minor typo in the sentence. Change "wiht" to "with":

-To begin constructing bridge-related transactions, first set up your environment wiht your providers, and format them, along with the `chainIds` you will be using, to set up a `SynapseSDK` instance.
+To begin constructing bridge-related transactions, first set up your environment with your providers, and format them, along with the `chainIds` you will be using, to set up a `SynapseSDK` instance.
📝 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
To begin constructing bridge-related transactions, first set up your environment wiht your providers, and format them, along with the `chainIds` you will be using, to set up a `SynapseSDK` instance.
To begin constructing bridge-related transactions, first set up your environment with your providers, and format them, along with the `chainIds` you will be using, to set up a `SynapseSDK` instance.


#### Ethers v5

```js
//Set up providers (RPCs) for each chain desired
const arbitrumProvider: Provider = new ethers.providers.JsonRpcProvider(
'https://arb1.arbitrum.io/rpc'
)
const avalancheProvider: Provider = new ethers.providers.JsonRpcProvider(
'https://api.avax.network/ext/bc/C/rpc'
)

//Structure arguments properly
const chainIds = [42161, 43114]
const providers = [arbitrumProvider, avalancheProvider]

//Set up a SynapseSDK instance
const Synapse = new SynapseSDK(chainIds, providers)
```

#### Ethers v6

:::tip Ethers v6

Use of Ethers v6 requires the `@ethersproject/providers` dependency to be installed via `npm` or `yarn`:
* `npm install @ethersproject/providers@^5.7.2`
* `yarn add @ethersproject/providers@^5.7.2`

:::

```js
import { JsonRpcProvider } from '@ethersproject/providers'

//Set up providers (RPCs) for each chain desired
const arbitrumProvider: Provider = new JsonRpcProvider(
'https://arb1.arbitrum.io/rpc'
)
const avalancheProvider: Provider = new JsonRpcProvider(
'https://api.avax.network/ext/bc/C/rpc'
)

//Structure arguments properly
const chainIds = [42161, 43114]
const providers = [arbitrumProvider, avalancheProvider]

//Set up a SynapseSDK instance
const Synapse = new SynapseSDK(chainIds, providers)
```

## Functions

:::tip Query Data Type

`originQuery` and `destQuery`, returned by `bridgeQuote()` and required for `bridge()`, are [`Query`](https://synapserouter.gitbook.io/untitled/) objects, which contain:

* `swapAdapter`: (string): 0x address of the swap adapter.
* `tokenOut`: (string): 0x address of the outputted token on that chain.
* `minAmountOut`: (Ethers BigNumber): The min amount of value exiting the transaction.
* `deadline`: (Ethers BigNumber): The deadline for the potential transaction.
* `rawParams`: (string): 0x params for the potential transaction.

:::

### `bridgeQuote()`

Get all relevant information regarding a possible transaction.

#### Parameters

`bridgeQuote()` requires the following arguments:

* `fromChain` (number): Origin chain id.
* `toChain` (number): Destination chain id.
* `fromToken` (string): 0x token address on the origin chain.
* `toToken` (string): 0x token address on the destination chain.
* `amount` (Ethers BigNumber): The amount (with the correct amount of decimals specified by the token on the origin chain)
* `object` (three seperate args):
* `deadline` (Ethers BigNumber): Deadline for the transaction to be initiated on the origin chain, in seconds (optional)
* `originUserAddress` (string): Address of the user on the origin chain, optional, mandatory if a smart contract is going to initiate the bridge operation
* `excludedModules` (array): (optional) List of bridge modules to exclude from the result

#### Return value

`bridgeQuote` returns the following information

* `feeAmount` (Ethers BigNumber): The calculated amount of fee to be taken.
* `bridgeFee` (number): The percentage of fee to be taken.
* `maxAmountOut` (Ethers BigNumber): The maximum output amount resulting from the bridge transaction.
* `originQuery` (`Query`): The query to be executed on the origin chain.
* `destQuery` (`Query`): The query to be executed on the destination chain.

### `bridge()`

Use `bridgeQuote` to request a Bridge transaction

#### Parameters

* `toAddress` (number): The 0x wallet address on the destination chain.
* `routerAddress` (string): The 0x contract address on the origin chain of the bridge router contract.
* `fromChain` (number): The origin chain id.
* `toChain` (number): The destination chain id.
* `fromToken` (string): The 0x token address on the origin chain.
* `amount` (Ethers BigNumber): The amount (with the correct amount of decimals specified by the token on the origin chain)
* `originQuery` (`Query`): The query to be executed on the origin chain.
* `destQuery` (`Query`): The query to be executed on the destination chain.

#### Return value

* `to` (string): 0x wallet address on the destination chain.
* `data` (string): Output data in 0x hex format

### `allBridgeQuotes()`

#### Return value

Returns an array all possible bridge quotes, with the first item in the array being the cheapest route.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix grammatical issue in allBridgeQuotes() description

There's a minor grammatical error in the sentence. Add the word "of" after "array":

-Returns an array all possible bridge quotes, with the first item in the array being the cheapest route.
+Returns an array of all possible bridge quotes, with the first item in the array being the cheapest route.
📝 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
Returns an array all possible bridge quotes, with the first item in the array being the cheapest route.
Returns an array of all possible bridge quotes, with the first item in the array being the cheapest route.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~153-~153: Possible missing preposition found.
Context: ...)` #### Return value Returns an array all possible bridge quotes, with the first ...

(AI_HYDRA_LEO_MISSING_OF)


Quotes are returned from various Bridge "types" such as [CCTP](/docs/Routers/CCTP) or [RFQ](/docs/Routers/RFQ). More information is available on the [Synapse Router](/docs/Routers/Synapse-Router) page, or [SynapseCNS](https://github.com/synapsecns/sdk-router) Github repository.

## Examples

### Get a quote

```js
const quotes = await Synapse.bridgeQuote(
routerAddress
42161, // Origin Chain
43114, // Destination Chain
'0xff970a61a04b1ca14834a43f5de4533ebddb5cc8', // Origin Token Address
'0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664', // Destination Token Address
BigNumber.from('20000000') // Amount in
{
// Deadline for the transaction to be initiated on the origin chain, in seconds (optional)
deadline: 1234567890,
// List of bridge modules to exclude from the result, optional.
// Empty list means that all modules are included.
excludedModules: ['SynapseBridge', 'SynapseCCTP', 'SynapseRFQ'],
// Address of the user on the origin chain, optional.
// MANDATORY if a smart contract is going to initiate the bridge operation on behalf of the user.
originUserAddress: '0x1234567890abcdef1234567890abcdef12345678',
}
)
```

### Request a transaction

```js
await Synapse.bridge(
'0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9', // To Address
bridgeQuote.routerAddress, // address of the contract to route the txn
42161, // Origin Chain
43114, // Destination Chain
'0xff970a61a04b1ca14834a43f5de4533ebddb5cc8', // Origin Token Address
BigNumber.from('20000000'), // Amount
quote.originQuery, // Origin query from bridgeQuote()
quote.destQuery // Destination query from bridgeQuote()
)
Comment on lines +185 to +194
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Correct indentation in bridge() example

The indentation in the bridge() example is inconsistent. Please adjust the indentation to use spaces consistently:

 await Synapse.bridge(
-	'0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9', // To Address
-	bridgeQuote.routerAddress, // address of the contract to route the txn
-	42161, // Origin Chain
-	43114, // Destination Chain
-	'0xff970a61a04b1ca14834a43f5de4533ebddb5cc8', // Origin Token Address
-	BigNumber.from('20000000'), // Amount
-	quote.originQuery, // Origin query from bridgeQuote()
-	quote.destQuery // Destination query from bridgeQuote()
+  '0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9', // To Address
+  bridgeQuote.routerAddress, // address of the contract to route the txn
+  42161, // Origin Chain
+  43114, // Destination Chain
+  '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8', // Origin Token Address
+  BigNumber.from('20000000'), // Amount
+  quote.originQuery, // Origin query from bridgeQuote()
+  quote.destQuery // Destination query from bridgeQuote()
 )

This change ensures consistent indentation throughout the example, improving readability.

📝 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
await Synapse.bridge(
'0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9', // To Address
bridgeQuote.routerAddress, // address of the contract to route the txn
42161, // Origin Chain
43114, // Destination Chain
'0xff970a61a04b1ca14834a43f5de4533ebddb5cc8', // Origin Token Address
BigNumber.from('20000000'), // Amount
quote.originQuery, // Origin query from bridgeQuote()
quote.destQuery // Destination query from bridgeQuote()
)
await Synapse.bridge(
'0x0AF91FA049A7e1894F480bFE5bBa20142C6c29a9', // To Address
bridgeQuote.routerAddress, // address of the contract to route the txn
42161, // Origin Chain
43114, // Destination Chain
'0xff970a61a04b1ca14834a43f5de4533ebddb5cc8', // Origin Token Address
BigNumber.from('20000000'), // Amount
quote.originQuery, // Origin query from bridgeQuote()
quote.destQuery // Destination query from bridgeQuote()
)
🧰 Tools
🪛 Markdownlint

186-186: Column: 1
Hard tabs

(MD010, no-hard-tabs)


187-187: Column: 1
Hard tabs

(MD010, no-hard-tabs)


188-188: Column: 1
Hard tabs

(MD010, no-hard-tabs)


189-189: Column: 1
Hard tabs

(MD010, no-hard-tabs)


190-190: Column: 1
Hard tabs

(MD010, no-hard-tabs)


191-191: Column: 1
Hard tabs

(MD010, no-hard-tabs)


192-192: Column: 1
Hard tabs

(MD010, no-hard-tabs)


193-193: Column: 1
Hard tabs

(MD010, no-hard-tabs)

```

## Version 0.10.0 breaking changes

### Options object

* `deadline`, `excludeCCTP` (now `excludedModules`), and `originUserAddress` parameters are now found in an (optional) options object at the end of the arguments list for `bridgeQuote()`, and `allBridgeQuotes()`.
* `excludedModules` excludes one or more modules with an array of the module names. Supported names are `SynapseBridge`, `SynapseCCTP`, and `SynapseRFQ`.
* `originUserAddress` is required as part of the options object to initiate a bridge transaction on behalf of a user.

### Examples
```js
bridgeQuote(...arguments, {
deadline: 1234567890,
excludedModules: ["SynapseCCTP"],
originUserAddress: "0x1234...",
})

allBridgeQuotes({
deadline: 1234567890,
excludedModules: ["SynapseCCTP"],
originUserAddress: "0x1234...",
})
```

### `FastBridgeRouter`

The previous `FastBridgeRouter` deployment is deprecated, if your integration is using the hardcoded address, please see the router deployments/deprecated deployments table [here](https://github.com/synapsecns/sanguine/tree/master/packages/sdk-router#router-deployments)
Loading
Loading