Skip to content

Commit 8eca709

Browse files
committed
Merge branch 'development' into doc-stakingv4
# Conflicts: # website/sidebars.json
2 parents 6e95a83 + 8115355 commit 8eca709

File tree

443 files changed

+46169
-19758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

443 files changed

+46169
-19758
lines changed

.github/workflows/deploy-production.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: deploy-production
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66
repository_dispatch:
77
types: deploy-production
88
workflow_dispatch:
@@ -13,35 +13,33 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v2
1515
with:
16-
ref: master
16+
ref: main
17+
fetch-depth: 0
1718
- name: Use Node.js
1819
uses: actions/setup-node@v1
1920
with:
20-
node-version: "12.x"
21+
node-version: "16.x"
2122
- name: Install packages
22-
working-directory: website
23-
run: |
24-
npm install
23+
run: npm install
2524
- name: Build website
26-
working-directory: website
27-
run: |
28-
npm run build
25+
run: npm run build
2926
env:
3027
CI: false
3128
REACT_APP_ALGOLIA_SEARCH_KEY: ${{ secrets.ALGOLIA_SEARCH_KEY }}
29+
REACT_APP_ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
3230
- name: Configure AWS Credentials
3331
uses: aws-actions/configure-aws-credentials@v1
3432
with:
3533
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
3634
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
3735
aws-region: "us-east-1"
3836
- name: Deploy to S3 bucket
39-
run: aws s3 sync ./website/build/docs/ s3://${{ secrets.AWS_S3_BUCKET_PRODUCTION }} --delete
37+
run: aws s3 sync ./build/ s3://${{ secrets.AWS_S3_BUCKET_PRODUCTION }} --delete
4038
- name: Slack Notification
4139
uses: rtCamp/action-slack-notify@master
4240
env:
4341
SLACK_ICON_EMOJI: ":page_with_curl:"
44-
SLACK_USERNAME: docs.elrond.com
42+
SLACK_USERNAME: docs.multiversx.com
4543
SLACK_MESSAGE: ${{ secrets.AWS_S3_BUCKET_PRODUCTION }}
4644
SLACK_FOOTER: ""
4745
MSG_MINIMAL: true

.github/workflows/deploy-staging.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,32 @@ jobs:
1414
- uses: actions/checkout@v2
1515
with:
1616
ref: development
17+
fetch-depth: 0
1718
- name: Use Node.js
1819
uses: actions/setup-node@v1
1920
with:
20-
node-version: "12.x"
21+
node-version: "16.x"
2122
- name: Install packages
22-
working-directory: website
23-
run: |
24-
npm install
23+
run: npm install
2524
- name: Build website
26-
working-directory: website
27-
run: |
28-
npm run build
25+
run: npm run build
2926
env:
3027
CI: false
3128
REACT_APP_ALGOLIA_SEARCH_KEY: ${{ secrets.ALGOLIA_SEARCH_KEY }}
29+
REACT_APP_ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
3230
- name: Configure AWS Credentials
3331
uses: aws-actions/configure-aws-credentials@v1
3432
with:
3533
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
3634
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
3735
aws-region: "us-east-1"
3836
- name: Deploy to S3 bucket
39-
run: aws s3 sync ./website/build/docs/ s3://${{ secrets.AWS_S3_BUCKET_STAGING }} --delete
37+
run: aws s3 sync ./build/ s3://${{ secrets.AWS_S3_BUCKET_STAGING }} --delete
4038
- name: Slack Notification
4139
uses: rtCamp/action-slack-notify@master
4240
env:
4341
SLACK_ICON_EMOJI: ":page_with_curl:"
44-
SLACK_USERNAME: docs.elrond.com
42+
SLACK_USERNAME: staging-docs.multiversx.com
4543
SLACK_MESSAGE: ${{ secrets.AWS_S3_BUCKET_STAGING }}
4644
SLACK_FOOTER: ""
4745
MSG_MINIMAL: true

.github/workflows/rust-tutorial-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
default: true
1818
toolchain: nightly
1919
- name: Run rust tests
20-
run: ./rust-tutorial-ci.sh
20+
run: ./scripts/rust-tutorial-ci.sh

.gitignore

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
112
.DS_Store
13+
.env
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
218

3-
node_modules
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*
422

