Skip to content

Commit

Permalink
Merge branch 'master' into feat/sdk-rfq-endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiTimesChi committed Dec 9, 2024
2 parents 1d7323a + bf6b5bf commit 8942a74
Show file tree
Hide file tree
Showing 142 changed files with 5,390 additions and 1,315 deletions.
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
# ignore ifacemaker files
*_generated.go linguist-generated
contrib/opbot/generated/* linguist-generated
*.contractinfo.json linguist-generated=true
*.contractinfo.json linguist-generated


# svg should be treated as a binary https://git.io/JE2VK
*.svg binary
*.sol linguist-language=Solidity

.vscode/*.json linguist-language=jsonc

# foundry deploy data
packages/**/deployments/*.json linguist-generated
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# jekyll config. Jekyll is used here only for helm.
exclude: [docs]
13 changes: 10 additions & 3 deletions contrib/opbot/botmd/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ func (b *Bot) rfqRefund() *slacker.CommandDefinition {
})
if err != nil {
log.Printf("error submitting refund: %v\n", err)
_, err := ctx.Response().Reply("error submitting refund")
if err != nil {
log.Println(err)
}
return
}

Expand All @@ -331,17 +335,19 @@ func (b *Bot) rfqRefund() *slacker.CommandDefinition {
if err != nil || !status.HasTx() {
b.logger.Errorf(ctx, "error fetching quote request: %v", err)
return fmt.Errorf("error fetching quote request: %w", err)
} else if !status.HasTx() {
return fmt.Errorf("no transaction hash found yet")
}
return nil
},
retry.WithMaxAttempts(5),
retry.WithMaxAttemptTime(30*time.Second),
retry.WithMaxTotalTime(1*time.Minute),
)

if err != nil {
b.logger.Errorf(ctx.Context(), "error fetching quote request: %v", err)
_, err := ctx.Response().Reply(fmt.Sprintf("refund submitted with nonce %d", nonce))
if err != nil {
log.Println(err)
b.logger.Errorf(ctx.Context(), "error fetching quote request: %v", err)
}
return
}
Expand All @@ -351,6 +357,7 @@ func (b *Bot) rfqRefund() *slacker.CommandDefinition {
if err != nil {
log.Println(err)
}

},
}
}
Expand Down
2 changes: 2 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
"ofac",
"omnirpc",
"opaciyt",
"permissionless",
"permissioned",
"permissionlessly",
"persistor",
"popperjs",
Expand Down
72 changes: 72 additions & 0 deletions docs/bridge/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,78 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.5.13](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-12-08)

**Note:** Version bump only for package @synapsecns/bridge-docs





## [0.5.12](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-12-06)

**Note:** Version bump only for package @synapsecns/bridge-docs





## [0.5.11](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-12-02)

**Note:** Version bump only for package @synapsecns/bridge-docs





## [0.5.10](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-12-02)

**Note:** Version bump only for package @synapsecns/bridge-docs





## [0.5.9](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-12-02)

**Note:** Version bump only for package @synapsecns/bridge-docs





## [0.5.8](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-12-01)

**Note:** Version bump only for package @synapsecns/bridge-docs





## [0.5.7](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-11-30)

**Note:** Version bump only for package @synapsecns/bridge-docs





## [0.5.6](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-11-30)

**Note:** Version bump only for package @synapsecns/bridge-docs





## [0.5.5](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-11-19)

**Note:** Version bump only for package @synapsecns/bridge-docs





## [0.5.4](https://github.com/synapsecns/sanguine/compare/@synapsecns/[email protected]...@synapsecns/[email protected]) (2024-11-13)

**Note:** Version bump only for package @synapsecns/bridge-docs
Expand Down
1 change: 1 addition & 0 deletions docs/bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.


## Generating API Docs

<!--TODO: needs to be done from ci to ensure regeneration is done.-->
Expand Down
24 changes: 24 additions & 0 deletions docs/bridge/docs/01-About/04-SYN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: $SYN Token
---

# $SYN Token

$SYN is the governance token for the Synapse Protocol. There are no unlocks, all future $SYN emissions are goverened by the [DAO](/docs/About/DAO).

Liquidity for the [$SYN](https://coinmarketcap.com/currencies/synapse-2/) token can be found here:

| Venue | Link |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Coinbase | `https://www.coinbase.com/price/synapse` [](https://www.coinbase.com/price/synapse) |
| Sushi | `https://www.sushi.com/ethereum/pool/v2/0x4a86c01d67965f8cb3d0aaa2c655705e64097c31` [](https://www.sushi.com/ethereum/pool/v2/0x4a86c01d67965f8cb3d0aaa2c655705e64097c31) |
| Revolut | `https://www.revolut.com/crypto/price/syn` [](https://www.revolut.com/crypto/price/syn) |
| Binance (Spot) | `https://www.binance.com/en/trade/SYN_USDT?type=spot` [](https://www.binance.com/en/trade/SYN_USDT?type=spot) |
| Binance (Perpetuals) | `https://www.binance.com/en/futures/SYNUSDT` [](https://www.binance.com/en/futures/SYNUSDT) |
| Bybit (SYN/USDT) | `https://www.bybit.com/trade/usdt/SYNUSDT` [](https://www.bybit.com/trade/usdt/SYNUSDT) |
| HTX | `https://www.htx.com/price/syn/` [](https://www.htx.com/price/syn/) |
| Kraken | `https://www.kraken.com/prices/synapse` [](https://www.kraken.com/prices/synapse) |
| KuCoin | `https://www.kucoin.com/price/SYN` [](https://www.kucoin.com/price/SYN) |
<br />

All $SYN token addresses can be found [here](/docs/Contracts/SYN).
2 changes: 1 addition & 1 deletion docs/bridge/docs/01-About/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Synapse Router automatically determines the appropriate router for each Bridge t

* **[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.
* **[RFQ](/docs/RFQ)** – Relayers bid for the right to provide immediate delivery.

<figure id="flowGroup">
<figure>
Expand Down
2 changes: 1 addition & 1 deletion docs/bridge/docs/02-Bridge/01-SDK.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Use `bridgeQuote` to request a Bridge transaction

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

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.
Quotes are returned from various Bridge "types" such as [CCTP](/docs/Routers/CCTP) or [RFQ](/docs/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

Expand Down
12 changes: 11 additions & 1 deletion docs/bridge/docs/02-Bridge/02-REST-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ title: REST API

# REST API

Get read-only data from on-chain Synapse contracts, and generate Bridge and Swap quotes, plus additional transaction information.
The Synapse REST API is a read-only API that allows you to integrate the Synapse liquidity network into your application.

Through HTTP requests, developers can integrate Synapse cross-chain tokens and liquidity transfers dynamically into their applications. Developers can retrieve quotes, as well as generate the relevant call data for Synapse Bridges and Swaps. Example requests can be found below in the [API-docs](#api-docs) section.


The Synapse REST API is built on top of the [Synapse Bridge SDK](https://docs.synapseprotocol.com/docs/Bridge/SDK).


The API is available at [`https://api.synapseprotocol.com/`](https://api.synapseprotocol.com/).


## API-docs

Expand All @@ -17,6 +26,7 @@ Get read-only data from on-chain Synapse contracts, and generate Bridge and Swap
| Date | Description |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 2024&#8209;10&#8209;01 | [https://synapse-rest-api-v2.herokuapp.com/](https://synapse-rest-api-v2.herokuapp.com/) is no longer maintained and has been fully deprecated as of October 2024. |
| 2024&#8209;11&#8209;19 | [https://api.synapseprotocol.com/](https://api.synapseprotocol.com/) the /bridgeTxInfo endpoint has been consolidated into the /bridge endpoint, which now returns call data |

## Support

Expand Down
Loading

0 comments on commit 8942a74

Please sign in to comment.