Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sovereign Chains Cross-Chain Execution #1033

Open
wants to merge 19 commits into
base: development
Choose a base branch
from

Conversation

andreiblt1304
Copy link

@andreiblt1304 andreiblt1304 commented Jan 14, 2025

Description of the pull request (what is new / what has changed)

Did you test the changes locally ?

  • yes
  • no

Which category (categories) does this pull request belong to?

  • document new feature
  • update documentation that is not relevant anymore
  • add examples or more information about a component
  • fix grammar issues
  • other

@andreiblt1304 andreiblt1304 marked this pull request as ready for review January 14, 2025 12:55
@@ -0,0 +1,9 @@
# Cross-Chain Execution Example
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this linked to the docs?

@@ -0,0 +1,18 @@
# Creating Bridges
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This title is confusing. Creating bridges between what to what should be the answer? At this point in time, a normal user, first time visitor will have no clue to what kind of bridges we are reffering to. Even though we may think that it is obvious (it may be for us) that the topic of this page is the bridge btw MainChain to Sovereign and the other way around, it is not.


## What is Cross-Chain Execution?

Being able to connect 2 different ecosystems opens up infinite possibilities for functionality. Cross-Chain Execution implies using the functionality of two different chains and combining both of them. In this context we can refer to:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing as above:

A new user will ask himself:
"two chains" - Is it Ethereum and Solana? or what chains are you referring to?


Being able to connect 2 different ecosystems opens up infinite possibilities for functionality. Cross-Chain Execution implies using the functionality of two different chains and combining both of them. In this context we can refer to:

1. Sending tokens from one chain to another
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Better define from what Chain to what Chain. Probably it will be better to have a note above where you define what MainChain is and what Sovereign Chain is.


## Cross-Chain Execution within Sovereign Chains

All the heavy lifting is being done by the *ESDT-Safe* Smart Contract.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this Smart Contract described in detail? if it is not, let's create a page for it. If it is, add a link to that description.

@@ -0,0 +1,42 @@
# To Sovereign
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To sovereign but from where? From another Sovereign or From Mainchain?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not clear enough.

Please modify.

Split in two main part -> what is part of MainChain, what is part of Sovereign.

Besides the ESDT-Safe and Token-Handler contracts (where is token handler described and what's it's purpose) I do not know what the other symbols represent. The first user is Alice who is sending to her on the same chain or is it a differnet chain? etc etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not clear enough.

@andreiblt1304 andreiblt1304 changed the base branch from main to development January 15, 2025 08:04
@andreiblt1304 andreiblt1304 changed the base branch from development to main January 15, 2025 08:08
docs/sovereign/cross-chain-execution.md Outdated Show resolved Hide resolved
docs/sovereign/cross-chain-execution.md Outdated Show resolved Hide resolved
docs/sovereign/cross-chain-execution.md Outdated Show resolved Hide resolved
docs/sovereign/cross-chain-execution.md Outdated Show resolved Hide resolved
docs/sovereign/to-sovereign.md Show resolved Hide resolved
docs/sovereign/from-sovereign.md Outdated Show resolved Hide resolved
docs/sovereign/from-sovereign.md Outdated Show resolved Hide resolved
docs/sovereign/from-sovereign.md Outdated Show resolved Hide resolved
docs/sovereign/from-sovereign.md Outdated Show resolved Hide resolved
docs/sovereign/from-sovereign.md Show resolved Hide resolved
@andreiblt1304 andreiblt1304 self-assigned this Jan 15, 2025
@andreiblt1304 andreiblt1304 changed the base branch from main to development January 16, 2025 07:40
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
docs/sovereign/to-sovereign.md Outdated Show resolved Hide resolved
docs/sovereign/to-sovereign.md Show resolved Hide resolved
docs/sovereign/from-sovereign.md Outdated Show resolved Hide resolved
docs/sovereign/from-sovereign.md Outdated Show resolved Hide resolved
docs/sovereign/from-sovereign.md Outdated Show resolved Hide resolved
docs/sovereign/from-sovereign.md Outdated Show resolved Hide resolved
docs/sovereign/from-sovereign.md Outdated Show resolved Hide resolved
docs/sovereign/to-sovereign.md Outdated Show resolved Hide resolved
static/sovereign/from-sovereign.png Outdated Show resolved Hide resolved
static/sovereign/to-sovereign.png Outdated Show resolved Hide resolved
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>

One key aspect of cross chain transfers from MultiversX Main Chain to a Sovereign Chain is being able to transfer tokens and also execute a smart contract call within single transaction. The `#[payable("*")]` annotation means that the endpoint can receive any tokens that will transferred. If those tokens are from a Sovereign Chain they will be burned otherwise they will be saved in the Smart Contract`s account. The checks enabled for the transfer of tokens are the following:

- If the token is whitelisted, in that case the fee is skipped.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- If the token is whitelisted, in that case the fee is skipped.
- If the token is whitelisted or not blacklisted, in that case the tokens can be transferred.

# Execution starting from a Sovereign Chain
![From Sovereign](../../static/sovereign/from-sovereign.png)

For the user — whether an External Owned Account (EOA) like a user wallet or another smart contract — procedure is simple. An address will be able to perform a multiTransfer deposit for various types of tokens:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For the user — whether an External Owned Account (EOA) like a user wallet or another smart contract — procedure is simple. An address will be able to perform a multiTransfer deposit for various types of tokens:
For the user — whether an External Owned Account (EOA) like a user wallet or another smart contract — procedure is simple. An address will be able to perform a multi tokens transfer with various types of tokens:

Signed-off-by: Andrei Baltariu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants