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: make swap example compatible with Bitcoin #63

Merged
merged 2 commits into from
Oct 9, 2023
Merged

Conversation

fadeev
Copy link
Member

@fadeev fadeev commented Sep 25, 2023

No description provided.

@fadeev fadeev linked an issue Sep 25, 2023 that may be closed by this pull request
@socket-security
Copy link

socket-security bot commented Sep 25, 2023

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@zetachain/toolkit 2.2.4 None +16 4.5 MB

@fadeev
Copy link
Member Author

fadeev commented Sep 25, 2023

EVM:

npx hardhat cctx 0x1e65910f544b4965e0205854595c3e448e60dd01a8658f5ccfd74d7d1870bc0a

✓ CCTXs on ZetaChain found.

✓ 0x770025d6523b056b10e1c82ae8802cdcb74b44b7fa80566e07aca5760aa7dbeb: 5 → 7001: OutboundMined (Remote omnichain contract call completed)
✓ 0x21f85af72700160b18edcf3c9a08ac3ea2fb13a840c13f92feb410453697850c: 7001 → 80001: PendingOutbound  → OutboundMined 

Bitcoin:

npx hardhat cctx 21025eefc85a197ebfa9cc6d74a28bfa0e4c9bf365103a77e9afabbab43d40a7

✓ CCTXs on ZetaChain found.

✓ 0x64767a7ddb614e28afde010db465949fe0dcbb5cb33db1965858a8dad190f4f0: 18332 → 7001: OutboundMined (Remote omnichain contract call completed)
✓ 0x2f0c06c0494afc3bfb3af0074e6cf2744d638d87e8040d37eb0354cd61477bea: 7001 → 5: PendingOutbound  → OutboundMined 

@fadeev fadeev marked this pull request as ready for review September 25, 2023 16:50
@fadeev
Copy link
Member Author

fadeev commented Sep 25, 2023

Not using the withdraw helper as it is in the toolkit, because it expects bytes32 and we're keeping recipient as bytes, so that we can store Bitcoin address there. Is the withdraw helper function production-ready: do we recommend using it in production contracts instead of using IZRC20(targetZRC20).withdraw() directly? If so, I propose we modify it to accept bytes and move it from SwapHelperLib to another file, because it's not only for swapping.

@fadeev
Copy link
Member Author

fadeev commented Oct 7, 2023

@andresaiello @lucas-janon please, review. Thanks!

@fadeev fadeev merged commit 12c6d3a into main Oct 9, 2023
4 checks passed
@fadeev fadeev deleted the swap-bitcoin branch October 9, 2023 17:55
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.

Make Swap tutorial Bitcoin compatible
2 participants