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

🚬 Ethereum compatibility #420

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

JuaniRios
Copy link
Contributor

@JuaniRios JuaniRios commented Oct 14, 2024

What?

  • Add support for Ethereum based projects by letting users define the ethereum account that receives the tokens at the moment of participation.

How?

  • Participation info structs now have a receiving_account field which is an xcm Junction. This has to be either AccountKey20 or AccountId32
  • Issuers now define at project creation if they expect one or the other account Junction.
  • Existing participation extrinsics now call the inner participation functions with AccountId32=caller
  • New participation extrinsics now accept a junction, and a signature. The signature will be checked against the account defined in the signature to prove ownership.

Testing?

In the next PR

Anything Else?

For now we only support SR25519 signatures for Polkadot, and secp256k1 for Ethereum.
The Ethereum signatures also need some prefix defined in https://eips.ethereum.org/EIPS/eip-191

Copy link
Contributor Author

JuaniRios commented Oct 14, 2024

@JuaniRios JuaniRios force-pushed the 10-14-ethereum_compatibility branch 6 times, most recently from 7ceed6e to 06d2a5f Compare October 22, 2024 12:52
@JuaniRios JuaniRios force-pushed the 10-14-ethereum_compatibility branch 4 times, most recently from 5654180 to 3b1c965 Compare October 24, 2024 09:19
@JuaniRios JuaniRios self-assigned this Oct 24, 2024
@JuaniRios JuaniRios force-pushed the 10-14-ethereum_compatibility branch 2 times, most recently from dcf98bd to 1cc1e7b Compare October 24, 2024 09:37
@JuaniRios JuaniRios force-pushed the 10-14-ethereum_compatibility branch 3 times, most recently from 2fd7129 to 252f99a Compare October 24, 2024 10:59
@JuaniRios JuaniRios changed the title Ethereum compatibility 🚬 Ethereum compatibility Oct 24, 2024
@JuaniRios JuaniRios marked this pull request as ready for review October 30, 2024 14:46
@lrazovic lrazovic requested a review from vstam1 November 5, 2024 08:37
Copy link
Collaborator

@vstam1 vstam1 left a comment

Choose a reason for hiding this comment

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

Lgtm. Cannot verify signature verification, but logic looks solid

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.

2 participants