Skip to content

Latest commit

 

History

History

ordyswap

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Ordinals Swap

Demonstrates trustless atomic swaps between Ordinals and Stacks.

Know your Contract

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 Ordinal
  • finalize-offer finalizes the transfer offer
  • cancel-offer function can be used to cancel a pending offer
  • refund-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.

Test your Contract

  • You can manually test your your contracts in the Clarinet console.
  • You can programmatically test your contracts with unit tests.