Skip to content

Commit

Permalink
Merge pull request #9 from helix-bridge/jay/docusaurus
Browse files Browse the repository at this point in the history
Migrate to Docusaurus
  • Loading branch information
JayJay1024 authored Apr 18, 2024
2 parents e826fb3 + 9fb4fd5 commit c23dfd0
Show file tree
Hide file tree
Showing 53 changed files with 14,972 additions and 12,309 deletions.
8 changes: 0 additions & 8 deletions .dumi/app.js

This file was deleted.

6 changes: 0 additions & 6 deletions .dumi/tsconfig.json

This file was deleted.

20 changes: 0 additions & 20 deletions .dumirc.ts

This file was deleted.

13 changes: 0 additions & 13 deletions .editorconfig

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
vercel_token: ${{ secrets.VERCEL_TOKEN }}
node_version: 18
dist_path: dist
dist_path: build
vercel_group: itering
preview_output: true
project_name: helix-docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
vercel_token: ${{ secrets.VERCEL_TOKEN }}
node_version: 18
dist_path: dist
dist_path: build
vercel_group: itering
preview_output: true
project_name: helix-docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-stg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
vercel_token: ${{ secrets.VERCEL_TOKEN }}
node_version: 18
dist_path: dist
dist_path: build
vercel_group: itering
preview_output: true
project_name: helix-docs
Expand Down
23 changes: 19 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
node_modules
/dist
.dumi/tmp
.dumi/tmp-production
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

14 changes: 0 additions & 14 deletions .prettierrc.js

This file was deleted.

41 changes: 38 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,41 @@
# helix-docs
# Helix Docs

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

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
yarn install
yarn start
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
4 changes: 4 additions & 0 deletions docs/contract-addresses/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"position": 3,
"label": "🔹 Contract Addresses"
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
group:
title: 🔹 Contract Addresses
order: 3
order: 1
sidebar_position: 1
---

# Mainnet

## Ethereum

- chainId: 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
group:
title: 🔹 Contract Addresses
order: 3
order: 1
sidebar_position: 2
---

# Testnet

## Ethereum Sepolia

- chainId: 11155111
Expand Down
9 changes: 0 additions & 9 deletions docs/index.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/introduction/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"position": 1,
"label": "🔹 Introduction"
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
group:
title: 🔹 Introduction
order: 1
sidebar_position: 1
slug: /
---

# What is Helix

Helix Bridge is a fully open-source and decentralized cross-chain asset bridge. It's built on top of common messaging bridges that already exist between chains, and provides secure, fast, and low-cost cross-chain functionality for users.

## Features
Expand Down
4 changes: 4 additions & 0 deletions docs/protocol/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"position": 2,
"label": "🔹 Protocol"
}
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
---
group:
title: 🔹 Protocol
order: 2
order: 2
title: Liquidity Node(V2)
sidebar_position: 3
---

# Liquidity Node(v2)


# Protocol Overview
## Protocol Overview

**This protocol can only be used when tokens are natively issued on both the source chain and the target chains, and their exchange values are equal.**

## LnProvider

This protocol establishes a liquidity provider role called the LnProvider (Liquidity Node Provider). When a user transfers tokens between two chains, the LnProvider receives tokens on one chain and transfers an equivalent amount of tokens to the user on the other chain.

During the cross-chain transfer process, the asset token goes through the following flow 👇: <img width="1721" alt="Snipaste_2024-01-24_17-15-36" src="https://github.com/helix-bridge/helix-docs/assets/1608576/85b70d43-70e0-4b43-83c2-2183c1551ae6">
During the cross-chain transfer process, the asset token goes through the following flow 👇: <img width="1721" alt="Snipaste_2024-01-24_17-15-36" src="https://github.com/helix-bridge/helix-docs/assets/1608576/85b70d43-70e0-4b43-83c2-2183c1551ae6" />

1. **Source Chain: User → LnProvider**

Expand All @@ -41,7 +37,7 @@ In normal circumstances, these two processes do not need to work with the messag

