|  | 
| 6 | 6 | ;; | 
| 7 | 7 | 
 | 
| 8 | 8 | (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) | 
| 13 | 11 | 
 | 
| 14 | 12 | ;; constants | 
| 15 | 13 | ;; | 
|  | 
| 18 | 16 | (define-constant ERR_UNKNOWN_ASSSET (err u2001)) | 
| 19 | 17 | (define-constant TREASURY (as-contract tx-sender)) | 
| 20 | 18 | 
 | 
| 21 |  | -;; data vars | 
| 22 |  | -;; | 
| 23 |  | -(define-data-var poxContract principal 'SP000000000000000000002Q6VF78.pox-4) | 
| 24 |  | - | 
| 25 |  | - | 
| 26 | 19 | ;; data maps | 
| 27 | 20 | ;; | 
| 28 | 21 | 
 | 
|  | 
| 83 | 76 | ;; deposit FT to the treasury | 
| 84 | 77 | (define-public (deposit-ft (ft <ft-trait>) (amount uint)) | 
| 85 | 78 |   (begin | 
| 86 |  | -    (asserts! (is-allowed (contract-of ft)) ERR_UNKNOWN_ASSSET) | 
|  | 79 | +    (asserts! (is-allowed-asset (contract-of ft)) ERR_UNKNOWN_ASSSET) | 
| 87 | 80 |     (print { | 
| 88 | 81 |       notification: "deposit-ft", | 
| 89 | 82 |       payload: { | 
|  | 
| 101 | 94 | ;; deposit NFT to the treasury | 
| 102 | 95 | (define-public (deposit-nft (nft <nft-trait>) (id uint)) | 
| 103 | 96 |   (begin | 
| 104 |  | -    (asserts! (is-allowed (contract-of nft)) ERR_UNKNOWN_ASSSET) | 
|  | 97 | +    (asserts! (is-allowed-asset (contract-of nft)) ERR_UNKNOWN_ASSSET) | 
| 105 | 98 |     (print { | 
| 106 | 99 |       notification: "deposit-nft", | 
| 107 | 100 |       payload: { | 
|  | 
| 137 | 130 | (define-public (withdraw-ft (ft <ft-trait>) (amount uint) (recipient principal)) | 
| 138 | 131 |   (begin | 
| 139 | 132 |     (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) | 
| 141 | 134 |     (print { | 
| 142 | 135 |       notification: "withdraw-ft", | 
| 143 | 136 |       payload: { | 
|  | 
| 155 | 148 | (define-public (withdraw-nft (nft <nft-trait>) (id uint) (recipient principal)) | 
| 156 | 149 |   (begin | 
| 157 | 150 |     (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) | 
| 159 | 152 |     (print { | 
| 160 | 153 |       notification: "withdraw-nft", | 
| 161 | 154 |       payload: { | 
|  | 
| 183 | 176 |         sender: tx-sender | 
| 184 | 177 |       } | 
| 185 | 178 |     }) | 
| 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)) | 
| 187 | 180 |       success (ok success) | 
| 188 | 181 |       err (err (to-uint err)) | 
| 189 | 182 |     ) | 
|  | 
| 201 | 194 |         sender: tx-sender | 
| 202 | 195 |       } | 
| 203 | 196 |     }) | 
| 204 |  | -    (match (as-contract (contract-call? (var-get poxContract) revoke-delegate-stx)) | 
|  | 197 | +    (match (as-contract (contract-call? 'SP000000000000000000002Q6VF78.pox-4 revoke-delegate-stx)) | 
| 205 | 198 |       success (begin (print success) (ok true)) | 
| 206 | 199 |       err (err (to-uint err)) | 
| 207 | 200 |     ) | 
|  | 
0 commit comments