https://github.com/hirosystems/platform-template-ordyswap
https://github.com/hirosystems/platform-template-ordyswap
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hirosystems/platform-template-ordyswap
- Owner: hirosystems
- License: mit
- Created: 2025-01-22T19:32:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-11-14T22:26:19.000Z (8 months ago)
- Last Synced: 2025-12-23T06:43:50.389Z (6 months ago)
- Language: Clarity
- Size: 43.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/mechanismHQ/ordyswap) project.
The [ord-swap.clar](/examples/ordyswap/contracts/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, use [Clarinet](https://docs.hiro.so/stacks/clarinet).
## Test your Contract
+ You can manually test your your contracts in the [Clarinet console](https://docs.hiro.so/clarinet/how-to-guides/how-to-test-contract#load-contracts-in-a-console).
+ You can programmatically test your contracts with [unit tests](https://docs.hiro.so/clarinet/how-to-guides/how-to-test-contract).