-
Notifications
You must be signed in to change notification settings - Fork 10
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 btc-sbtc swap #6
Open
friedger
wants to merge
19
commits into
feat/v5
Choose a base branch
from
feat/sbtc
base: feat/v5
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
121753c
replaced code in clarity-bitcoin in catamaran-btc with clarity-lib-v5…
Oyeins-GUI 3d294fb
chore: fix bns swap contract
friedger ca05001
updated to use clarity-bitcoin-lib-v5
Oyeins-GUI 479b542
updated test to work with btc-stx-swap.clar
Oyeins-GUI 378c04f
cost report for btc-stx-swap-v1 and v2
Oyeins-GUI a47c502
added clarity-bitcoin-lib-v5 as project requirement
Oyeins-GUI e7bfbc2
removed whitespace
Oyeins-GUI dec6ce7
Clarigen tests for xbtc ft/nft swaps
radicleart c6fa9c6
removed old tests.
radicleart ab7fb0e
corrected spelling
radicleart b2f34d0
fix blockheader size
friedger 1407159
Merge pull request #4 from Oyeins-GUI/fix-to-issue3
friedger 8c36767
Merge pull request #5 from radicleart/main
friedger fa4217d
Merge branch 'dev' into feat/sbtc
friedger 0e19ce0
fix btc stx swap header size
friedger 8e08db5
add test for rv
friedger 39f1762
add invariant test
friedger 17c708c
chore: move sbtc to own folder
friedger 8b31e03
chore: add finalize test
friedger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
# clarity-catamaranswaps | ||
|
||
Smart contracts for swapping assets on Stacks and Bitcoin | ||
|
||
## atomic-stx-ft | ||
## catamaran-sbtc | ||
|
||
## atomic-stx-nft | ||
BTC-sBTC swap | ||
|
||
## [WIP] catamaran-btc | ||
|
||
## catamaran-btc | ||
BTC-STX swap | ||
|
||
## atomic-stx-ft | ||
|
||
## atomic-stx-nft | ||
|
||
## friedger-token | ||
|
||
## [WIP] atomic-mia-ft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
# Set to your project's Clarinet config file | ||
clarinet = "./Clarinet.toml" | ||
|
||
# Set where you'd like TypeScript types output. | ||
# Comment or remove section to skip TypeScript types | ||
[types] | ||
# `output` should be a path to a single file | ||
output = "tests/clarigen-types.ts" | ||
|
||
# You can also specify multiple output paths: | ||
# outputs = [ | ||
# "src/clarigen-types.ts", | ||
# "test/clarigen-types.ts" | ||
# ] | ||
|
||
# `types.after` - script to run after TypeScript types are generated. | ||
# examples: | ||
# after = "npm run prettier -w ./src/clarigen-types.ts" | ||
# after = "echo 'yay'" | ||
|
||
# Set where you'd like generated contract docs | ||
# Generate docs by running `clarigen docs` | ||
[docs] | ||
# `output` should be a folder | ||
output = "docs" | ||
|
||
# `docs.after` - script to run after docs are generated. | ||
# examples: | ||
# after = "npm run prettier -w ./docs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Swaps DAO | ||
|
||
## Clarigen | ||
|
||
Project adds [Clarigen](https://www.clarigen.dev/docs/getting-started) to Friedger swap contracts. | ||
|
||
```bash | ||
npm init | ||
npm install --save-dev @clarigen/cli | ||
npm install -g pnpm | ||
npm i @clarigen/test | ||
npm i @clarigen/core | ||
clarigen init | ||
npx clarigen | ||
npx clarigen --watch | ||
``` | ||
|
||
## Tests | ||
|
||
```bash | ||
npm run test | ||
npm run watch | ||
``` | ||
|
||
## License | ||
|
||
MIT license, all good as long as the copyright and permission notice are included. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,290 @@ | ||
--- | ||
id: 0 | ||
name: "Simulated deployment, used as a default for `clarinet console`, `clarinet test` and `clarinet check`" | ||
network: simnet | ||
genesis: | ||
wallets: | ||
- name: deployer | ||
address: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM | ||
balance: "100000000000000" | ||
- name: wallet_1 | ||
address: ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5 | ||
balance: "100000000000000" | ||
- name: wallet_2 | ||
address: ST2CY5V39NHDPWSXMW9QDT3HC3GD6Q6XX4CFRK9AG | ||
balance: "100000000000000" | ||
- name: wallet_3 | ||
address: ST2JHG361ZXG51QTKY2NQCVBPPRRE2KZB1HR05NNC | ||
balance: "100000000000000" | ||
- name: wallet_4 | ||
address: ST2NEB84ASENDXKYGJPQW86YXQCEFEX2ZQPG87ND | ||
balance: "100000000000000" | ||
- name: wallet_5 | ||
address: ST2REHHS5J3CERCRBEPMGH7921Q6PYKAADT7JP2VB | ||
balance: "100000000000000" | ||
- name: wallet_6 | ||
address: ST3AM1A56AK2C1XAFJ4115ZSV26EB49BVQ10MGCS0 | ||
balance: "100000000000000" | ||
- name: wallet_7 | ||
address: ST3PF13W7Z0RRM42A8VZRVFQ75SV1K26RXEP8YGKJ | ||
balance: "100000000000000" | ||
- name: wallet_8 | ||
address: ST3NBRSFKX28FQ2ZJ1MAKX58HKHSDGNV5N7R21XCP | ||
balance: "100000000000000" | ||
- name: wallet_9 | ||
address: STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6 | ||
balance: "100000000000000" | ||
contracts: | ||
- costs | ||
- pox | ||
- pox-2 | ||
- pox-3 | ||
- pox-4 | ||
- lockup | ||
- costs-2 | ||
- costs-3 | ||
- cost-voting | ||
- bns | ||
plan: | ||
batches: | ||
- id: 0 | ||
transactions: [] | ||
epoch: "2.05" | ||
- id: 1 | ||
transactions: | ||
- emulated-contract-publish: | ||
contract-name: Wrapped-Bitcoin | ||
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM | ||
path: contracts/external/Wrapped-Bitcoin.clar | ||
clarity-version: 1 | ||
- emulated-contract-publish: | ||
contract-name: fixed-fees | ||
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM | ||
path: contracts/fixed-fees.clar | ||
clarity-version: 1 | ||
- emulated-contract-publish: | ||
contract-name: ft-trait | ||
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM | ||
path: contracts/external/ft-trait.clar | ||
clarity-version: 1 | ||
- emulated-contract-publish: | ||
contract-name: fun-nft | ||
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM | ||
path: contracts/external/fun-nft.clar | ||
clarity-version: 1 | ||
- emulated-contract-publish: | ||
contract-name: fun-token | ||
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM | ||
path: contracts/external/fun-token.clar | ||
clarity-version: 1 | ||
- emulated-contract-publish: | ||
contract-name: nft-trait | ||
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM | ||
path: contracts/external/nft-trait.clar | ||
clarity-version: 1 | ||
- emulated-contract-publish: | ||
contract-name: xbtc-ft-swap | ||
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM | ||
path: contracts/xbtc-ft-swap.clar | ||
clarity-version: 1 | ||
- emulated-contract-publish: | ||
contract-name: xbtc-nft-swap | ||
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM | ||
path: contracts/xbtc-nft-swap.clar | ||
clarity-version: 1 | ||
epoch: "2.1" | ||
- id: 2 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 3 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 4 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 5 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 6 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 7 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 8 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 9 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 10 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 11 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 12 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 13 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 14 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 15 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 16 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 17 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 18 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 19 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 20 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 21 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 22 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 23 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 24 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 25 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 26 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 27 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 28 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 29 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 30 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 31 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 32 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 33 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 34 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 35 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 36 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 37 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 38 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 39 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 40 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 41 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 42 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 43 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 44 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 45 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 46 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 47 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 48 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 49 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 50 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 51 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 52 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 53 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 54 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 55 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 56 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 57 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 58 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 59 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 60 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 61 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 62 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 63 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 64 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 65 | ||
transactions: [] | ||
epoch: "2.1" | ||
- id: 66 | ||
transactions: [] | ||
epoch: "2.1" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i need to work on this bug that adds many empty deployment batches 😬
It ony happens under certain conditions, you can manually edit the file to remove it (or delete the file completely and let clarient re-generate it)