Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
cuteolaf committed May 7, 2024
1 parent 42d4e46 commit d4fa8c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pallets/regions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ The path for transferring a region to the RegionX chain is as follows:

1. A user goes to the CoreHub frontend and initiates a cross-chain region transfer. This triggers a `limited_reserve_transfer_assets` call on the Coretime chain, where the asset is specified as a non-fungible asset with the `Index` set to the encoded `RegionId`.

2. Upon receipt on the RegionX parachain, the XCM executor calls the RegionX `AssetTransactor`(yet to be implemented). The `AssetTransactor` handles the incoming region by making a call to the region pallet, specifically the `mint_into` function, where it passes the encoded `RegionId` as the item identifier.
2. Upon receipt on the RegionX parachain, the XCM executor calls the RegionX `AssetTransactor`(yet to be implemented). The `AssetTransactor` handles the incoming region by making a call to the **region** pallet, specifically the `mint_into` function, where it passes the encoded `RegionId` as the item identifier.

3. At this point, the RegionX chain can construct the `RegionId` from the encoded ID. However, it's still missing the region record since that's not part of the ID. mint_into makes a calls the `do_request_region_record` function, which sends an ISMP GET request to fetch the associated data from the Coretime chain.
3. At this point, the RegionX chain can construct the `RegionId` from the encoded ID. However, it's still missing the region record since that's not part of the ID. `mint_into` makes a calls the `do_request_region_record` function, which sends an ISMP GET request to fetch the associated data from the Coretime chain.

4. The ISMP pallet emits a GET request event, which the frontend has been waiting for so far. When the frontend detects a GET request event which contains the region Id of the region the user transferred, it reads the region record from the Coretime chain along with its state proof.

5. The frontend responds to the RegionX chain, specifically to the ISMP pallet, providing the region record and proof as the result.

6. The ISMP pallet verifies the result by checking the proof against the Coretime chain state root, which it obtains from the relay chain.

7. Upon successful validation, the ISMP pallet calls the on_response function implemented in the region pallet, passing the response as an argument.
7. Upon successful validation, the ISMP pallet calls the `on_response` function implemented in the **region** pallet, passing the response as an argument.

8. The region pallet attempts to decode the record and the associated RegionId and writes the region data do the state.
8. The **region** pallet attempts to decode the record and the associated RegionId and writes the region data do the state.

0 comments on commit d4fa8c4

Please sign in to comment.