523
lib/core/metadata.js
624
lib/core/MetadataBlog.js
@@ -14,7 +32,6 @@ website/i18n/*
1432
desktop.ini
1533

1634
/sam/build.yaml
17-
/build
1835
/.vscode
1936

2037
tags
@@ -23,3 +40,5 @@ tags
2340
/target
2441
/testing/extract-tutorial-code/target
2542
Cargo.lock
43+
44+
.idea

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Elrond docs
1+
# MultiversX docs
22

3-
The repository containing the [documentation](https://docs.elrond.com) for the Elrond Network protocol.
3+
The repository contains the [documentation](https://docs.multiversx.com) for the MultiversX Network protocol.
44

55
## About
66

@@ -9,19 +9,17 @@ This repository also has GitHub actions that will trigger the real-time updating
99

1010
## How to use locally
1111

12-
In order to ensure that the new added content is correctly aligned and every Markdown feature is working as intended, one can run the project on a local machine.
12+
In order to ensure that the newly added content is correctly aligned and every Markdown feature is working as intended, one can run the project on a local machine.
1313

1414
### Requirements:
1515

1616
- a `git` client installed
17-
- `nodejs` and `npm` installed
17+
- `nodejs` (v16.14.2) and `npm` installed
1818
- optional, but useful: an IDE (Visual Code for example)
1919

2020
### Steps:
2121

22-
2322
- clone the repository
24-
- go to the `website` directory from a terminal
2523
- run `npm install` (only for the first usage)
2624
- run `npm start`
2725
- access `http://localhost:3000` to view your local version of the docs
@@ -37,6 +35,7 @@ Once a proposal to update the documentation is submitted, it will be subject to
3735
### Audience
3836

3937
Anyone can contribute to the docs. Any help is appreciated. Here are some ways in which you can contribute:
38+
4039
- update parts of the documentation that no longer match the actual behaviour.
4140
- document features that aren't documented yet.
4241
- add additional information about a component.
@@ -45,20 +44,24 @@ Anyone can contribute to the docs. Any help is appreciated. Here are some ways i
4544

4645
### Guidelines
4746

48-
- external contributions will be made to the `external` branch.
47+
Each documentation page should include a `Edit this page` link that will redirect the user to the corresponding GitHub edit page.
48+
49+
Alternatively, contributions can be made manually by following the steps below:
50+
51+
- external contributions will be made to the `development` branch.
4952
- you can contribute from GitHub directly (not recommended) or by working locally and pushing the changes (recommended).
5053
- the documentation pages are to be found inside the `docs` directory at the corresponding category.
5154
- please follow `docs/utils.md` for Markdown examples.
5255

53-
A web version of the Markdown examples is available [here](https://docs.elrond.com/utils/).
56+
A web version of the Markdown examples is available [here](https://docs.multiversx.com/utils/).
5457

5558
### Opening a `pull request`
5659

57-
- create a new branch starting from `external`.
60+
- create a new branch starting from `development`.
5861
- push the changes to the new branch.
59-
- open a `pull request` from your branch to `external` branch.
60-
- wait for Elrond members to review your pull request.
62+
- open a `pull request` from your branch to `development` branch.
63+
- wait for MultiversX members to review your pull request.
6164

62-
Once approved, the pull request will be merged into the `external` branch. From time to time (and depending on the emergency of the changes) we will merge the `external` branch into `development` or `master` branches.
65+
Once approved, the pull request will be merged into the `development` branch. From time to time (and depending on the emergency of the changes) we will merge the `development` branch into `master` branch.
6366

6467
## **Thank you!**

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

docs/bridge/architecture.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
id: architecture
3+
title: Architecture
4+
---
5+
6+
[comment]: # (mx-abstract)
7+
8+
Ad-Astra Bridge is a system that allows for the transfer of ERC20 tokens between the Ethereum and MultiversX networks. The system is composed of several contracts and relayers that work together to facilitate the transfer of tokens.
9+
10+
[comment]: # (mx-context-auto)
11+
12+
## Ethereum Contracts
13+
- **Repo**: https://github.com/multiversx/mx-bridge-eth-sc-sol
14+
- **Safe (1)**: A contract that allows users to deposit ERC20 tokens that they want to transfer to the MultiversX network.
15+
- **Bridge(2)**: A contract that facilitates the transfer of tokens from Ethereum to MultiversX.
16+
17+
[comment]: # (mx-context-auto)
18+
19+
## MultiversX Contracts
20+
- **Repo**: https://github.com/multiversx/mx-bridge-eth-sc-rs
21+
- **Safe (3)**: A contract that allows users to deposit ESDT tokens that they want to transfer to the Ethereum network.
22+
- **Bridge (4)**: A contract that facilitates the transfer of tokens from MultiversX to Ethereum.
23+
- **MultiTransfer (5)**: A helper contract that is used to perform multiple token transfers at once.
24+
- **BridgedTokensWrapper (6)**: A helper contract that is used to support wrapping the same token from multiple chains into a single ESDT token.
25+
26+
[comment]: # (mx-context-auto)
27+
28+
## Relayers
29+
- **Repo**: https://github.com/multiversx/mx-bridge-eth-go
30+
- **5 Relayers**: Managed by the MultiversX Foundation.
31+
- **5 Relayers**: Distributed to the MultiversX validators community, with each validator having one relayer.

docs/bridge/multiple-chains.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
id: multiple-chains
3+
title: Multiple chains
4+
---
5+
6+
[comment]: # (mx-abstract)
7+
8+
An ESDT token can be bridged between multiple chains by using the `BridgedTokensWrapper` contract.
9+
10+
[comment]: # (mx-context-auto)
11+
12+
## Support for Multiple Chains for the same token
13+
The **BridgedTokensWrapper (6)** contract facilitates the use case of having the same token on multiple chains. It accepts the chain-specific ESDT token and mints a universal ESDT token that can be used on any application within the MultiversX network. The universal ESDT token can be converted back to the chain-specific ESDT token using the **BridgedTokensWrapper (6)** contract. This process burns the given universal tokens and sends the chain-specific ESDT tokens to the user.
14+
15+
Internally, the Ad-Astra Bridge system uses the **BridgedTokensWrapper (6)** contract to wrap the chain-specific tokens minted by the **MultiTransfer (5)** contract from multiple chains into a single ESDT token and sends it to the user.
16+
17+
When a user wants to transfer the tokens back to the source network, they must send the universal ESDT token to the **BridgedTokensWrapper (6)** contract, and the chain-specific ESDT token will be sent to the user. After this step, the user can send the chain-specific ESDT token to the **Safe (3)** contract, and the transfer will be performed as described in the previous section.

docs/bridge/transfer-flows.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
id: transfer-flows
3+
title: Transfer Flows
4+
---
5+
6+
[comment]: # (mx-abstract)
7+
8+
The main functionality of the bridge is to transfer tokens from a network to another. For example, a user can transfer tokens from Ethereum to MultiversX or from MultiversX to Ethereum.
9+
The following sections describe the transfer flows for both directions.
10+
11+
[comment]: # (mx-context-auto)
12+
13+
## Ethereum to MultiversX
14+
1. A user deposits the ERC20 tokens that they want to transfer to the MultiversX network on the **Safe(1)** contract.
15+
2. The **Safe(1)** contract groups multiple deposits into batches.
16+
3. After a certain period of time, each batch becomes final and is processed by the relayers.
17+
4. The relayers propose, vote, and perform the transfer using the **Bridge (4)** contract with a consensus of 7/10 votes.
18+
5. On the MultiversX network, the same amount of ESDT tokens are minted as were deposited on the Ethereum network.
19+
6. The user receives the equivalent amount of ESDT tokens on their recipient address on the MultiversX network.
20+
21+
[comment]: # (mx-context-auto)
22+
23+
## MultiversX to Ethereum
24+
1. A user deposits the ESDT tokens that they want to transfer to the Ethereum network on the **Safe(3)** contract.
25+
2. The **Safe(3)** contract groups multiple deposits into batches.
26+
3. After a certain period of time, each batch becomes final and is processed by the relayers.
27+
4. The relayers propose, vote, and perform the transfer using the **Bridge (2)** contract with a consensus of 7/10 votes.
28+
5. The user receives the equivalent amount of ERC20 tokens on their recipient address on the Ethereum network.
29+
6. On the MultiversX network, the ESDT tokens that were transferred are burned.

docs/bridge/whitelist-requirements.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
id: whitelist-requirements
3+
title: Whitelist requirements
4+
---
5+
6+
[comment]: # (mx-abstract)
7+
8+
Before enabling a token to be sent via the Ad-Astra bridge, the token must be whitelisted.
9+
The whitelisting process is performed with the help of the MultiversX team.
10+
11+
[comment]: # (mx-context-auto)
12+
13+
## Whitelist requirements
14+
15+
1. The MultiversX team must whitelist the token on both the Safe(1) and Safe(3) contracts. Only whitelisted tokens can be bridged.
16+
2. The token issuer must issue the token on the MultiversX network and submit a branding request manually or using https://assets.multiversx.com/.
17+
3. The token issuer must assign the MINT&BURN role to the BridgedTokensWrapper (6) contract as per the instructions provided at https://docs.multiversx.com/tokens/esdt-tokens/#setting-and-unsetting-special-roles
18+
19+
**Note**: As an alternative approach, MultiversX team can issue an ESDT token on the MultiversX chain with the same properties as on Ethereum, and give the needed roles to the Smart Contracts, as indicated above. The MultiversX team can then give the token issuer the ownership of token management for that specific ESDT token.

0 commit comments

Comments
 (0)