-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from sora-xor/7-substrate-bridge-documentation
Substrate bridge documentation
- Loading branch information
Showing
14 changed files
with
311 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
This page was moved to [EVM](../../evm). | ||
This page was moved to [EVM](../interoperability). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Establish an HRMP channel | ||
|
||
To establish communication between your parachain and SORA, you must create HRMP channels that go through the Relay Chain to transfer messages between parachains. | ||
|
||
Remember that HRMP channels usually go in one direction. For two-way communication, you'll need to set up another channel going the opposite way. Therefore, the following is split into sub-sections: | ||
|
||
## Your Parachain to SORA | ||
|
||
1. Obtain the encoded call data of the `hrmp.hrmpInitOpenChannel` extrinsic on the relay chain. | ||
|
||
This unique code includes a `recipient` detail telling the relay chain which parachain you want to connect to. The recipient changes depending on what environment you are planning to establish the channel in. For Kusama, look at [this list](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fksm-rpc.stakeworld.io#/parachains), and for Rococo, go to [this list](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/parachains). | ||
|
||
Combine this parachain id with the other info from the documentation. For example, for Rococo you'll have something like this: `0x3c00db070000e803000000900100`. | ||
|
||
2. Within your parachain, compose an XCM message that notifies the relay chain about the intent to open a channel with SORA. Refer to the [official documentation](https://docs.substrate.io/reference/how-to-guides/parachains/add-hrmp-channels/) for an illustrative example of the XCM message. | ||
|
||
::: info | ||
|
||
It is important to acknowledge that if your implementation of HRMP channel logic differs from the standard `polkadotXcm.send` pallet; you should modify this step accordingly. | ||
|
||
::: | ||
|
||
Once the extrinsic executes successfully, SORA needs to accept the channel establishment. | ||
|
||
3. Subsequently, the SORA team will accept the channel by incorporating the encoded call data of `hrmp.hrmpAcceptOpenChannel`. This data will feature your parachain's ID as a parameter and will be executed via the `xcmApp.sudoSendXCM` call. | ||
|
||
Upon successful execution, (an) HRMP channel(s) will be established from your parachain to SORA. | ||
|
||
## SORA to Your Parachain | ||
|
||
The steps here mirror those from the preceding sub-section. For steps (1) and (2) outlined earlier, SORA initiates an XCM message to propose channel establishment. Subsequently, it's your responsibility to encode `hrmp.hrmpAcceptOpenChannel` with SORA's parachain ID. For instance, in the case of Rococo, the encoded call data would be: `0x3c01db070000`. Execute an XCM message from your parachain in alignment with the [official guidelines](https://docs.substrate.io/reference/how-to-guides/parachains/add-hrmp-channels/), including the encoded call data containing SORA's parachain ID. | ||
|
||
Upon successful execution of this process, your parachain will be set up to receive messages from the SORA parachain. | ||
|
||
We will still need to register the assets to be transferred from one chain to another. On your parachain, you will need to register the SORA assets. On the SORA Mainnet, we will need to register your assets. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
9bc381a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
sora-docs – ./
sora-docs.vercel.app
sora-docs-sora-team.vercel.app
sora-docs-git-develop-sora-team.vercel.app