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

Add conversions between Moonlight and Phoenix to wallet-core and test them #2321

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

ureeves
Copy link
Member

@ureeves ureeves commented Sep 9, 2024

As advertised, this PR introduces two functions in wallet-core to be able to convert Dusk between Moonlight and Phoenix. The functions are:

  • moonlight_to_phoenix
  • phoenix_to_moonlight

The tests occur in rusk in the context of block ingestion, so we're sure that the transactions these two functions create can be ingested properly by the chain.

As a consequence, a totally generic moonlight function is created, mirroring the phoenix function, that allows for creating a Moonlight transaction in a similar way to Phoenix.

HDauven
HDauven previously approved these changes Sep 10, 2024
Copy link
Member

@HDauven HDauven left a comment

Choose a reason for hiding this comment

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

LGTM

rusk/tests/services/conversion.rs Outdated Show resolved Hide resolved
wallet-core/src/transaction.rs Show resolved Hide resolved
@ureeves ureeves merged commit c952c6b into master Sep 10, 2024
15 checks passed
@ureeves ureeves deleted the wallet-convert branch September 10, 2024 10:33
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