Demonstrates trustless atomic swaps between Ordinals and Stacks.
For more details about this protocol in Stacks, please refer to Mechanism's Ordyswap project.
The ord-swap.clar contract includes the following functionality.
validate-offer-transfer
function validates the transfer of an Ordinalfinalize-offer
finalizes the transfer offercancel-offer
function can be used to cancel a pending offerrefund-cancelled-offer
function is used to refund a canceled offer back to the owner
To add new contracts, follow detailed instructions at Add new Contract.
NOTE: To use this example with Clarinet inside Hiro Platform, you can open the terminal session inside VS code by navigating to File -> View -> Terminal.
- You can manually test your your contracts in the Clarinet console.
- You can programmatically test your contracts with unit tests.