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

Improve SDK to handle Substrate to Substrate logic #391

Open
LyonSsS opened this issue Jun 20, 2024 · 0 comments
Open

Improve SDK to handle Substrate to Substrate logic #391

LyonSsS opened this issue Jun 20, 2024 · 0 comments

Comments

@LyonSsS
Copy link

LyonSsS commented Jun 20, 2024

Context: Until recently we only supported transfer from Substrate to EVM so we used only a way to encode EVM format address on deposits.
Now, we can extend deposits to new ways as: Substrate to Parachain or Substrate to Single Chain, which includes encoding e Substrate destination wallet.

Recent changes on BridgePallet ( Tangle chain) requires SDK update for this type of deposit.

  1. Substrate to Substrate Chain ( where this chain is the final destination)
GeneralKey { length: path_len, data: sygma_path },
GeneralIndex(dest_domain_id),
Junction::AccountId32 { network: None, id: recipient}

image

  1. Substrate to Substrate Chain ( where the first Chain is not the dest chain, so we need Forwarder to reach the desired Parchain Destination)
GeneralKey { length: path_len, data: sygma_path },
GeneralIndex(dest_domain_id),
Parachain(parachain_id),
Junction::AccountId32 { network: None, id: recipient }

image

  1. Substarte to EVM
GeneralKey { length: path_len, data: sygma_path },
GeneralIndex(dest_domain_id),
GeneralKey { length: recipient_len, data: recipient },

image

Also I provide success Extrinsics below
From Tangle to Rhala

PHA token deposits

0x09048400cec3f9df482b8de041a81dae22a494a3446966fcf1fab4afbf4fc00028e914240120f3eef6364fa75f232e2c3a69e504af21c7c8528d37fdf977a0e05a9d51f61e8b79b540fb92b8984a9198b6ef1de0c65ff3ccacd0b00690409140cb7a61638b0501cc003105010300511f06057379676d6100000000000000000000000000000000000000000000000000000006037068610000000000000000000000000000000000000000000000000000000000000b0030ef7dba02000306057379676d61000000000000000000000000000000000000000000000000000000050c0100cec3f9df482b8de041a81dae22a494a3446966fcf1fab4afbf4fc00028e91424

sygUSDC deposits

0xfd038400cec3f9df482b8de041a81dae22a494a3446966fcf1fab4afbf4fc00028e91424016a6fb3f98c0e8a0c72bf53a3f270acaac43cf489c0ce6ca778e49c008f59f458c5f8735fc64ff94314569ac667bab9c3a28c471645a4476a3f5c2d1143c74f89b501d8003105010300a10f06057379676d610000000000000000000000000000000000000000000000000000000606737967757364000000000000000000000000000000000000000000000000000000021bb700000306057379676d61000000000000000000000000000000000000000000000000000000050c0100cec3f9df482b8de041a81dae22a494a3446966fcf1fab4afbf4fc00028e91424

From Tangle to Sepolia ( EVM) (this currently works with SDK)

PHA deposits

0x09048400cec3f9df482b8de041a81dae22a494a3446966fcf1fab4afbf4fc00028e9142401fef655b6779eced20bd95ccd83adeedd77d3959495cdebf384b44cf98348954f89c85a208131705c1ce0bc98daed93b94e52d30e31239875a1bb247da286978c7502fc003105010300511f06057379676d6100000000000000000000000000000000000000000000000000000006037068610000000000000000000000000000000000000000000000000000000000000b0030ef7dba02000306057379676d61000000000000000000000000000000000000000000000000000000050806149a17fa0a2824ea855ec6ad3eab3aa2516ec6626d000000000000000000000000

sygUSDC deposits

0x01048400cec3f9df482b8de041a81dae22a494a3446966fcf1fab4afbf4fc00028e91424013a688b63525c5d1600bda4cf3573c1d886f766794fa172be4d0d696cc19ef67a615de537fb7e37a6ffa55c63986f77b83c7414cb26580a3ef8c85df09beb8b8c55010101003105010300a10f06057379676d610000000000000000000000000000000000000000000000000000000606737967757364000000000000000000000000000000000000000000000000000000021bb700000306057379676d61000000000000000000000000000000000000000000000000000000050806149a17fa0a2824ea855ec6ad3eab3aa2516ec6626d000000000000000000000000

@LyonSsS LyonSsS changed the title Improve SDK to handle Substrate to Parachain or Single Chain ( Relay chain) deposits Improve SDK to handle Substrate to Substrate logic Jun 20, 2024
@MakMuftic MakMuftic added this to the Cycle 5 🦓 milestone Jul 1, 2024
@MakMuftic MakMuftic removed this from the Cycle 6 [placeholder] milestone Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants