-
Notifications
You must be signed in to change notification settings - Fork 355
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 cw20 support to atomic swap contract #27
Comments
Initial implementation is under the cw20-atomic-swaps branch. Unit tests to follow; PR to follow after it. I implemented functionality for the two tokens (native vs. cw20) into the same functions, for simplicity and consistency. Can separate them into different functions for clarity if you think it's worth it. |
There are some Another question: Is it worth it to improve the logs a little? Log the sender and amounts on creation, by example. |
PR: #72. |
Counting zero amounts as missing is a good check. I would filter out zeros in the native coins, and then ensure it has length >0 and only save the filtered list. For cw20 coins, yeah, rejecting 0 amounts sounds good. We should also reject such sends in cw20-base. Can you make an issue for that? |
Sure. #76 created. |
Closed by #72 |
Builds on #26
Just like
cw20-escrow
supports both native tokens and cw20 tokens (viaReceive
), the atomic swap contract should be extended with this. We do not want aTopUp
likecw20-escrow
, but the creation via direct function call or via the cw20::Receive entry point serve as a useful model on how to implement this.To test it, try swaping a native token vs a cw20 token using the same CosmWasm contract for both sides.
Once completed we can swap any native or cw20 token against eth or any erc20 token. Well.. we would need a UI for that, but the contracts are ready.
The text was updated successfully, but these errors were encountered: