feat: support eth address and remote accounts#709
Merged
Conversation
|
Crate versions that have been updated:
Runtime version has been increased. |
…system-account-derivation" within guthub
…rivation fix: merge ecosystem-wide xcm conversion
3 tasks
dmoka
commented
Dec 15, 2023
runtime/hydradx/src/xcm.rs
Outdated
| } | ||
|
|
||
| //TODO: fix this reverse | ||
| fn reverse(who: AccountId) -> Result<MultiLocation, AccountId> { |
Contributor
Author
There was a problem hiding this comment.
wondering if this is correct, of we should just throw Err in this case
Contributor
There was a problem hiding this comment.
iirc according to @mrq1911 we should use last 20 bytes from 32-byte address to determine it
green-jay
approved these changes
Jan 24, 2024
Contributor
green-jay
left a comment
There was a problem hiding this comment.
works like a charm, LGTM
# Conflicts: # Cargo.lock # integration-tests/Cargo.toml # integration-tests/src/lib.rs # runtime/adapters/Cargo.toml # runtime/adapters/src/lib.rs # runtime/hydradx/Cargo.toml # runtime/hydradx/src/lib.rs # runtime/hydradx/src/xcm.rs
…dress-in-xcm # Conflicts: # integration-tests/src/lib.rs
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Support ETH address in XCM
We want to support MultiLocation with Ethereum (Account20) address, so people can send xcm to ethereum address of our chain, where we handle the conversion ourselves
2. Allow remote accounts
Allowing to have remote accounts on Hydra for all purposes a native account could be used. Especially useful for when we do not want to deteriorate UX by switching networks in the UI.
Currently, there is no common ecosystem wide approach to derive accounts from xcm-origins. This PR adds a converter both used by
The converter was introduced by paritytech/polkadot#7329 in order to create a general purpose conversion. The idea behind this converter is that a user User1 from ChainA has the ability to have a unique account on any other chain in the ecosystem. This so called remote account can only be controlled from User1 from ChainA.