#native #token #contract #cosmwasm #funds #swapping #swap

cw-token-swap

A CosmWasm contract for swapping native and cw20 assets

7 stable releases

2.6.0 Nov 7, 2024
2.5.0 Oct 31, 2024
2.4.2 Jul 22, 2024
2.3.0 Oct 18, 2023
2.2.0 Jul 9, 2023

#842 in Magic Beans

Download history 69/week @ 2024-07-27 3/week @ 2024-08-03 5/week @ 2024-09-21 8/week @ 2024-09-28 127/week @ 2024-10-26 131/week @ 2024-11-02 24/week @ 2024-11-09

282 downloads per month

BSD-3-Clause

48KB
1.5K SLoC

cw-token-swap

cw-token-swap on crates.io docs.rs

This is an escrow token swap contract for swapping between native and cw20 tokens. The contract is instantiated with two counterparties and their promised funds. Promised funds may either be native tokens or cw20 tokens. Upon both counterparties providing the promised funds the transaction is completed and both sides receive their tokens.

At any time before the other counterparty has provided funds a counterparty may withdraw their funds.

Dependencies

~4–6MB
~126K SLoC