Skip to content

Commit 4bc0884

Browse files
committed
fix: use mainnet contracts directly for reqs
1 parent d792ad5 commit 4bc0884

File tree

4 files changed

+16
-148
lines changed

4 files changed

+16
-148
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
.cache/**
44
history.txt
55
node_modules
6-
lcov.info
6+
lcov.info
7+
.aider*
8+
.env

Clarinet.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ telemetry = true
66
cache_dir = './.cache'
77

88
[[project.requirements]]
9-
contract_id = 'ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.nft-trait.nft-trait'
9+
contract_id = 'SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait'
1010

1111
[[project.requirements]]
12-
contract_id = 'ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.sip-010-trait-ft-standard'
12+
contract_id = 'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard'
13+
14+
[[project.requirements]]
15+
contract_id = 'ST000000000000000000002AMW42H.pox-4'
1316

1417
[contracts.aibtc001-bootstrap]
1518
path = 'contracts/dao/proposals/aibtc001-bootstrap.clar'

contracts/dao/extensions/aibtcdev-treasury.clar

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
;;
77

88
(impl-trait .aibtcdev-extension-trait.extension-trait)
9-
;; MAINNET: 'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.sip-010-trait
10-
(use-trait ft-trait 'ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.sip-010-trait-ft-standard.sip-010-trait)
11-
;; MAINNET: 'SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.nft-trait
12-
(use-trait nft-trait 'ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.nft-trait.nft-trait)
9+
(use-trait ft-trait 'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.sip-010-trait)
10+
(use-trait nft-trait 'SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.nft-trait)
1311

1412
;; constants
1513
;;
@@ -18,11 +16,6 @@
1816
(define-constant ERR_UNKNOWN_ASSSET (err u2001))
1917
(define-constant TREASURY (as-contract tx-sender))
2018

21-
;; data vars
22-
;;
23-
(define-data-var poxContract principal 'SP000000000000000000002Q6VF78.pox-4)
24-
25-
2619
;; data maps
2720
;;
2821

@@ -83,7 +76,7 @@
8376
;; deposit FT to the treasury
8477
(define-public (deposit-ft (ft <ft-trait>) (amount uint))
8578
(begin
86-
(asserts! (is-allowed (contract-of ft)) ERR_UNKNOWN_ASSSET)
79+
(asserts! (is-allowed-asset (contract-of ft)) ERR_UNKNOWN_ASSSET)
8780
(print {
8881
notification: "deposit-ft",
8982
payload: {
@@ -101,7 +94,7 @@
10194
;; deposit NFT to the treasury
10295
(define-public (deposit-nft (nft <nft-trait>) (id uint))
10396
(begin
104-
(asserts! (is-allowed (contract-of nft)) ERR_UNKNOWN_ASSSET)
97+
(asserts! (is-allowed-asset (contract-of nft)) ERR_UNKNOWN_ASSSET)
10598
(print {
10699
notification: "deposit-nft",
107100
payload: {
@@ -137,7 +130,7 @@
137130
(define-public (withdraw-ft (ft <ft-trait>) (amount uint) (recipient principal))
138131
(begin
139132
(try! (is-dao-or-extension))
140-
(asserts! (is-allowed (contract-of ft)) ERR_UNKNOWN_ASSSET)
133+
(asserts! (is-allowed-asset (contract-of ft)) ERR_UNKNOWN_ASSSET)
141134
(print {
142135
notification: "withdraw-ft",
143136
payload: {
@@ -155,7 +148,7 @@
155148
(define-public (withdraw-nft (nft <nft-trait>) (id uint) (recipient principal))
156149
(begin
157150
(try! (is-dao-or-extension))
158-
(asserts! (is-allowed (contract-of nft)) ERR_UNKNOWN_ASSSET)
151+
(asserts! (is-allowed-asset (contract-of nft)) ERR_UNKNOWN_ASSSET)
159152
(print {
160153
notification: "withdraw-nft",
161154
payload: {
@@ -183,7 +176,7 @@
183176
sender: tx-sender
184177
}
185178
})
186-
(match (as-contract (contract-call? (var-get poxContract) delegate-stx maxAmount to none none))
179+
(match (as-contract (contract-call? 'SP000000000000000000002Q6VF78.pox-4 delegate-stx maxAmount to none none))
187180
success (ok success)
188181
err (err (to-uint err))
189182
)
@@ -201,7 +194,7 @@
201194
sender: tx-sender
202195
}
203196
})
204-
(match (as-contract (contract-call? (var-get poxContract) revoke-delegate-stx))
197+
(match (as-contract (contract-call? 'SP000000000000000000002Q6VF78.pox-4 revoke-delegate-stx))
205198
success (begin (print success) (ok true))
206199
err (err (to-uint err))
207200
)

deployments/default.simnet-plan.yaml

Lines changed: 0 additions & 130 deletions
This file was deleted.

0 commit comments

Comments
 (0)