Skip to content
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

BREAKING CHANGE: rename contracts and restructure #1

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions Clarinet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,18 @@ telemetry = true
cache_dir = './.cache'
requirements = []

[contracts.stacks-m2m-aibtc]
path = 'src/stacks-m2m-aibtc.clar'
[contracts.aibtcdev-aibtc]
path = 'src/aibtcdev-aibtc.clar'
clarity_version = 2
epoch = 2.4

[contracts.stacks-m2m-trait-v1]
path = 'src/stacks-m2m-trait-v1.clar'
[contracts.aibtcdev-trait-v1]
path = 'src/aibtcdev-trait-v1.clar'
clarity_version = 2
epoch = 2.4

[contracts.stacks-m2m-v1]
path = 'src/stacks-m2m-v1.clar'
clarity_version = 2
epoch = 2.4

[contracts.stacks-m2m-v2]
path = 'src/stacks-m2m-v2.clar'
[contracts.aibtcdev-resources-v1]
path = 'src/aibtcdev-resources-v1.clar'
clarity_version = 2
epoch = 2.4

Expand Down
17 changes: 6 additions & 11 deletions deployments/default.simnet-plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,18 @@ plan:
- id: 0
transactions:
- emulated-contract-publish:
contract-name: stacks-m2m-aibtc
contract-name: aibtcdev-aibtc
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: src/stacks-m2m-aibtc.clar
path: src/aibtcdev-aibtc.clar
clarity-version: 2
- emulated-contract-publish:
contract-name: stacks-m2m-trait-v1
contract-name: aibtcdev-trait-v1
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: src/stacks-m2m-trait-v1.clar
path: src/aibtcdev-trait-v1.clar
clarity-version: 2
- emulated-contract-publish:
contract-name: stacks-m2m-v1
contract-name: aibtcdev-resources-v1
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: src/stacks-m2m-v1.clar
clarity-version: 2
- emulated-contract-publish:
contract-name: stacks-m2m-v2
emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
path: src/stacks-m2m-v2.clar
path: src/aibtcdev-resources-v1.clar
clarity-version: 2
epoch: "2.4"
2 changes: 1 addition & 1 deletion src/stacks-m2m-aibtc.clar → src/aibtcdev-aibtc.clar
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;; title: stacks-m2m-aibtc
;; title: aibtcdev-aibtc
;; version: 0.0.1
;; summary: Copy of ALEX aBTC contract for use on testnet only.

Expand Down
8 changes: 4 additions & 4 deletions src/stacks-m2m-v2.clar → src/aibtcdev-resources-v1.clar
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

;; title: stacks-m2m-v2
;; title: aibtcdev-resources-v1
;; version: 0.0.2
;; summary: HTTP 402 payments powered by Stacks

;; traits
;;
(impl-trait .stacks-m2m-trait-v1.stacks-m2m-trait-v1)
(impl-trait .aibtcdev-trait-v1.aibtcdev-trait-v1)

;; constants
;;
Expand Down Expand Up @@ -332,8 +332,8 @@
;; MAINNET
;; xBTC SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-wbtc
;; aBTC SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-abtc
(try! (contract-call? .stacks-m2m-aibtc transfer (get price resourceData) contract-caller (var-get paymentAddress) memo))
(try! (contract-call? .stacks-m2m-aibtc transfer (get price resourceData) contract-caller (var-get paymentAddress) none))
(try! (contract-call? .aibtcdev-aibtc transfer (get price resourceData) contract-caller (var-get paymentAddress) memo))
(try! (contract-call? .aibtcdev-aibtc transfer (get price resourceData) contract-caller (var-get paymentAddress) none))
)
;; return new count
(ok newCount)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(define-trait stacks-m2m-trait-v1
(define-trait aibtcdev-trait-v1
(
(set-payment-address (principal principal) (response bool uint))
(add-resource ((string-utf8 50) (string-utf8 255) uint) (response uint uint))
Expand Down
Loading
Loading