-
Notifications
You must be signed in to change notification settings - Fork 128
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(swapd): begin atomic swap implementation #246
Conversation
v1.7.3
Hi. I'd advise to follow these recommendations for your commit messages unless you want to squash everything into one later: https://darkrenaissance.github.io/darkfi/dev/dev.html#making-life-easy-for-others Please do not include git submodules in the repo. Do not use Please include the licensing header in your files like it is found in our other source files. |
@parazyd thanks for the feedback! do you guys squash and merge PRs? if not, i can squash all the commits before merging.
this is due to using forge for building and managing the eth smart contracts, which uses git submodules for dependencies. the submodules are only required for compiling the contracts, which is done only on the |
Instead of We can squash the PR, yes. I suppose the submodule is fine then for now. We can decide later on what to do on that part. |
@parazyd updated to use |
closing for now as this has been moved into its own repository https://codeberg.org/darkrenaissance/swapd |
This PR is the start of the ETH-DRK atomic swap implementation. The first "direction" to be implemented is that where ETH is the swap initiator (first-mover) and DRK is the second-mover.
what was done:
Initiator
andFollower
(not sure about naming yet, wanted to make it generic as it will eventually be both-ways).initiator::Swap
andfollower::Swap
which run the actual swap protocol; currently onlyinitiator::Swap
is implemented.test_initiator_swap_success
which tests the success case with an ethereumSwap
instance running with a mock no-op darkfi backend.to do (either here on in a follow-up):
#[allow(dead_code)]
maybe? or can do in a follow up with CLI stuff