Skip to content

Commit

Permalink
feat: add bitflow-pool trait from dao
Browse files Browse the repository at this point in the history
Will help distinguish a normal pool from one deployed in our structure, just links to the same sip-010 transfer function and we're not using extension trait here since there is no is-dao-or-extension usage.
  • Loading branch information
whoabuddy committed Jan 10, 2025
1 parent e2f7f1f commit 3559921
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contracts/dao/extensions/aibtc-bitflow-pool.clar
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
(impl-trait 'ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8.xyk-pool-trait-v-1-2.xyk-pool-trait) ;; <%= it.bitflow_pool_trait %>
(use-trait sip-010-trait 'ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8.sip-010-trait-ft-standard.sip-010-trait) ;; <%= it.sip10_trait %>

;; implement aibtcdev trait
(impl-trait .aibtcdev-dao-traits-v1.bitflow-pool)

;; Define fungible pool token
(define-fungible-token pool-token)

Expand Down
6 changes: 6 additions & 0 deletions contracts/dao/traits/aibtcdev-dao-traits-v1.clar
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
(withdraw-stx () (response bool uint))
))

(define-trait bitflow-pool (
;; transfer funds (limited as we're just tagging this)
;; all functions are covered between sip-010 and bitflow-xyk
(transfer (uint principal principal (optional (buff 34))) (response bool uint))
))

(define-trait messaging (
;; send a message on-chain (opt from DAO)
;; @param msg the message to send (up to 1MB)
Expand Down

0 comments on commit 3559921

Please sign in to comment.