> 💡The locking of collateral occurs on the source chain, while the user’s assets receiving happens on the target chain. Both the two processes are auditable and have proofs on their respective chains.
<img width="1720" alt="Snipaste_2024-01-24_17-58-53" src="https://github.com/helix-bridge/helix-docs/assets/1608576/9b53c6a4-8628-4b53-9cd8-2fc35749c46b">
<img width="1720" alt="Snipaste_2024-01-24_17-58-53" src="https://github.com/helix-bridge/helix-docs/assets/1608576/9b53c6a4-8628-4b53-9cd8-2fc35749c46b" />

### Pledged Collateral

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
---
group:
title: 🔹 Protocol
order: 2
order: 2
title: Liquidity Node(V3)
sidebar_position: 2
---

# Liquidity Node(v3)

## Overview

In the v2 version of the Liquidity Node Protocol, we have implemented a collateral mechanism to protect user assets. In this v2 protocol, the amount of collateral staked by the LnProvider determines the transfer limit for a single transaction in that direction. To enhance trading depth, LnProviders must stake more collateral. However, since collateral cannot be shared across different directions, this leads to increased collateral costs. Consequently, the v2 protocol is more suitable for frequent, small-value transactions.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
---
group:
title: 🔹 Protocol
order: 2
order: 1
sidebar_position: 1
---

# XToken
Expand All @@ -27,7 +24,7 @@ XToken is crucial to Helix's Bridge as a Service (BaaS) by offering a framework

The CBA Model involves deploying the Backing module on the source chain and the Issuing module on the target chain. The asset registration and issuance process is completed through underlying calls to the generic cross-chain messaging channel.

<img src="/cba01.png" style="width:70%; height:70%; text-align:middle; margin-left:15%; margin-right:15%">
![CBA Model](./img/cba01.png)

- **Backing**

Expand All @@ -39,7 +36,7 @@ The CBA Model involves deploying the Backing module on the source chain and the

## Protocol

<img src="/mapping_token.svg" style="width:70%; height:70%; text-align:middle; margin-left:15%; margin-right:15%">
![Protocol](./img/mapping-token.svg)

- **Asset registration**

Expand Down
4 changes: 4 additions & 0 deletions docs/relayer/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"position": 5,
"label": "🔹 Relayer"
}
7 changes: 2 additions & 5 deletions docs/helixbridge/relayer_client.md → docs/relayer/client.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
group:
title: 🔹 Relayer
order: 5
order: 2
title: Client
sidebar_position: 1
sidebar_label: Client
---

# Helix Relayer Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
group:
title: 🔹 Relayer
order: 5
order: 1
title: Indexer
sidebar_position: 3
sidebar_label: Indexer
---

# Helix Data Indexing
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
---
group:
title: 🔹 Relayer
order: 5
order: 3
title: Run a Relayer Node(V2)
sidebar_position: 2
---

# Run a Relayer Node(v2)

## Overview

Helix is a completely open system where anyone can register as a Relayer without any barriers, contribute liquidity to the system, and earn profits. Before becoming a Relayer, you should have basic knowledge of blockchain, especially in the area of contract interaction. The code for Helix is open-source, and Relayers can either use the default code to run a Node or optimize the client according to their needs, promptly fixing any issues encountered.
Expand Down Expand Up @@ -49,7 +47,7 @@ Open the Helix UI and navigate to the [Relayer Dashboard](https://testnet.helixb

After completing the registration, you can open the `Manage` tab to view the registered information. You will notice that the status of the relayer is `Offline` because you have not ye started the relayer client. Please note that there may be some delay in the synchronization of registration information.

<img src="/register.gif" style="width:90%; height:30%; text-align:middle; margin-left:5%; margin-right:5%">
![Register](./register.gif)

## Run the client

Expand Down Expand Up @@ -92,9 +90,9 @@ The configuration information for the Relayer is stored in the file `.maintain/c
```

- **indexer**[option]: It's the second-layer index service introduced in this [section](https://docs.helixbridge.app/helixbridge/relayer_indexer) can be accessed through the following link.
<table style="width:80%">
<table style={{ width: '80%' }}>
<tr>
<th style="width:20%">Network</th><th>URL</th>
<th style={{ width: '20%' }}>Network</th><th>URL</th>
</tr>
<tr>
<td>Testnet</td><td>https://apollo-test.helixbridge.app/graphql</td>
Expand Down
4 changes: 4 additions & 0 deletions docs/user-guide/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"position": 4,
"label": "🔹 User Guide"
}
Loading

0 comments on commit c23dfd0

Please sign in to comment.