-
Notifications
You must be signed in to change notification settings - Fork 76
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
feat: support eth address and remote accounts #709
Conversation
Crate versions that have been updated:
Runtime version has been increased. |
…system-account-derivation" within guthub
…rivation fix: merge ecosystem-wide xcm conversion
runtime/hydradx/src/xcm.rs
Outdated
} | ||
|
||
//TODO: fix this reverse | ||
fn reverse(who: AccountId) -> Result<MultiLocation, AccountId> { |
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.
wondering if this is correct, of we should just throw Err in this case
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.
iirc according to @mrq1911 we should use last 20 bytes from 32-byte address to determine it
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.
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
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.