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

feat: support eth address and remote accounts #709

Merged
merged 40 commits into from
Feb 27, 2024

Conversation

dmoka
Copy link
Contributor

@dmoka dmoka commented Dec 5, 2023

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.

Copy link

github-actions bot commented Dec 5, 2023

Crate versions that have been updated:

  • runtime-integration-tests: v1.19.3 -> v1.19.4
  • hydradx-adapters: v1.2.1 -> v1.2.2
  • hydradx-runtime: v217.0.0 -> v218.0.0

Runtime version has been increased.

@dmoka dmoka changed the title feat: support eth address in xcm feat: support eth address and remove accounts Dec 15, 2023
}

//TODO: fix this reverse
fn reverse(who: AccountId) -> Result<MultiLocation, AccountId> {
Copy link
Contributor Author

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

Copy link
Contributor

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

@dmoka dmoka requested a review from apopiak December 18, 2023 09:30
@mrq1911 mrq1911 changed the title feat: support eth address and remove accounts feat: support eth address and remote accounts Dec 21, 2023
@mrq1911 mrq1911 requested a review from green-jay January 17, 2024 20:29
Copy link
Contributor

@green-jay green-jay left a 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

@mrq1911 mrq1911 merged commit 6e63cb3 into master Feb 27, 2024
4 checks passed
@dmoka dmoka deleted the feat/support-eth-address-in-xcm branch February 27, 2024 12:52
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.

4 participants