From 4b225cefc035dbcd78c5faeec2b20867a4dd24ea Mon Sep 17 00:00:00 2001 From: Lukasz <829210+LNow@users.noreply.github.com> Date: Tue, 14 Jan 2025 17:11:24 +0100 Subject: [PATCH 01/10] Add function that calculate liquid supply --- contracts/dao/extensions/aibtc-token.clar | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/dao/extensions/aibtc-token.clar b/contracts/dao/extensions/aibtc-token.clar index b1c04708..160f5191 100644 --- a/contracts/dao/extensions/aibtc-token.clar +++ b/contracts/dao/extensions/aibtc-token.clar @@ -113,4 +113,8 @@ (try! (ft-mint? SYMBOL (/ (* MAXSUPPLY u20) u100) .aibtc-token-dex)) ;; <%= it.token_symbol %> <%= it.dex_contract %> ;; mint tokens to the treasury (80%) (try! (ft-mint? SYMBOL (/ (* MAXSUPPLY u80) u100) .aibtc-treasury)) ;; <%= it.token_symbol %> <%= it.treasury_contract %> +) +;; Total supply - tokens in treasury - tokens in dex +(define-read-only (get-liquid-supply) + (- (ft-get-supply SYMBOL) (ft-get-balance SYMBOL .aibtc-treasury) (ft-get-balance SYMBOL .aibtc-token-dex)) ) \ No newline at end of file From cd8af2cc43207c3ead5a579f9ccbb77915fe99ac Mon Sep 17 00:00:00 2001 From: Lukasz <829210+LNow@users.noreply.github.com> Date: Tue, 14 Jan 2025 17:14:06 +0100 Subject: [PATCH 02/10] use liquidSupply in conclude-proposal --- contracts/dao/extensions/aibtc-action-proposals.clar | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/contracts/dao/extensions/aibtc-action-proposals.clar b/contracts/dao/extensions/aibtc-action-proposals.clar index 895adc04..54fdc7f9 100644 --- a/contracts/dao/extensions/aibtc-action-proposals.clar +++ b/contracts/dao/extensions/aibtc-action-proposals.clar @@ -69,6 +69,7 @@ endBlock: uint, ;; block height votesFor: uint, ;; total votes for votesAgainst: uint, ;; total votes against + liquidTokens: uint, ;; liquid tokens concluded: bool, ;; has the proposal concluded passed: bool, ;; did the proposal pass } @@ -114,6 +115,7 @@ ( (newId (+ (var-get proposalCount) u1)) (voterBalance (unwrap! (contract-call? .aibtc-token get-balance tx-sender) ERR_FETCHING_TOKEN_DATA)) + (liquidTokens (contract-call? .aibtc-token get-liquid-supply)) ) ;; required variables must be set (asserts! (is-initialized) ERR_NOT_INITIALIZED) @@ -142,6 +144,7 @@ endBlock: (+ burn-block-height VOTING_PERIOD), votesFor: u0, votesAgainst: u0, + liquidTokens: liquidTokens, concluded: false, passed: false, }) ERR_SAVING_PROPOSAL) @@ -194,17 +197,15 @@ (let ( (proposalRecord (unwrap! (map-get? Proposals proposalId) ERR_PROPOSAL_NOT_FOUND)) - (tokenTotalSupply (unwrap! (contract-call? .aibtc-token get-total-supply) ERR_FETCHING_TOKEN_DATA)) - (treasuryContract (contract-of treasury)) - (treasuryBalance (unwrap! (contract-call? .aibtc-token get-balance treasuryContract) ERR_FETCHING_TOKEN_DATA)) - (votePassed (> (get votesFor proposalRecord) (* tokenTotalSupply (- u100 treasuryBalance) VOTING_QUORUM))) + ;; if VOTING_QUORUM <= ((votesFor * 100) / liquidTokens) + (votePassed (<= VOTING_QUORUM (/ (* (get votesFor proposalRecord) u100) (get liquidTokens proposalRecord)))) ) ;; required variables must be set (asserts! (is-initialized) ERR_NOT_INITIALIZED) ;; verify extension still active in dao (try! (as-contract (is-dao-or-extension))) ;; verify treasury matches protocol treasury - (asserts! (is-eq treasuryContract (var-get protocolTreasury)) ERR_TREASURY_MISMATCH) + (asserts! (is-eq (contract-of treasury) (var-get protocolTreasury)) ERR_TREASURY_MISMATCH) ;; proposal past end block height (asserts! (>= burn-block-height (get endBlock proposalRecord)) ERR_PROPOSAL_STILL_ACTIVE) ;; proposal not already concluded From 91b41b2caee1b0d039ea56fe474d411d0a0d859f Mon Sep 17 00:00:00 2001 From: Lukasz <829210+LNow@users.noreply.github.com> Date: Tue, 14 Jan 2025 17:14:24 +0100 Subject: [PATCH 03/10] Add extra helper function to calculate user voting power in specific proposal --- contracts/dao/extensions/aibtc-action-proposals.clar | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/contracts/dao/extensions/aibtc-action-proposals.clar b/contracts/dao/extensions/aibtc-action-proposals.clar index 54fdc7f9..5b32ce98 100644 --- a/contracts/dao/extensions/aibtc-action-proposals.clar +++ b/contracts/dao/extensions/aibtc-action-proposals.clar @@ -238,6 +238,17 @@ ;; read only functions ;; +(define-read-only (get-voting-power (who principal) (proposalId uint)) + (let + ( + (proposalRecord (unwrap! (map-get? Proposals proposalId) ERR_PROPOSAL_NOT_FOUND)) + (proposalBlockHash (unwrap! (get-block-hash (get startBlock proposalRecord)) ERR_RETRIEVING_START_BLOCK_HASH)) + ) + (at-block proposalBlockHash (contract-call? .aibtc-token get-balance who)) + ) +) + + (define-read-only (get-protocol-treasury) (if (is-eq (var-get protocolTreasury) SELF) none From c36728a81eb9b5053dc8e9276813256da6775b3f Mon Sep 17 00:00:00 2001 From: Jason Schrader Date: Tue, 14 Jan 2025 12:43:53 -0700 Subject: [PATCH 04/10] fix: remove init functions and fix errors This greatly simplifies things as we can drop in template values where needed vs trying to initialize everything after the fact and require calling functions with extra information, e.g. trait contracts. From here we can review how to calculate liquid balance at proposal block, then complete the voting logic. --- Clarinet.toml | 10 -- .../extensions/aibtc-action-proposals.clar | 87 ++++---------- .../dao/extensions/aibtc-core-proposals.clar | 112 +++--------------- ...ction-proposals-set-protocol-treasury.clar | 5 - .../aibtc-base-bootstrap-initialization.clar | 4 - ...-core-proposals-set-protocol-treasury.clar | 5 - .../dao/traits/aibtcdev-dao-traits-v1.clar | 25 +--- 7 files changed, 48 insertions(+), 200 deletions(-) delete mode 100644 contracts/dao/proposals/aibtc-action-proposals-set-protocol-treasury.clar delete mode 100644 contracts/dao/proposals/aibtc-core-proposals-set-protocol-treasury.clar diff --git a/Clarinet.toml b/Clarinet.toml index fc598801..6897c9e0 100644 --- a/Clarinet.toml +++ b/Clarinet.toml @@ -302,16 +302,6 @@ path = 'contracts/dao/proposals/aibtc-treasury-withdraw-stx.clar' clarity_version = 2 epoch = 3.0 -[contracts.aibtc-action-proposals-set-protocol-treasury] -path = 'contracts/dao/proposals/aibtc-action-proposals-set-protocol-treasury.clar' -clarity_version = 2 -epoch = 3.0 - -[contracts.aibtc-core-proposals-set-protocol-treasury] -path = 'contracts/dao/proposals/aibtc-core-proposals-set-protocol-treasury.clar' -clarity_version = 2 -epoch = 3.0 - # dao traits [contracts.aibtcdev-dao-traits-v1] diff --git a/contracts/dao/extensions/aibtc-action-proposals.clar b/contracts/dao/extensions/aibtc-action-proposals.clar index 5b32ce98..320116e2 100644 --- a/contracts/dao/extensions/aibtc-action-proposals.clar +++ b/contracts/dao/extensions/aibtc-action-proposals.clar @@ -16,43 +16,38 @@ ;; (define-constant SELF (as-contract tx-sender)) (define-constant VOTING_PERIOD u144) ;; 144 Bitcoin blocks, ~1 day -(define-constant VOTING_QUORUM u66) ;; 66% of liquid supply (total supply - treasury) +(define-constant VOTING_QUORUM u66) ;; 66% of liquid supply ;; error messages - authorization (define-constant ERR_NOT_DAO_OR_EXTENSION (err u1000)) -;; error messages - initialization -(define-constant ERR_NOT_INITIALIZED (err u1100)) - -;; error messages - treasury -(define-constant ERR_TREASURY_CANNOT_BE_SELF (err u1200)) -(define-constant ERR_TREASURY_MISMATCH (err u1201)) -(define-constant ERR_TREASURY_CANNOT_BE_SAME (err u1202)) - ;; error messages - voting token -(define-constant ERR_INSUFFICIENT_BALANCE (err u1300)) -(define-constant ERR_FETCHING_TOKEN_DATA (err u1301)) +(define-constant ERR_INSUFFICIENT_BALANCE (err u1100)) +(define-constant ERR_FETCHING_TOKEN_DATA (err u1101)) ;; error messages - proposals -(define-constant ERR_PROPOSAL_NOT_FOUND (err u1400)) -(define-constant ERR_PROPOSAL_STILL_ACTIVE (err u1401)) -(define-constant ERR_SAVING_PROPOSAL (err u1402)) -(define-constant ERR_PROPOSAL_ALREADY_CONCLUDED (err u1403)) -(define-constant ERR_RETRIEVING_START_BLOCK_HASH (err u1404)) +(define-constant ERR_PROPOSAL_NOT_FOUND (err u1200)) +(define-constant ERR_PROPOSAL_STILL_ACTIVE (err u1201)) +(define-constant ERR_SAVING_PROPOSAL (err u1202)) +(define-constant ERR_PROPOSAL_ALREADY_CONCLUDED (err u1203)) +(define-constant ERR_RETRIEVING_START_BLOCK_HASH (err u1204)) ;; error messages - voting -(define-constant ERR_VOTE_TOO_SOON (err u1500)) -(define-constant ERR_VOTE_TOO_LATE (err u1501)) -(define-constant ERR_ALREADY_VOTED (err u1502)) -(define-constant ERR_ZERO_VOTING_POWER (err u1503)) -(define-constant ERR_QUORUM_NOT_REACHED (err u1504)) +(define-constant ERR_VOTE_TOO_SOON (err u1300)) +(define-constant ERR_VOTE_TOO_LATE (err u1301)) +(define-constant ERR_ALREADY_VOTED (err u1302)) +(define-constant ERR_QUORUM_NOT_REACHED (err u1303)) ;; error messages - actions -(define-constant ERR_INVALID_ACTION (err u1600)) +(define-constant ERR_INVALID_ACTION (err u1400)) + +;; contracts used for voting calculations +(define-constant VOTING_TOKEN_DEX .aibtc-token-dex) +(define-constant VOTING_TOKEN_POOL .aibtc-bitflow-pool) +(define-constant VOTING_TREASURY .aibtc-treasury) ;; data vars ;; -(define-data-var protocolTreasury principal SELF) ;; the treasury contract for protocol funds (define-data-var proposalCount uint u0) ;; total number of proposals ;; data maps @@ -90,26 +85,6 @@ (ok true) ) -(define-public (set-protocol-treasury (treasury )) - (let - ( - (treasuryContract (contract-of treasury)) - ) - (try! (is-dao-or-extension)) - ;; cannot set treasury to self - (asserts! (not (is-eq treasuryContract SELF)) ERR_TREASURY_CANNOT_BE_SELF) - ;; cannot set treasury to same value - (asserts! (not (is-eq treasuryContract (var-get protocolTreasury))) ERR_TREASURY_CANNOT_BE_SAME) - (print { - notification: "set-protocol-treasury", - payload: { - treasury: treasuryContract - } - }) - (ok (var-set protocolTreasury treasuryContract)) - ) -) - (define-public (propose-action (action ) (parameters (buff 2048))) (let ( @@ -117,8 +92,6 @@ (voterBalance (unwrap! (contract-call? .aibtc-token get-balance tx-sender) ERR_FETCHING_TOKEN_DATA)) (liquidTokens (contract-call? .aibtc-token get-liquid-supply)) ) - ;; required variables must be set - (asserts! (is-initialized) ERR_NOT_INITIALIZED) ;; caller has the required balance (asserts! (> voterBalance u0) ERR_INSUFFICIENT_BALANCE) ;; print proposal creation event @@ -161,8 +134,6 @@ (proposalBlockHash (unwrap! (get-block-hash proposalBlock) ERR_RETRIEVING_START_BLOCK_HASH)) (senderBalance (unwrap! (at-block proposalBlockHash (contract-call? .aibtc-token get-balance tx-sender)) ERR_FETCHING_TOKEN_DATA)) ) - ;; required variables must be set - (asserts! (is-initialized) ERR_NOT_INITIALIZED) ;; caller has the required balance (asserts! (> senderBalance u0) ERR_INSUFFICIENT_BALANCE) ;; proposal not still active @@ -193,19 +164,15 @@ ) ) -(define-public (conclude-proposal (proposalId uint) (action ) (treasury )) +(define-public (conclude-proposal (proposalId uint) (action )) (let ( (proposalRecord (unwrap! (map-get? Proposals proposalId) ERR_PROPOSAL_NOT_FOUND)) ;; if VOTING_QUORUM <= ((votesFor * 100) / liquidTokens) (votePassed (<= VOTING_QUORUM (/ (* (get votesFor proposalRecord) u100) (get liquidTokens proposalRecord)))) ) - ;; required variables must be set - (asserts! (is-initialized) ERR_NOT_INITIALIZED) ;; verify extension still active in dao (try! (as-contract (is-dao-or-extension))) - ;; verify treasury matches protocol treasury - (asserts! (is-eq (contract-of treasury) (var-get protocolTreasury)) ERR_TREASURY_MISMATCH) ;; proposal past end block height (asserts! (>= burn-block-height (get endBlock proposalRecord)) ERR_PROPOSAL_STILL_ACTIVE) ;; proposal not already concluded @@ -248,12 +215,12 @@ ) ) - -(define-read-only (get-protocol-treasury) - (if (is-eq (var-get protocolTreasury) SELF) - none - (some (var-get protocolTreasury)) - ) +(define-read-only (get-linked-voting-contracts) + { + treasury: VOTING_TREASURY, + token-dex: VOTING_TOKEN_DEX, + token-pool: VOTING_TOKEN_POOL + } ) (define-read-only (get-proposal (proposalId uint)) @@ -264,10 +231,6 @@ (default-to u0 (map-get? VotingRecords {proposalId: proposalId, voter: voter})) ) -(define-read-only (is-initialized) - (not (is-eq (var-get protocolTreasury) SELF)) -) - (define-read-only (get-voting-period) VOTING_PERIOD ) diff --git a/contracts/dao/extensions/aibtc-core-proposals.clar b/contracts/dao/extensions/aibtc-core-proposals.clar index 5738ca60..67d6d7b0 100644 --- a/contracts/dao/extensions/aibtc-core-proposals.clar +++ b/contracts/dao/extensions/aibtc-core-proposals.clar @@ -17,13 +17,11 @@ (define-constant SELF (as-contract tx-sender)) (define-constant VOTING_PERIOD u144) ;; 144 Bitcoin blocks, ~1 day -(define-constant VOTING_QUORUM u95) ;; 95% of liquid supply (total supply - treasury) +(define-constant VOTING_QUORUM u95) ;; 95% of liquid supply ;; error messages - authorization (define-constant ERR_NOT_DAO_OR_EXTENSION (err u3000)) - -;; error messages - initialization -(define-constant ERR_NOT_INITIALIZED (err u3100)) +(define-constant ERR_FETCHING_TOKEN_DATA (err u3001)) ;; error messages - treasury (define-constant ERR_TREASURY_CANNOT_BE_SELF (err u3200)) @@ -49,12 +47,12 @@ (define-constant ERR_VOTE_TOO_SOON (err u3500)) (define-constant ERR_VOTE_TOO_LATE (err u3501)) (define-constant ERR_ALREADY_VOTED (err u3502)) -(define-constant ERR_QUORUM_NOT_REACHED (err u3504)) +(define-constant ERR_QUORUM_NOT_REACHED (err u3503)) -;; data vars -;; -(define-data-var protocolTreasury principal SELF) ;; the treasury contract for protocol funds -(define-data-var votingToken principal SELF) ;; the FT contract used for voting +;; contracts used for voting calculations +(define-constant VOTING_TOKEN_DEX .aibtc-token-dex) +(define-constant VOTING_TOKEN_POOL .aibtc-bitflow-pool) +(define-constant VOTING_TREASURY .aibtc-treasury) ;; data maps ;; @@ -88,60 +86,13 @@ (ok true) ) -(define-public (set-protocol-treasury (treasury )) - (let - ( - (treasuryContract (contract-of treasury)) - ) - (try! (is-dao-or-extension)) - ;; cannot set treasury to self - (asserts! (not (is-eq treasuryContract SELF)) ERR_TREASURY_CANNOT_BE_SELF) - ;; cannot set treasury to same value - (asserts! (not (is-eq treasuryContract (var-get protocolTreasury))) ERR_TREASURY_CANNOT_BE_SAME) - (print { - notification: "set-protocol-treasury", - payload: { - treasury: treasuryContract - } - }) - (ok (var-set protocolTreasury treasuryContract)) - ) -) - -(define-public (set-voting-token (token )) - (let - ( - (tokenContract (contract-of token)) - ) - (try! (is-dao-or-extension)) - ;; cannot set token to self - (asserts! (not (is-eq tokenContract SELF)) ERR_TOKEN_CANNOT_BE_SELF) - ;; cannot set token to same value - (asserts! (not (is-eq tokenContract (var-get votingToken))) ERR_TOKEN_CANNOT_BE_SAME) - ;; cannot set token if already set once - (asserts! (is-eq (var-get votingToken) SELF) ERR_TOKEN_ALREADY_INITIALIZED) - (print { - notification: "set-voting-token", - payload: { - token: tokenContract - } - }) - (ok (var-set votingToken tokenContract)) - ) -) - -(define-public (create-proposal (proposal ) (token )) +(define-public (create-proposal (proposal )) (let ( (proposalContract (contract-of proposal)) - (tokenContract (contract-of token)) ) - ;; required variables must be set - (asserts! (is-initialized) ERR_NOT_INITIALIZED) - ;; token matches set voting token - (asserts! (is-eq tokenContract (var-get votingToken)) ERR_TOKEN_MISMATCH) ;; caller has the required balance - (asserts! (> (try! (contract-call? token get-balance tx-sender)) u0) ERR_INSUFFICIENT_BALANCE) + (asserts! (> (unwrap! (contract-call? .aibtc-token get-balance tx-sender) ERR_FETCHING_TOKEN_DATA) u0) ERR_INSUFFICIENT_BALANCE) ;; proposal was not already executed (asserts! (is-none (contract-call? .aibtcdev-base-dao executed-at proposal)) ERR_PROPOSAL_ALREADY_EXECUTED) ;; print proposal creation event @@ -168,21 +119,16 @@ }) ERR_SAVING_PROPOSAL)) )) -(define-public (vote-on-proposal (proposal ) (token ) (vote bool)) +(define-public (vote-on-proposal (proposal ) (vote bool)) (let ( (proposalContract (contract-of proposal)) (proposalRecord (unwrap! (map-get? Proposals proposalContract) ERR_PROPOSAL_NOT_FOUND)) (proposalBlock (get startBlock proposalRecord)) (proposalBlockHash (unwrap! (get-block-hash proposalBlock) ERR_RETRIEVING_START_BLOCK_HASH)) - (tokenContract (contract-of token)) (senderBalanceResponse (at-block proposalBlockHash (contract-call? .aibtc-token get-balance tx-sender))) (senderBalance (unwrap-panic senderBalanceResponse)) ) - ;; required variables must be set - (asserts! (is-initialized) ERR_NOT_INITIALIZED) - ;; token matches set voting token - (asserts! (is-eq tokenContract (var-get votingToken)) ERR_TOKEN_MISMATCH) ;; caller has the required balance (asserts! (> senderBalance u0) ERR_INSUFFICIENT_BALANCE) ;; proposal was not already executed @@ -215,21 +161,15 @@ ) ) -(define-public (conclude-proposal (proposal ) (treasury ) (token )) +(define-public (conclude-proposal (proposal )) (let ( (proposalContract (contract-of proposal)) (proposalRecord (unwrap! (map-get? Proposals proposalContract) ERR_PROPOSAL_NOT_FOUND)) - (tokenContract (contract-of token)) - (tokenTotalSupply (try! (contract-call? token get-total-supply))) - (treasuryContract (contract-of treasury)) - (treasuryBalance (try! (contract-call? token get-balance treasuryContract))) + (tokenTotalSupply (unwrap! (contract-call? .aibtc-token get-total-supply) ERR_FETCHING_TOKEN_DATA)) + (treasuryBalance (unwrap! (contract-call? .aibtc-token get-balance .aibtc-treasury) ERR_FETCHING_TOKEN_DATA)) (votePassed (> (get votesFor proposalRecord) (* tokenTotalSupply (- u100 treasuryBalance) VOTING_QUORUM))) ) - ;; required variables must be set - (asserts! (is-initialized) ERR_NOT_INITIALIZED) - ;; verify treasury matches protocol treasury - (asserts! (is-eq treasuryContract (var-get protocolTreasury)) ERR_TREASURY_MISMATCH) ;; proposal was not already executed (asserts! (is-none (contract-call? .aibtcdev-base-dao executed-at proposal)) ERR_PROPOSAL_ALREADY_EXECUTED) ;; proposal past end block height @@ -261,18 +201,12 @@ ;; read only functions ;; -(define-read-only (get-protocol-treasury) - (if (is-eq (var-get protocolTreasury) SELF) - none - (some (var-get protocolTreasury)) - ) -) - -(define-read-only (get-voting-token) - (if (is-eq (var-get votingToken) SELF) - none - (some (var-get votingToken)) - ) +(define-read-only (get-linked-voting-contracts) + { + treasury: VOTING_TREASURY, + token-dex: VOTING_TOKEN_DEX, + token-pool: VOTING_TOKEN_POOL + } ) (define-read-only (get-proposal (proposal principal)) @@ -283,14 +217,6 @@ (default-to u0 (map-get? VotingRecords {proposal: proposal, voter: voter})) ) -(define-read-only (is-initialized) - ;; check if the required variables are set - (not (or - (is-eq (var-get votingToken) SELF) - (is-eq (var-get protocolTreasury) SELF) - )) -) - (define-read-only (get-voting-period) VOTING_PERIOD ) diff --git a/contracts/dao/proposals/aibtc-action-proposals-set-protocol-treasury.clar b/contracts/dao/proposals/aibtc-action-proposals-set-protocol-treasury.clar deleted file mode 100644 index c2043c17..00000000 --- a/contracts/dao/proposals/aibtc-action-proposals-set-protocol-treasury.clar +++ /dev/null @@ -1,5 +0,0 @@ -(impl-trait .aibtcdev-dao-traits-v1.proposal) - -(define-public (execute (sender principal)) - (contract-call? .aibtc-action-proposals set-protocol-treasury .aibtc-treasury) -) diff --git a/contracts/dao/proposals/aibtc-base-bootstrap-initialization.clar b/contracts/dao/proposals/aibtc-base-bootstrap-initialization.clar index f28cb4bf..fc1a16f7 100644 --- a/contracts/dao/proposals/aibtc-base-bootstrap-initialization.clar +++ b/contracts/dao/proposals/aibtc-base-bootstrap-initialization.clar @@ -28,10 +28,6 @@ {extension: .aibtc-action-toggle-resource-by-name, enabled: true} ) )) - ;; initialize action proposals - (try! (contract-call? .aibtc-action-proposals set-protocol-treasury .aibtc-treasury)) - ;; initialize core proposals - (try! (contract-call? .aibtc-core-proposals set-protocol-treasury .aibtc-treasury)) ;; send DAO manifest as onchain message (try! (contract-call? .aibtc-onchain-messaging send DAO_MANIFEST true)) ;; allow assets in treasury diff --git a/contracts/dao/proposals/aibtc-core-proposals-set-protocol-treasury.clar b/contracts/dao/proposals/aibtc-core-proposals-set-protocol-treasury.clar deleted file mode 100644 index c2043c17..00000000 --- a/contracts/dao/proposals/aibtc-core-proposals-set-protocol-treasury.clar +++ /dev/null @@ -1,5 +0,0 @@ -(impl-trait .aibtcdev-dao-traits-v1.proposal) - -(define-public (execute (sender principal)) - (contract-call? .aibtc-action-proposals set-protocol-treasury .aibtc-treasury) -) diff --git a/contracts/dao/traits/aibtcdev-dao-traits-v1.clar b/contracts/dao/traits/aibtcdev-dao-traits-v1.clar index 6c6c7d86..df33e620 100644 --- a/contracts/dao/traits/aibtcdev-dao-traits-v1.clar +++ b/contracts/dao/traits/aibtcdev-dao-traits-v1.clar @@ -26,10 +26,6 @@ )) (define-trait action-proposals ( - ;; set the protocol treasury contract - ;; @param treasury the treasury contract principal - ;; @returns (response bool uint) - (set-protocol-treasury () (response bool uint)) ;; propose a new action ;; @param action the action contract ;; @param parameters encoded action parameters @@ -43,9 +39,8 @@ ;; conclude a proposal after voting period ;; @param proposal the proposal id ;; @param action the action contract - ;; @param treasury the treasury contract ;; @returns (response bool uint) - (conclude-proposal (uint ) (response bool uint)) + (conclude-proposal (uint ) (response bool uint)) )) (define-trait bank-account ( @@ -81,31 +76,19 @@ )) (define-trait core-proposals ( - ;; set the protocol treasury contract - ;; @param treasury the treasury contract principal - ;; @returns (response bool uint) - (set-protocol-treasury () (response bool uint)) - ;; set the voting token contract - ;; @param token the token contract principal - ;; @returns (response bool uint) - (set-voting-token () (response bool uint)) ;; create a new proposal ;; @param proposal the proposal contract - ;; @param token the voting token contract ;; @returns (response bool uint) - (create-proposal ( ) (response bool uint)) + (create-proposal () (response bool uint)) ;; vote on an existing proposal ;; @param proposal the proposal contract - ;; @param token the voting token contract ;; @param vote true for yes, false for no ;; @returns (response bool uint) - (vote-on-proposal ( bool) (response bool uint)) + (vote-on-proposal ( bool) (response bool uint)) ;; conclude a proposal after voting period ;; @param proposal the proposal contract - ;; @param treasury the treasury contract - ;; @param token the voting token contract ;; @returns (response bool uint) - (conclude-proposal ( ) (response bool uint)) + (conclude-proposal () (response bool uint)) )) (define-trait messaging ( From ab22417f057f4046328ee7405b8751699bafea3a Mon Sep 17 00:00:00 2001 From: Jason Schrader Date: Tue, 14 Jan 2025 13:00:56 -0700 Subject: [PATCH 05/10] fix: move calculation for liquid supply into proposal contracts This hardcodes them for the purpose we're using them for, and they can be extended/upgraded/changed out in the future. This way the voting calculations are not in flux if something changes, and we can use the templates to provide the correct contract names when generating the contracts. --- .../extensions/aibtc-action-proposals.clar | 15 ++++++++++- .../dao/extensions/aibtc-core-proposals.clar | 27 +++++++++++++++++++ contracts/dao/extensions/aibtc-token.clar | 4 --- 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/contracts/dao/extensions/aibtc-action-proposals.clar b/contracts/dao/extensions/aibtc-action-proposals.clar index 320116e2..78705f94 100644 --- a/contracts/dao/extensions/aibtc-action-proposals.clar +++ b/contracts/dao/extensions/aibtc-action-proposals.clar @@ -90,7 +90,7 @@ ( (newId (+ (var-get proposalCount) u1)) (voterBalance (unwrap! (contract-call? .aibtc-token get-balance tx-sender) ERR_FETCHING_TOKEN_DATA)) - (liquidTokens (contract-call? .aibtc-token get-liquid-supply)) + (liquidTokens (try! (get-liquid-supply block-height))) ) ;; caller has the required balance (asserts! (> voterBalance u0) ERR_INSUFFICIENT_BALANCE) @@ -256,3 +256,16 @@ (define-private (get-block-hash (blockHeight uint)) (get-block-info? id-header-hash blockHeight) ) + +(define-private (get-liquid-supply (blockHeight uint)) + (let + ( + (blockHash (unwrap! (get-block-hash blockHeight) ERR_RETRIEVING_START_BLOCK_HASH)) + (totalSupply (unwrap! (at-block blockHash (contract-call? .aibtc-token get-total-supply)) ERR_FETCHING_TOKEN_DATA)) + (dexBalance (unwrap! (at-block blockHash (contract-call? .aibtc-token get-balance VOTING_TOKEN_DEX)) ERR_FETCHING_TOKEN_DATA)) + (poolBalance (unwrap! (at-block blockHash (contract-call? .aibtc-token get-balance VOTING_TOKEN_POOL)) ERR_FETCHING_TOKEN_DATA)) + (treasuryBalance (unwrap! (at-block blockHash (contract-call? .aibtc-token get-balance VOTING_TREASURY)) ERR_FETCHING_TOKEN_DATA)) + ) + (ok (- totalSupply (+ dexBalance poolBalance treasuryBalance))) + ) +) diff --git a/contracts/dao/extensions/aibtc-core-proposals.clar b/contracts/dao/extensions/aibtc-core-proposals.clar index 67d6d7b0..fda19b23 100644 --- a/contracts/dao/extensions/aibtc-core-proposals.clar +++ b/contracts/dao/extensions/aibtc-core-proposals.clar @@ -66,6 +66,7 @@ endBlock: uint, ;; block height votesFor: uint, ;; total votes for votesAgainst: uint, ;; total votes against + liquidTokens: uint, ;; liquid tokens concluded: bool, ;; has the proposal concluded passed: bool, ;; did the proposal pass } @@ -90,6 +91,7 @@ (let ( (proposalContract (contract-of proposal)) + (liquidTokens (try! (get-liquid-supply block-height))) ) ;; caller has the required balance (asserts! (> (unwrap! (contract-call? .aibtc-token get-balance tx-sender) ERR_FETCHING_TOKEN_DATA) u0) ERR_INSUFFICIENT_BALANCE) @@ -101,6 +103,7 @@ payload: { proposal: proposalContract, creator: tx-sender, + liquidTokens: liquidTokens, startBlock: burn-block-height, endBlock: (+ burn-block-height VOTING_PERIOD) } @@ -114,6 +117,7 @@ endBlock: (+ burn-block-height VOTING_PERIOD), votesFor: u0, votesAgainst: u0, + liquidTokens: liquidTokens, concluded: false, passed: false, }) ERR_SAVING_PROPOSAL)) @@ -201,6 +205,16 @@ ;; read only functions ;; +(define-read-only (get-voting-power (who principal) (proposal )) + (let + ( + (proposalRecord (unwrap! (map-get? Proposals (contract-of proposal)) ERR_PROPOSAL_NOT_FOUND)) + (proposalBlockHash (unwrap! (get-block-hash (get startBlock proposalRecord)) ERR_RETRIEVING_START_BLOCK_HASH)) + ) + (at-block proposalBlockHash (contract-call? .aibtc-token get-balance who)) + ) +) + (define-read-only (get-linked-voting-contracts) { treasury: VOTING_TREASURY, @@ -238,3 +252,16 @@ (define-private (get-block-hash (blockHeight uint)) (get-block-info? id-header-hash blockHeight) ) + +(define-private (get-liquid-supply (blockHeight uint)) + (let + ( + (blockHash (unwrap! (get-block-hash blockHeight) ERR_RETRIEVING_START_BLOCK_HASH)) + (totalSupply (unwrap! (at-block blockHash (contract-call? .aibtc-token get-total-supply)) ERR_FETCHING_TOKEN_DATA)) + (dexBalance (unwrap! (at-block blockHash (contract-call? .aibtc-token get-balance VOTING_TOKEN_DEX)) ERR_FETCHING_TOKEN_DATA)) + (poolBalance (unwrap! (at-block blockHash (contract-call? .aibtc-token get-balance VOTING_TOKEN_POOL)) ERR_FETCHING_TOKEN_DATA)) + (treasuryBalance (unwrap! (at-block blockHash (contract-call? .aibtc-token get-balance VOTING_TREASURY)) ERR_FETCHING_TOKEN_DATA)) + ) + (ok (- totalSupply (+ dexBalance poolBalance treasuryBalance))) + ) +) diff --git a/contracts/dao/extensions/aibtc-token.clar b/contracts/dao/extensions/aibtc-token.clar index 160f5191..cd13d670 100644 --- a/contracts/dao/extensions/aibtc-token.clar +++ b/contracts/dao/extensions/aibtc-token.clar @@ -114,7 +114,3 @@ ;; mint tokens to the treasury (80%) (try! (ft-mint? SYMBOL (/ (* MAXSUPPLY u80) u100) .aibtc-treasury)) ;; <%= it.token_symbol %> <%= it.treasury_contract %> ) -;; Total supply - tokens in treasury - tokens in dex -(define-read-only (get-liquid-supply) - (- (ft-get-supply SYMBOL) (ft-get-balance SYMBOL .aibtc-treasury) (ft-get-balance SYMBOL .aibtc-token-dex)) -) \ No newline at end of file From 9697203561e5bc54c008dffb28685f9efab32b38 Mon Sep 17 00:00:00 2001 From: Jason Schrader Date: Tue, 14 Jan 2025 13:02:49 -0700 Subject: [PATCH 06/10] fix: match votePassed logic in core --- contracts/dao/extensions/aibtc-core-proposals.clar | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/dao/extensions/aibtc-core-proposals.clar b/contracts/dao/extensions/aibtc-core-proposals.clar index fda19b23..66bae14f 100644 --- a/contracts/dao/extensions/aibtc-core-proposals.clar +++ b/contracts/dao/extensions/aibtc-core-proposals.clar @@ -172,7 +172,8 @@ (proposalRecord (unwrap! (map-get? Proposals proposalContract) ERR_PROPOSAL_NOT_FOUND)) (tokenTotalSupply (unwrap! (contract-call? .aibtc-token get-total-supply) ERR_FETCHING_TOKEN_DATA)) (treasuryBalance (unwrap! (contract-call? .aibtc-token get-balance .aibtc-treasury) ERR_FETCHING_TOKEN_DATA)) - (votePassed (> (get votesFor proposalRecord) (* tokenTotalSupply (- u100 treasuryBalance) VOTING_QUORUM))) + ;; if VOTING_QUORUM <= ((votesFor * 100) / liquidTokens) + (votePassed (<= VOTING_QUORUM (/ (* (get votesFor proposalRecord) u100) (get liquidTokens proposalRecord)))) ) ;; proposal was not already executed (asserts! (is-none (contract-call? .aibtcdev-base-dao executed-at proposal)) ERR_PROPOSAL_ALREADY_EXECUTED) From a339f78f0c69d2ec3cdcfb69b3cbedd681ee5870 Mon Sep 17 00:00:00 2001 From: Jason Schrader Date: Tue, 14 Jan 2025 13:29:04 -0700 Subject: [PATCH 07/10] refactor: update test structure, start planning more tests This was a one-off shot at adding tests and def would fix a few things, going to set a standard on the first few then iterate, as well as focus on key elements. --- .../extensions/aibtc-action-proposals.clar | 1 + deployments/default.simnet-plan.yaml | 1206 +++++++++++++++++ .../actions/aibtc-action-add-resource.test.ts | 19 + .../actions/aibtc-action-allow-asset.test.ts | 19 + .../actions/aibtc-action-send-message.test.ts | 19 + .../aibtc-action-set-account-holder.test.ts | 19 + ...aibtc-action-set-withdrawal-amount.test.ts | 19 + ...aibtc-action-set-withdrawal-period.test.ts | 19 + ...btc-action-toggle-resource-by-name.test.ts | 19 + .../aibtc-bitflow-pool-owner.test.ts | 7 - .../extensions/aibtc-core-proposals.test.ts | 23 +- .../aibtc-onchain-messaging.test.ts | 15 +- .../dao/extensions/aibtc-token-owner.test.ts | 19 + tests/dao/extensions/aibtc-treasury.test.ts | 15 +- ...on-proposals-set-protocol-treasury.test.ts | 19 + tests/test-utilities.ts | 0 16 files changed, 1423 insertions(+), 15 deletions(-) create mode 100644 deployments/default.simnet-plan.yaml create mode 100644 tests/dao/extensions/actions/aibtc-action-add-resource.test.ts create mode 100644 tests/dao/extensions/actions/aibtc-action-allow-asset.test.ts create mode 100644 tests/dao/extensions/actions/aibtc-action-send-message.test.ts create mode 100644 tests/dao/extensions/actions/aibtc-action-set-account-holder.test.ts create mode 100644 tests/dao/extensions/actions/aibtc-action-set-withdrawal-amount.test.ts create mode 100644 tests/dao/extensions/actions/aibtc-action-set-withdrawal-period.test.ts create mode 100644 tests/dao/extensions/actions/aibtc-action-toggle-resource-by-name.test.ts delete mode 100644 tests/dao/extensions/aibtc-bitflow-pool-owner.test.ts create mode 100644 tests/test-utilities.ts diff --git a/contracts/dao/extensions/aibtc-action-proposals.clar b/contracts/dao/extensions/aibtc-action-proposals.clar index 78705f94..db201cd2 100644 --- a/contracts/dao/extensions/aibtc-action-proposals.clar +++ b/contracts/dao/extensions/aibtc-action-proposals.clar @@ -102,6 +102,7 @@ action: action, parameters: parameters, creator: tx-sender, + liquidTokens: liquidTokens, startBlock: burn-block-height, endBlock: (+ burn-block-height VOTING_PERIOD) } diff --git a/deployments/default.simnet-plan.yaml b/deployments/default.simnet-plan.yaml new file mode 100644 index 00000000..0f914857 --- /dev/null +++ b/deployments/default.simnet-plan.yaml @@ -0,0 +1,1206 @@ +--- +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: faucet + address: STNHKEPYEPJ8ET55ZZ0M5A34J0R3N5FM2CMMMAZ6 + 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" + contracts: + - costs + - pox + - pox-2 + - pox-3 + - pox-4 + - lockup + - costs-2 + - costs-3 + - cost-voting + - bns +plan: + batches: + - id: 0 + transactions: [] + epoch: "2.0" + - id: 1 + transactions: + - emulated-contract-publish: + contract-name: nft-trait + emulated-sender: SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9 + path: "./.cache/requirements/SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.clar" + clarity-version: 1 + - emulated-contract-publish: + contract-name: sip-010-trait-ft-standard + emulated-sender: SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE + path: "./.cache/requirements/SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.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: + - emulated-contract-publish: + contract-name: sip-010-trait-ft-standard + emulated-sender: ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8 + path: "./.cache/requirements/ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8.sip-010-trait-ft-standard.clar" + clarity-version: 2 + - emulated-contract-publish: + contract-name: token-stx-v-1-2 + emulated-sender: ST295MNE41DC74QYCPRS8N37YYMC06N6Q3VQDZ6G1 + path: "./.cache/requirements/ST295MNE41DC74QYCPRS8N37YYMC06N6Q3VQDZ6G1.token-stx-v-1-2.clar" + clarity-version: 2 + - emulated-contract-publish: + contract-name: xyk-pool-trait-v-1-2 + emulated-sender: ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8 + path: "./.cache/requirements/ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8.xyk-pool-trait-v-1-2.clar" + clarity-version: 2 + - emulated-contract-publish: + contract-name: xyk-core-v-1-2 + emulated-sender: ST295MNE41DC74QYCPRS8N37YYMC06N6Q3VQDZ6G1 + path: "./.cache/requirements/ST295MNE41DC74QYCPRS8N37YYMC06N6Q3VQDZ6G1.xyk-core-v-1-2.clar" + clarity-version: 2 + epoch: "2.5" + - id: 58 + transactions: [] + epoch: "2.5" + - id: 59 + transactions: [] + epoch: "2.5" + - id: 60 + transactions: [] + epoch: "2.5" + - id: 61 + transactions: [] + epoch: "2.5" + - id: 62 + transactions: [] + epoch: "2.5" + - id: 63 + transactions: [] + epoch: "2.5" + - id: 64 + transactions: [] + epoch: "2.5" + - id: 65 + transactions: [] + epoch: "2.5" + - id: 66 + transactions: [] + epoch: "2.5" + - id: 67 + transactions: [] + epoch: "2.5" + - id: 68 + transactions: [] + epoch: "2.5" + - id: 69 + transactions: [] + epoch: "2.5" + - id: 70 + transactions: [] + epoch: "2.5" + - id: 71 + transactions: [] + epoch: "2.5" + - id: 72 + transactions: [] + epoch: "2.5" + - id: 73 + transactions: [] + epoch: "2.5" + - id: 74 + transactions: [] + epoch: "2.5" + - id: 75 + transactions: [] + epoch: "2.5" + - id: 76 + transactions: [] + epoch: "2.5" + - id: 77 + transactions: [] + epoch: "2.5" + - id: 78 + transactions: [] + epoch: "2.5" + - id: 79 + transactions: [] + epoch: "2.5" + - id: 80 + transactions: [] + epoch: "2.5" + - id: 81 + transactions: [] + epoch: "2.5" + - id: 82 + transactions: [] + epoch: "2.5" + - id: 83 + transactions: [] + epoch: "2.5" + - id: 84 + transactions: [] + epoch: "2.5" + - id: 85 + transactions: [] + epoch: "2.5" + - id: 86 + transactions: [] + epoch: "2.5" + - id: 87 + transactions: [] + epoch: "2.5" + - id: 88 + transactions: [] + epoch: "2.5" + - id: 89 + transactions: [] + epoch: "2.5" + - id: 90 + transactions: [] + epoch: "2.5" + - id: 91 + transactions: [] + epoch: "2.5" + - id: 92 + transactions: [] + epoch: "2.5" + - id: 93 + transactions: [] + epoch: "2.5" + - id: 94 + transactions: [] + epoch: "2.5" + - id: 95 + transactions: [] + epoch: "2.5" + - id: 96 + transactions: [] + epoch: "2.5" + - id: 97 + transactions: [] + epoch: "2.5" + - id: 98 + transactions: [] + epoch: "2.5" + - id: 99 + transactions: [] + epoch: "2.5" + - id: 100 + transactions: [] + epoch: "2.5" + - id: 101 + transactions: [] + epoch: "2.5" + - id: 102 + transactions: [] + epoch: "2.5" + - id: 103 + transactions: [] + epoch: "2.5" + - id: 104 + transactions: [] + epoch: "2.5" + - id: 105 + transactions: [] + epoch: "2.5" + - id: 106 + transactions: [] + epoch: "2.5" + - id: 107 + transactions: [] + epoch: "2.5" + - id: 108 + transactions: [] + epoch: "2.5" + - id: 109 + transactions: [] + epoch: "2.5" + - id: 110 + transactions: [] + epoch: "2.5" + - id: 111 + transactions: [] + epoch: "2.5" + - id: 112 + transactions: [] + epoch: "2.5" + - id: 113 + transactions: + - emulated-contract-publish: + contract-name: aibtcdev-dao-traits-v1 + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/traits/aibtcdev-dao-traits-v1.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtcdev-dao-v1 + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/traits/aibtcdev-dao-v1.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtcdev-base-dao + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/aibtcdev-base-dao.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-payments-invoices + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/aibtc-payments-invoices.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-action-add-resource + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/actions/aibtc-action-add-resource.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-treasury + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/aibtc-treasury.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-action-allow-asset + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/actions/aibtc-action-allow-asset.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-token + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/aibtc-token.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-action-proposals + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/aibtc-action-proposals.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-onchain-messaging + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/aibtc-onchain-messaging.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-action-send-message + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/actions/aibtc-action-send-message.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-bank-account + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/aibtc-bank-account.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-action-set-account-holder + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/actions/aibtc-action-set-account-holder.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-action-set-withdrawal-amount + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/actions/aibtc-action-set-withdrawal-amount.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-action-set-withdrawal-period + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/actions/aibtc-action-set-withdrawal-period.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-action-toggle-resource-by-name + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/actions/aibtc-action-toggle-resource-by-name.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-bank-account-deposit-stx + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-bank-account-deposit-stx.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-bank-account-initialize-new-account + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-bank-account-initialize-new-account.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-bank-account-override-last-withdrawal-block + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-bank-account-override-last-withdrawal-block.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-bank-account-set-account-holder + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-bank-account-set-account-holder.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-bank-account-set-withdrawal-amount + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-bank-account-set-withdrawal-amount.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-bank-account-set-withdrawal-period + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-bank-account-set-withdrawal-period.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-bank-account-withdraw-stx + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-bank-account-withdraw-stx.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-base-add-new-extension + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-base-add-new-extension.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-base-bootstrap-initialization + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-base-bootstrap-initialization.clar + clarity-version: 2 + epoch: "3.0" + - id: 114 + transactions: + - emulated-contract-publish: + contract-name: aibtc-base-disable-extension + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-base-disable-extension.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-base-enable-extension + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-base-enable-extension.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-base-replace-extension + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-base-replace-extension.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-bitflow-pool + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/aibtc-bitflow-pool.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-core-proposals + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/aibtc-core-proposals.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-onchain-messaging-send + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-onchain-messaging-send.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-payments-invoices-add-resource + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-payments-invoices-add-resource.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-payments-invoices-pay-invoice + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-payments-invoices-pay-invoice.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-payments-invoices-pay-invoice-by-resource-name + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-payments-invoices-pay-invoice-by-resource-name.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-payments-invoices-set-payment-address + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-payments-invoices-set-payment-address.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-payments-invoices-toggle-resource + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-payments-invoices-toggle-resource.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-payments-invoices-toggle-resource-by-name + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-payments-invoices-toggle-resource-by-name.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-token-dex + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/aibtc-token-dex.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-token-owner + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/extensions/aibtc-token-owner.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-token-owner-set-token-uri + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-token-owner-set-token-uri.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-token-owner-transfer-ownership + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-token-owner-transfer-ownership.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-treasury-allow-asset + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-treasury-allow-asset.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-treasury-delegate-stx + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-treasury-delegate-stx.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-treasury-deposit-ft + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-treasury-deposit-ft.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtcdev-airdrop-1 + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/aibtcdev-airdrop-1.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-treasury-deposit-nft + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-treasury-deposit-nft.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-treasury-deposit-stx + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-treasury-deposit-stx.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-treasury-freeze-asset + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-treasury-freeze-asset.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-treasury-revoke-delegation + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-treasury-revoke-delegation.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-treasury-withdraw-ft + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-treasury-withdraw-ft.clar + clarity-version: 2 + epoch: "3.0" + - id: 115 + transactions: + - emulated-contract-publish: + contract-name: aibtc-treasury-withdraw-nft + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-treasury-withdraw-nft.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtc-treasury-withdraw-stx + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/dao/proposals/aibtc-treasury-withdraw-stx.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: aibtcdev-airdrop-2 + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/aibtcdev-airdrop-2.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: proxy + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/test/proxy.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: test-proxy + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/test/proxy.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: test-token + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/test/sip010-token.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: test-treasury + emulated-sender: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM + path: contracts/test/aibtc-treasury.clar + clarity-version: 2 + - emulated-contract-publish: + contract-name: external-proxy + emulated-sender: ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5 + path: contracts/test/proxy.clar + clarity-version: 2 + epoch: "3.0" + - id: 116 + transactions: [] + epoch: "3.0" + - id: 117 + transactions: [] + epoch: "3.0" + - id: 118 + transactions: [] + epoch: "3.0" + - id: 119 + transactions: [] + epoch: "3.0" + - id: 120 + transactions: [] + epoch: "3.0" + - id: 121 + transactions: [] + epoch: "3.0" + - id: 122 + transactions: [] + epoch: "3.0" + - id: 123 + transactions: [] + epoch: "3.0" + - id: 124 + transactions: [] + epoch: "3.0" + - id: 125 + transactions: [] + epoch: "3.0" + - id: 126 + transactions: [] + epoch: "3.0" + - id: 127 + transactions: [] + epoch: "3.0" + - id: 128 + transactions: [] + epoch: "3.0" + - id: 129 + transactions: [] + epoch: "3.0" + - id: 130 + transactions: [] + epoch: "3.0" + - id: 131 + transactions: [] + epoch: "3.0" + - id: 132 + transactions: [] + epoch: "3.0" + - id: 133 + transactions: [] + epoch: "3.0" + - id: 134 + transactions: [] + epoch: "3.0" + - id: 135 + transactions: [] + epoch: "3.0" + - id: 136 + transactions: [] + epoch: "3.0" + - id: 137 + transactions: [] + epoch: "3.0" + - id: 138 + transactions: [] + epoch: "3.0" + - id: 139 + transactions: [] + epoch: "3.0" + - id: 140 + transactions: [] + epoch: "3.0" + - id: 141 + transactions: [] + epoch: "3.0" + - id: 142 + transactions: [] + epoch: "3.0" + - id: 143 + transactions: [] + epoch: "3.0" + - id: 144 + transactions: [] + epoch: "3.0" + - id: 145 + transactions: [] + epoch: "3.0" + - id: 146 + transactions: [] + epoch: "3.0" + - id: 147 + transactions: [] + epoch: "3.0" + - id: 148 + transactions: [] + epoch: "3.0" + - id: 149 + transactions: [] + epoch: "3.0" + - id: 150 + transactions: [] + epoch: "3.0" + - id: 151 + transactions: [] + epoch: "3.0" + - id: 152 + transactions: [] + epoch: "3.0" + - id: 153 + transactions: [] + epoch: "3.0" + - id: 154 + transactions: [] + epoch: "3.0" + - id: 155 + transactions: [] + epoch: "3.0" + - id: 156 + transactions: [] + epoch: "3.0" + - id: 157 + transactions: [] + epoch: "3.0" + - id: 158 + transactions: [] + epoch: "3.0" + - id: 159 + transactions: [] + epoch: "3.0" + - id: 160 + transactions: [] + epoch: "3.0" + - id: 161 + transactions: [] + epoch: "3.0" + - id: 162 + transactions: [] + epoch: "3.0" + - id: 163 + transactions: [] + epoch: "3.0" + - id: 164 + transactions: [] + epoch: "3.0" + - id: 165 + transactions: [] + epoch: "3.0" + - id: 166 + transactions: [] + epoch: "3.0" + - id: 167 + transactions: [] + epoch: "3.0" + - id: 168 + transactions: [] + epoch: "3.0" + - id: 169 + transactions: [] + epoch: "3.0" + - id: 170 + transactions: [] + epoch: "3.0" + - id: 171 + transactions: [] + epoch: "3.0" + - id: 172 + transactions: [] + epoch: "3.0" + - id: 173 + transactions: [] + epoch: "3.0" + - id: 174 + transactions: [] + epoch: "3.0" + - id: 175 + transactions: [] + epoch: "3.0" + - id: 176 + transactions: [] + epoch: "3.0" + - id: 177 + transactions: [] + epoch: "3.0" + - id: 178 + transactions: [] + epoch: "3.0" + - id: 179 + transactions: [] + epoch: "3.0" + - id: 180 + transactions: [] + epoch: "3.0" + - id: 181 + transactions: [] + epoch: "3.0" + - id: 182 + transactions: [] + epoch: "3.0" + - id: 183 + transactions: [] + epoch: "3.0" + - id: 184 + transactions: [] + epoch: "3.0" + - id: 185 + transactions: [] + epoch: "3.0" + - id: 186 + transactions: [] + epoch: "3.0" + - id: 187 + transactions: [] + epoch: "3.0" + - id: 188 + transactions: [] + epoch: "3.0" + - id: 189 + transactions: [] + epoch: "3.0" + - id: 190 + transactions: [] + epoch: "3.0" + - id: 191 + transactions: [] + epoch: "3.0" + - id: 192 + transactions: [] + epoch: "3.0" + - id: 193 + transactions: [] + epoch: "3.0" + - id: 194 + transactions: [] + epoch: "3.0" + - id: 195 + transactions: [] + epoch: "3.0" + - id: 196 + transactions: [] + epoch: "3.0" + - id: 197 + transactions: [] + epoch: "3.0" + - id: 198 + transactions: [] + epoch: "3.0" + - id: 199 + transactions: [] + epoch: "3.0" + - id: 200 + transactions: [] + epoch: "3.0" + - id: 201 + transactions: [] + epoch: "3.0" + - id: 202 + transactions: [] + epoch: "3.0" + - id: 203 + transactions: [] + epoch: "3.0" + - id: 204 + transactions: [] + epoch: "3.0" + - id: 205 + transactions: [] + epoch: "3.0" + - id: 206 + transactions: [] + epoch: "3.0" + - id: 207 + transactions: [] + epoch: "3.0" + - id: 208 + transactions: [] + epoch: "3.0" + - id: 209 + transactions: [] + epoch: "3.0" + - id: 210 + transactions: [] + epoch: "3.0" + - id: 211 + transactions: [] + epoch: "3.0" + - id: 212 + transactions: [] + epoch: "3.0" + - id: 213 + transactions: [] + epoch: "3.0" + - id: 214 + transactions: [] + epoch: "3.0" + - id: 215 + transactions: [] + epoch: "3.0" + - id: 216 + transactions: [] + epoch: "3.0" + - id: 217 + transactions: [] + epoch: "3.0" + - id: 218 + transactions: [] + epoch: "3.0" + - id: 219 + transactions: [] + epoch: "3.0" + - id: 220 + transactions: [] + epoch: "3.0" + - id: 221 + transactions: [] + epoch: "3.0" + - id: 222 + transactions: [] + epoch: "3.0" + - id: 223 + transactions: [] + epoch: "3.0" + - id: 224 + transactions: [] + epoch: "3.0" + - id: 225 + transactions: [] + epoch: "3.0" + - id: 226 + transactions: [] + epoch: "3.0" + - id: 227 + transactions: [] + epoch: "3.0" + - id: 228 + transactions: [] + epoch: "3.0" + - id: 229 + transactions: [] + epoch: "3.0" + - id: 230 + transactions: [] + epoch: "3.0" + - id: 231 + transactions: [] + epoch: "3.0" + - id: 232 + transactions: [] + epoch: "3.0" + - id: 233 + transactions: [] + epoch: "3.0" + - id: 234 + transactions: [] + epoch: "3.0" + - id: 235 + transactions: [] + epoch: "3.0" + - id: 236 + transactions: [] + epoch: "3.0" + - id: 237 + transactions: [] + epoch: "3.0" + - id: 238 + transactions: [] + epoch: "3.0" + - id: 239 + transactions: [] + epoch: "3.0" + - id: 240 + transactions: [] + epoch: "3.0" + - id: 241 + transactions: [] + epoch: "3.0" + - id: 242 + transactions: [] + epoch: "3.0" + - id: 243 + transactions: [] + epoch: "3.0" + - id: 244 + transactions: [] + epoch: "3.0" + - id: 245 + transactions: [] + epoch: "3.0" + - id: 246 + transactions: [] + epoch: "3.0" + - id: 247 + transactions: [] + epoch: "3.0" + - id: 248 + transactions: [] + epoch: "3.0" + - id: 249 + transactions: [] + epoch: "3.0" + - id: 250 + transactions: [] + epoch: "3.0" + - id: 251 + transactions: [] + epoch: "3.0" + - id: 252 + transactions: [] + epoch: "3.0" + - id: 253 + transactions: [] + epoch: "3.0" + - id: 254 + transactions: [] + epoch: "3.0" + - id: 255 + transactions: [] + epoch: "3.0" + - id: 256 + transactions: [] + epoch: "3.0" + - id: 257 + transactions: [] + epoch: "3.0" + - id: 258 + transactions: [] + epoch: "3.0" + - id: 259 + transactions: [] + epoch: "3.0" + - id: 260 + transactions: [] + epoch: "3.0" + - id: 261 + transactions: [] + epoch: "3.0" + - id: 262 + transactions: [] + epoch: "3.0" + - id: 263 + transactions: [] + epoch: "3.0" + - id: 264 + transactions: [] + epoch: "3.0" + - id: 265 + transactions: [] + epoch: "3.0" + - id: 266 + transactions: [] + epoch: "3.0" + - id: 267 + transactions: [] + epoch: "3.0" + - id: 268 + transactions: [] + epoch: "3.0" + - id: 269 + transactions: [] + epoch: "3.0" + - id: 270 + transactions: [] + epoch: "3.0" + - id: 271 + transactions: [] + epoch: "3.0" + - id: 272 + transactions: [] + epoch: "3.0" + - id: 273 + transactions: [] + epoch: "3.0" + - id: 274 + transactions: [] + epoch: "3.0" + - id: 275 + transactions: [] + epoch: "3.0" + - id: 276 + transactions: [] + epoch: "3.0" + - id: 277 + transactions: [] + epoch: "3.0" + - id: 278 + transactions: [] + epoch: "3.0" diff --git a/tests/dao/extensions/actions/aibtc-action-add-resource.test.ts b/tests/dao/extensions/actions/aibtc-action-add-resource.test.ts new file mode 100644 index 00000000..00f18463 --- /dev/null +++ b/tests/dao/extensions/actions/aibtc-action-add-resource.test.ts @@ -0,0 +1,19 @@ +import { Cl } from "@stacks/transactions"; +import { describe, expect, it } from "vitest"; + +const accounts = simnet.getAccounts(); +const deployer = accounts.get("deployer")!; + +const contractAddress = `${deployer}.aibtc-action-add-resource`; + +describe("aibtc-action-add-resource", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); + }); +}); diff --git a/tests/dao/extensions/actions/aibtc-action-allow-asset.test.ts b/tests/dao/extensions/actions/aibtc-action-allow-asset.test.ts new file mode 100644 index 00000000..1519f018 --- /dev/null +++ b/tests/dao/extensions/actions/aibtc-action-allow-asset.test.ts @@ -0,0 +1,19 @@ +import { Cl } from "@stacks/transactions"; +import { describe, expect, it } from "vitest"; + +const accounts = simnet.getAccounts(); +const deployer = accounts.get("deployer")!; + +const contractAddress = `${deployer}.aibtc-action-add-resource`; + +describe("aibtc-action-allow-asset", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); + }); +}); diff --git a/tests/dao/extensions/actions/aibtc-action-send-message.test.ts b/tests/dao/extensions/actions/aibtc-action-send-message.test.ts new file mode 100644 index 00000000..c3b416f5 --- /dev/null +++ b/tests/dao/extensions/actions/aibtc-action-send-message.test.ts @@ -0,0 +1,19 @@ +import { Cl } from "@stacks/transactions"; +import { describe, expect, it } from "vitest"; + +const accounts = simnet.getAccounts(); +const deployer = accounts.get("deployer")!; + +const contractAddress = `${deployer}.aibtc-action-add-resource`; + +describe("aibtc-action-send-message", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); + }); +}); diff --git a/tests/dao/extensions/actions/aibtc-action-set-account-holder.test.ts b/tests/dao/extensions/actions/aibtc-action-set-account-holder.test.ts new file mode 100644 index 00000000..53faf991 --- /dev/null +++ b/tests/dao/extensions/actions/aibtc-action-set-account-holder.test.ts @@ -0,0 +1,19 @@ +import { Cl } from "@stacks/transactions"; +import { describe, expect, it } from "vitest"; + +const accounts = simnet.getAccounts(); +const deployer = accounts.get("deployer")!; + +const contractAddress = `${deployer}.aibtc-action-add-resource`; + +describe("aibtc-action-set-account-holder", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); + }); +}); diff --git a/tests/dao/extensions/actions/aibtc-action-set-withdrawal-amount.test.ts b/tests/dao/extensions/actions/aibtc-action-set-withdrawal-amount.test.ts new file mode 100644 index 00000000..b659104c --- /dev/null +++ b/tests/dao/extensions/actions/aibtc-action-set-withdrawal-amount.test.ts @@ -0,0 +1,19 @@ +import { Cl } from "@stacks/transactions"; +import { describe, expect, it } from "vitest"; + +const accounts = simnet.getAccounts(); +const deployer = accounts.get("deployer")!; + +const contractAddress = `${deployer}.aibtc-action-add-resource`; + +describe("aibtc-action-set-withdrawal-amount", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); + }); +}); diff --git a/tests/dao/extensions/actions/aibtc-action-set-withdrawal-period.test.ts b/tests/dao/extensions/actions/aibtc-action-set-withdrawal-period.test.ts new file mode 100644 index 00000000..bf0c8df5 --- /dev/null +++ b/tests/dao/extensions/actions/aibtc-action-set-withdrawal-period.test.ts @@ -0,0 +1,19 @@ +import { Cl } from "@stacks/transactions"; +import { describe, expect, it } from "vitest"; + +const accounts = simnet.getAccounts(); +const deployer = accounts.get("deployer")!; + +const contractAddress = `${deployer}.aibtc-action-add-resource`; + +describe("aibtc-action-set-withdrawal-period", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); + }); +}); diff --git a/tests/dao/extensions/actions/aibtc-action-toggle-resource-by-name.test.ts b/tests/dao/extensions/actions/aibtc-action-toggle-resource-by-name.test.ts new file mode 100644 index 00000000..48b4ac5b --- /dev/null +++ b/tests/dao/extensions/actions/aibtc-action-toggle-resource-by-name.test.ts @@ -0,0 +1,19 @@ +import { Cl } from "@stacks/transactions"; +import { describe, expect, it } from "vitest"; + +const accounts = simnet.getAccounts(); +const deployer = accounts.get("deployer")!; + +const contractAddress = `${deployer}.aibtc-action-add-resource`; + +describe("aibtc-action-toggle-resource-by-name", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); + }); +}); diff --git a/tests/dao/extensions/aibtc-bitflow-pool-owner.test.ts b/tests/dao/extensions/aibtc-bitflow-pool-owner.test.ts deleted file mode 100644 index 4104b7d4..00000000 --- a/tests/dao/extensions/aibtc-bitflow-pool-owner.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { describe, expect, it } from "vitest"; - -describe("aibtc-bitflow-pool-owner", () => { - it("should have tests written", () => { - expect(true).toBe(true); - }); -}); diff --git a/tests/dao/extensions/aibtc-core-proposals.test.ts b/tests/dao/extensions/aibtc-core-proposals.test.ts index fc383a55..3240559c 100644 --- a/tests/dao/extensions/aibtc-core-proposals.test.ts +++ b/tests/dao/extensions/aibtc-core-proposals.test.ts @@ -2,11 +2,23 @@ import { Cl } from "@stacks/transactions"; import { describe, expect, it } from "vitest"; const accounts = simnet.getAccounts(); -const address1 = accounts.get("wallet_1")!; -const address2 = accounts.get("wallet_2")!; -const addressDeployer = accounts.get("deployer")!; +const deployer = accounts.get("deployer")!; -const contractAddress = `${addressDeployer}.aibtc-ext003-direct-execute`; +const contractAddress = `${deployer}.aibtc-core-proposals`; + +describe("aibtc-core-proposals", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); + }); +}); + +/* enum ErrCode { ERR_UNAUTHORIZED = 3000, @@ -38,6 +50,7 @@ enum ErrCode { ERR_QUORUM_NOT_REACHED, } + describe("aibtc-ext003-direct-execute", () => { // Protocol Treasury Tests describe("set-protocol-treasury()", () => { @@ -90,3 +103,5 @@ describe("aibtc-ext003-direct-execute", () => { it("succeeds without executing if failed"); }); }); + +*/ diff --git a/tests/dao/extensions/aibtc-onchain-messaging.test.ts b/tests/dao/extensions/aibtc-onchain-messaging.test.ts index ee50624a..689e720b 100644 --- a/tests/dao/extensions/aibtc-onchain-messaging.test.ts +++ b/tests/dao/extensions/aibtc-onchain-messaging.test.ts @@ -4,19 +4,30 @@ import { describe, expect, it } from "vitest"; const accounts = simnet.getAccounts(); const address1 = accounts.get("wallet_1")!; const address2 = accounts.get("wallet_2")!; -const addressDeployer = accounts.get("deployer")!; +const deployer = accounts.get("deployer")!; -const contractAddress = `${addressDeployer}.aibtc-onchain-messaging`; +const contractAddress = `${deployer}.aibtc-onchain-messaging`; enum ErrCode { ERR_UNAUTHORIZED = 4000, } describe("aibtc-onchain-messaging", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); + }); + /* // Message Tests describe("send()", () => { it("succeeds if called by any user with isFromDao false"); it("fails if called by any user with isFromDao true"); it("succeeds if called by a DAO proposal with isFromDao true"); }); + */ }); diff --git a/tests/dao/extensions/aibtc-token-owner.test.ts b/tests/dao/extensions/aibtc-token-owner.test.ts index e69de29b..3cab3dd3 100644 --- a/tests/dao/extensions/aibtc-token-owner.test.ts +++ b/tests/dao/extensions/aibtc-token-owner.test.ts @@ -0,0 +1,19 @@ +import { Cl } from "@stacks/transactions"; +import { describe, expect, it } from "vitest"; + +const accounts = simnet.getAccounts(); +const deployer = accounts.get("deployer")!; + +const contractAddress = `${deployer}.aibtc-token-owner`; + +describe("aibtc-token-owner", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); + }); +}); diff --git a/tests/dao/extensions/aibtc-treasury.test.ts b/tests/dao/extensions/aibtc-treasury.test.ts index 4f49af45..67f5ef1e 100644 --- a/tests/dao/extensions/aibtc-treasury.test.ts +++ b/tests/dao/extensions/aibtc-treasury.test.ts @@ -4,9 +4,9 @@ import { describe, expect, it } from "vitest"; const accounts = simnet.getAccounts(); const address1 = accounts.get("wallet_1")!; const address2 = accounts.get("wallet_2")!; -const addressDeployer = accounts.get("deployer")!; +const deployer = accounts.get("deployer")!; -const contractAddress = `${addressDeployer}.aibtc-treasury`; +const contractAddress = `${deployer}.aibtc-treasury`; enum ErrCode { ERR_UNAUTHORIZED = 6000, @@ -14,6 +14,16 @@ enum ErrCode { } describe("aibtc-treasury", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); + }); + /* // Allow Asset Tests describe("allow-asset()", () => { it("fails if caller is not DAO or extension"); @@ -78,4 +88,5 @@ describe("aibtc-treasury", () => { it("fails if contract is not currently stacking"); it("succeeds and revokes stacking delegation"); }); + */ }); diff --git a/tests/dao/proposals/aibtc-action-proposals-set-protocol-treasury.test.ts b/tests/dao/proposals/aibtc-action-proposals-set-protocol-treasury.test.ts index e69de29b..fa38b2b1 100644 --- a/tests/dao/proposals/aibtc-action-proposals-set-protocol-treasury.test.ts +++ b/tests/dao/proposals/aibtc-action-proposals-set-protocol-treasury.test.ts @@ -0,0 +1,19 @@ +import { Cl } from "@stacks/transactions"; +import { describe, expect, it } from "vitest"; + +const accounts = simnet.getAccounts(); +const deployer = accounts.get("deployer")!; + +const contractAddress = `${deployer}.aibtc-action-add-resource`; + +describe("aibtc-action-proposals-set-protocol-treasury", () => { + it("execute() should fail if called directly", () => { + const callback = simnet.callPublicFn( + contractAddress, + "execute", + [Cl.principal(deployer)], + deployer + ); + expect(callback.result).toBeErr(); + }); +}); diff --git a/tests/test-utilities.ts b/tests/test-utilities.ts new file mode 100644 index 00000000..e69de29b From c1e388201339b0507d424716e2d47eded96bfa73 Mon Sep 17 00:00:00 2001 From: Jason Schrader Date: Tue, 14 Jan 2025 14:07:12 -0700 Subject: [PATCH 08/10] refactor: reorganize and cleanup, remove empty tests Still leaves some boilerplate this should be tested language for what wouldve been empty files, otherwise removes blank checks that were hints to what tests should be run. Can pass through again and turn them back on. --- .../extensions/aibtc-action-proposals.clar | 33 +- .../dao/extensions/aibtc-core-proposals.clar | 38 +- deployments/default.simnet-plan.yaml | 462 ++++--------- tests/dao/aibtcdev-base-dao.test.ts | 15 +- .../extensions/aibtc-action-proposals.test.ts | 632 ++++++------------ .../dao/extensions/aibtc-bank-account.test.ts | 15 +- .../dao/extensions/aibtc-bitflow-pool.test.ts | 7 + .../extensions/aibtc-core-proposals.test.ts | 46 +- .../aibtc-onchain-messaging.test.ts | 5 +- .../aibtc-payments-invoices.test.ts | 15 +- tests/dao/extensions/aibtc-token-dex.test.ts | 7 + tests/dao/extensions/aibtc-token.test.ts | 7 + ...on-proposals-set-protocol-treasury.test.ts | 19 - ...-action-proposals-set-voting-token.test.ts | 0 ...bank-account-set-protocol-treasury.test.ts | 7 - .../aibtc-bank-account-withdraw-stx.test.ts | 7 + .../aibtc-base-add-new-extension.test.ts | 7 + ...ibtc-base-bootstrap-initialization.test.ts | 19 +- .../aibtc-base-replace-extension.test.ts | 7 + ...re-proposals-set-protocol-treasury.test.ts | 0 ...tc-core-proposals-set-voting-token.test.ts | 0 .../aibtc-treasury-delegate-stx.test.ts | 7 + .../aibtc-treasury-freeze-asset.test.ts | 0 .../aibtc-treasury-revoke-delegation.test.ts | 7 + .../aibtc-treasury-withdraw-ft.test.ts | 7 + .../aibtc-treasury-withdraw-nft.test.ts | 7 + .../aibtc-treasury-withdraw-stx.test.ts | 7 + 27 files changed, 502 insertions(+), 881 deletions(-) delete mode 100644 tests/dao/proposals/aibtc-action-proposals-set-protocol-treasury.test.ts delete mode 100644 tests/dao/proposals/aibtc-action-proposals-set-voting-token.test.ts delete mode 100644 tests/dao/proposals/aibtc-bank-account-set-protocol-treasury.test.ts delete mode 100644 tests/dao/proposals/aibtc-core-proposals-set-protocol-treasury.test.ts delete mode 100644 tests/dao/proposals/aibtc-core-proposals-set-voting-token.test.ts delete mode 100644 tests/dao/proposals/aibtc-treasury-freeze-asset.test.ts diff --git a/contracts/dao/extensions/aibtc-action-proposals.clar b/contracts/dao/extensions/aibtc-action-proposals.clar index db201cd2..f3c8d314 100644 --- a/contracts/dao/extensions/aibtc-action-proposals.clar +++ b/contracts/dao/extensions/aibtc-action-proposals.clar @@ -18,28 +18,19 @@ (define-constant VOTING_PERIOD u144) ;; 144 Bitcoin blocks, ~1 day (define-constant VOTING_QUORUM u66) ;; 66% of liquid supply -;; error messages - authorization +;; error messages (define-constant ERR_NOT_DAO_OR_EXTENSION (err u1000)) - -;; error messages - voting token -(define-constant ERR_INSUFFICIENT_BALANCE (err u1100)) -(define-constant ERR_FETCHING_TOKEN_DATA (err u1101)) - -;; error messages - proposals -(define-constant ERR_PROPOSAL_NOT_FOUND (err u1200)) -(define-constant ERR_PROPOSAL_STILL_ACTIVE (err u1201)) -(define-constant ERR_SAVING_PROPOSAL (err u1202)) -(define-constant ERR_PROPOSAL_ALREADY_CONCLUDED (err u1203)) -(define-constant ERR_RETRIEVING_START_BLOCK_HASH (err u1204)) - -;; error messages - voting -(define-constant ERR_VOTE_TOO_SOON (err u1300)) -(define-constant ERR_VOTE_TOO_LATE (err u1301)) -(define-constant ERR_ALREADY_VOTED (err u1302)) -(define-constant ERR_QUORUM_NOT_REACHED (err u1303)) - -;; error messages - actions -(define-constant ERR_INVALID_ACTION (err u1400)) +(define-constant ERR_INSUFFICIENT_BALANCE (err u1001)) +(define-constant ERR_FETCHING_TOKEN_DATA (err u1002)) +(define-constant ERR_PROPOSAL_NOT_FOUND (err u1003)) +(define-constant ERR_PROPOSAL_STILL_ACTIVE (err u1004)) +(define-constant ERR_SAVING_PROPOSAL (err u1005)) +(define-constant ERR_PROPOSAL_ALREADY_CONCLUDED (err u1006)) +(define-constant ERR_RETRIEVING_START_BLOCK_HASH (err u1007)) +(define-constant ERR_VOTE_TOO_SOON (err u1008)) +(define-constant ERR_VOTE_TOO_LATE (err u1009)) +(define-constant ERR_ALREADY_VOTED (err u1010)) +(define-constant ERR_INVALID_ACTION (err u1011)) ;; contracts used for voting calculations (define-constant VOTING_TOKEN_DEX .aibtc-token-dex) diff --git a/contracts/dao/extensions/aibtc-core-proposals.clar b/contracts/dao/extensions/aibtc-core-proposals.clar index 66bae14f..6418b488 100644 --- a/contracts/dao/extensions/aibtc-core-proposals.clar +++ b/contracts/dao/extensions/aibtc-core-proposals.clar @@ -19,35 +19,19 @@ (define-constant VOTING_PERIOD u144) ;; 144 Bitcoin blocks, ~1 day (define-constant VOTING_QUORUM u95) ;; 95% of liquid supply -;; error messages - authorization +;; error messages (define-constant ERR_NOT_DAO_OR_EXTENSION (err u3000)) (define-constant ERR_FETCHING_TOKEN_DATA (err u3001)) - -;; error messages - treasury -(define-constant ERR_TREASURY_CANNOT_BE_SELF (err u3200)) -(define-constant ERR_TREASURY_MISMATCH (err u3201)) -(define-constant ERR_TREASURY_CANNOT_BE_SAME (err u3202)) - -;; error messages - voting token -(define-constant ERR_TOKEN_ALREADY_INITIALIZED (err u3300)) -(define-constant ERR_TOKEN_MISMATCH (err u3301)) -(define-constant ERR_INSUFFICIENT_BALANCE (err u3302)) -(define-constant ERR_TOKEN_CANNOT_BE_SELF (err u3303)) -(define-constant ERR_TOKEN_CANNOT_BE_SAME (err u3304)) - -;; error messages - proposals -(define-constant ERR_PROPOSAL_NOT_FOUND (err u3400)) -(define-constant ERR_PROPOSAL_ALREADY_EXECUTED (err u3401)) -(define-constant ERR_PROPOSAL_STILL_ACTIVE (err u3402)) -(define-constant ERR_SAVING_PROPOSAL (err u3403)) -(define-constant ERR_PROPOSAL_ALREADY_CONCLUDED (err u3404)) -(define-constant ERR_RETRIEVING_START_BLOCK_HASH (err u3405)) - -;; error messages - voting -(define-constant ERR_VOTE_TOO_SOON (err u3500)) -(define-constant ERR_VOTE_TOO_LATE (err u3501)) -(define-constant ERR_ALREADY_VOTED (err u3502)) -(define-constant ERR_QUORUM_NOT_REACHED (err u3503)) +(define-constant ERR_INSUFFICIENT_BALANCE (err u3002)) +(define-constant ERR_PROPOSAL_NOT_FOUND (err u3003)) +(define-constant ERR_PROPOSAL_ALREADY_EXECUTED (err u3004)) +(define-constant ERR_PROPOSAL_STILL_ACTIVE (err u3005)) +(define-constant ERR_SAVING_PROPOSAL (err u3006)) +(define-constant ERR_PROPOSAL_ALREADY_CONCLUDED (err u3007)) +(define-constant ERR_RETRIEVING_START_BLOCK_HASH (err u3008)) +(define-constant ERR_VOTE_TOO_SOON (err u3009)) +(define-constant ERR_VOTE_TOO_LATE (err u3010)) +(define-constant ERR_ALREADY_VOTED (err u3011)) ;; contracts used for voting calculations (define-constant VOTING_TOKEN_DEX .aibtc-token-dex) diff --git a/deployments/default.simnet-plan.yaml b/deployments/default.simnet-plan.yaml index 0f914857..98cbd801 100644 --- a/deployments/default.simnet-plan.yaml +++ b/deployments/default.simnet-plan.yaml @@ -49,8 +49,10 @@ plan: batches: - id: 0 transactions: [] - epoch: "2.0" - id: 1 + transactions: [] + epoch: "2.0" + - id: 2 transactions: - emulated-contract-publish: contract-name: nft-trait @@ -63,9 +65,6 @@ plan: path: "./.cache/requirements/SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.clar" clarity-version: 1 epoch: "2.1" - - id: 2 - transactions: [] - epoch: "2.1" - id: 3 transactions: [] epoch: "2.1" @@ -190,66 +189,66 @@ plan: transactions: [] epoch: "2.1" - id: 44 - transactions: [] - epoch: "2.1" + transactions: + - emulated-contract-publish: + contract-name: sip-010-trait-ft-standard + emulated-sender: ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8 + path: "./.cache/requirements/ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8.sip-010-trait-ft-standard.clar" + clarity-version: 2 + - emulated-contract-publish: + contract-name: token-stx-v-1-2 + emulated-sender: ST295MNE41DC74QYCPRS8N37YYMC06N6Q3VQDZ6G1 + path: "./.cache/requirements/ST295MNE41DC74QYCPRS8N37YYMC06N6Q3VQDZ6G1.token-stx-v-1-2.clar" + clarity-version: 2 + - emulated-contract-publish: + contract-name: xyk-pool-trait-v-1-2 + emulated-sender: ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8 + path: "./.cache/requirements/ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8.xyk-pool-trait-v-1-2.clar" + clarity-version: 2 + - emulated-contract-publish: + contract-name: xyk-core-v-1-2 + emulated-sender: ST295MNE41DC74QYCPRS8N37YYMC06N6Q3VQDZ6G1 + path: "./.cache/requirements/ST295MNE41DC74QYCPRS8N37YYMC06N6Q3VQDZ6G1.xyk-core-v-1-2.clar" + clarity-version: 2 + epoch: "2.5" - id: 45 transactions: [] - epoch: "2.1" + epoch: "2.5" - id: 46 transactions: [] - epoch: "2.1" + epoch: "2.5" - id: 47 transactions: [] - epoch: "2.1" + epoch: "2.5" - id: 48 transactions: [] - epoch: "2.1" + epoch: "2.5" - id: 49 transactions: [] - epoch: "2.1" + epoch: "2.5" - id: 50 transactions: [] - epoch: "2.1" + epoch: "2.5" - id: 51 transactions: [] - epoch: "2.1" + epoch: "2.5" - id: 52 transactions: [] - epoch: "2.1" + epoch: "2.5" - id: 53 transactions: [] - epoch: "2.1" + epoch: "2.5" - id: 54 transactions: [] - epoch: "2.1" + epoch: "2.5" - id: 55 transactions: [] - epoch: "2.1" + epoch: "2.5" - id: 56 transactions: [] - epoch: "2.1" + epoch: "2.5" - id: 57 - transactions: - - emulated-contract-publish: - contract-name: sip-010-trait-ft-standard - emulated-sender: ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8 - path: "./.cache/requirements/ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8.sip-010-trait-ft-standard.clar" - clarity-version: 2 - - emulated-contract-publish: - contract-name: token-stx-v-1-2 - emulated-sender: ST295MNE41DC74QYCPRS8N37YYMC06N6Q3VQDZ6G1 - path: "./.cache/requirements/ST295MNE41DC74QYCPRS8N37YYMC06N6Q3VQDZ6G1.token-stx-v-1-2.clar" - clarity-version: 2 - - emulated-contract-publish: - contract-name: xyk-pool-trait-v-1-2 - emulated-sender: ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8 - path: "./.cache/requirements/ST3VXT52QEQPZ5246A16RFNMR1PRJ96JK6YYX37N8.xyk-pool-trait-v-1-2.clar" - clarity-version: 2 - - emulated-contract-publish: - contract-name: xyk-core-v-1-2 - emulated-sender: ST295MNE41DC74QYCPRS8N37YYMC06N6Q3VQDZ6G1 - path: "./.cache/requirements/ST295MNE41DC74QYCPRS8N37YYMC06N6Q3VQDZ6G1.xyk-core-v-1-2.clar" - clarity-version: 2 + transactions: [] epoch: "2.5" - id: 58 transactions: [] @@ -336,87 +335,6 @@ plan: transactions: [] epoch: "2.5" - id: 86 - transactions: [] - epoch: "2.5" - - id: 87 - transactions: [] - epoch: "2.5" - - id: 88 - transactions: [] - epoch: "2.5" - - id: 89 - transactions: [] - epoch: "2.5" - - id: 90 - transactions: [] - epoch: "2.5" - - id: 91 - transactions: [] - epoch: "2.5" - - id: 92 - transactions: [] - epoch: "2.5" - - id: 93 - transactions: [] - epoch: "2.5" - - id: 94 - transactions: [] - epoch: "2.5" - - id: 95 - transactions: [] - epoch: "2.5" - - id: 96 - transactions: [] - epoch: "2.5" - - id: 97 - transactions: [] - epoch: "2.5" - - id: 98 - transactions: [] - epoch: "2.5" - - id: 99 - transactions: [] - epoch: "2.5" - - id: 100 - transactions: [] - epoch: "2.5" - - id: 101 - transactions: [] - epoch: "2.5" - - id: 102 - transactions: [] - epoch: "2.5" - - id: 103 - transactions: [] - epoch: "2.5" - - id: 104 - transactions: [] - epoch: "2.5" - - id: 105 - transactions: [] - epoch: "2.5" - - id: 106 - transactions: [] - epoch: "2.5" - - id: 107 - transactions: [] - epoch: "2.5" - - id: 108 - transactions: [] - epoch: "2.5" - - id: 109 - transactions: [] - epoch: "2.5" - - id: 110 - transactions: [] - epoch: "2.5" - - id: 111 - transactions: [] - epoch: "2.5" - - id: 112 - transactions: [] - epoch: "2.5" - - id: 113 transactions: - emulated-contract-publish: contract-name: aibtcdev-dao-traits-v1 @@ -544,7 +462,7 @@ plan: path: contracts/dao/proposals/aibtc-base-bootstrap-initialization.clar clarity-version: 2 epoch: "3.0" - - id: 114 + - id: 87 transactions: - emulated-contract-publish: contract-name: aibtc-base-disable-extension @@ -672,7 +590,7 @@ plan: path: contracts/dao/proposals/aibtc-treasury-withdraw-ft.clar clarity-version: 2 epoch: "3.0" - - id: 115 + - id: 88 transactions: - emulated-contract-publish: contract-name: aibtc-treasury-withdraw-nft @@ -715,6 +633,87 @@ plan: path: contracts/test/proxy.clar clarity-version: 2 epoch: "3.0" + - id: 89 + transactions: [] + epoch: "3.0" + - id: 90 + transactions: [] + epoch: "3.0" + - id: 91 + transactions: [] + epoch: "3.0" + - id: 92 + transactions: [] + epoch: "3.0" + - id: 93 + transactions: [] + epoch: "3.0" + - id: 94 + transactions: [] + epoch: "3.0" + - id: 95 + transactions: [] + epoch: "3.0" + - id: 96 + transactions: [] + epoch: "3.0" + - id: 97 + transactions: [] + epoch: "3.0" + - id: 98 + transactions: [] + epoch: "3.0" + - id: 99 + transactions: [] + epoch: "3.0" + - id: 100 + transactions: [] + epoch: "3.0" + - id: 101 + transactions: [] + epoch: "3.0" + - id: 102 + transactions: [] + epoch: "3.0" + - id: 103 + transactions: [] + epoch: "3.0" + - id: 104 + transactions: [] + epoch: "3.0" + - id: 105 + transactions: [] + epoch: "3.0" + - id: 106 + transactions: [] + epoch: "3.0" + - id: 107 + transactions: [] + epoch: "3.0" + - id: 108 + transactions: [] + epoch: "3.0" + - id: 109 + transactions: [] + epoch: "3.0" + - id: 110 + transactions: [] + epoch: "3.0" + - id: 111 + transactions: [] + epoch: "3.0" + - id: 112 + transactions: [] + epoch: "3.0" + - id: 113 + transactions: [] + epoch: "3.0" + - id: 114 + transactions: [] + epoch: "3.0" + - id: 115 + transactions: [] + epoch: "3.0" - id: 116 transactions: [] epoch: "3.0" @@ -985,222 +984,3 @@ plan: - id: 205 transactions: [] epoch: "3.0" - - id: 206 - transactions: [] - epoch: "3.0" - - id: 207 - transactions: [] - epoch: "3.0" - - id: 208 - transactions: [] - epoch: "3.0" - - id: 209 - transactions: [] - epoch: "3.0" - - id: 210 - transactions: [] - epoch: "3.0" - - id: 211 - transactions: [] - epoch: "3.0" - - id: 212 - transactions: [] - epoch: "3.0" - - id: 213 - transactions: [] - epoch: "3.0" - - id: 214 - transactions: [] - epoch: "3.0" - - id: 215 - transactions: [] - epoch: "3.0" - - id: 216 - transactions: [] - epoch: "3.0" - - id: 217 - transactions: [] - epoch: "3.0" - - id: 218 - transactions: [] - epoch: "3.0" - - id: 219 - transactions: [] - epoch: "3.0" - - id: 220 - transactions: [] - epoch: "3.0" - - id: 221 - transactions: [] - epoch: "3.0" - - id: 222 - transactions: [] - epoch: "3.0" - - id: 223 - transactions: [] - epoch: "3.0" - - id: 224 - transactions: [] - epoch: "3.0" - - id: 225 - transactions: [] - epoch: "3.0" - - id: 226 - transactions: [] - epoch: "3.0" - - id: 227 - transactions: [] - epoch: "3.0" - - id: 228 - transactions: [] - epoch: "3.0" - - id: 229 - transactions: [] - epoch: "3.0" - - id: 230 - transactions: [] - epoch: "3.0" - - id: 231 - transactions: [] - epoch: "3.0" - - id: 232 - transactions: [] - epoch: "3.0" - - id: 233 - transactions: [] - epoch: "3.0" - - id: 234 - transactions: [] - epoch: "3.0" - - id: 235 - transactions: [] - epoch: "3.0" - - id: 236 - transactions: [] - epoch: "3.0" - - id: 237 - transactions: [] - epoch: "3.0" - - id: 238 - transactions: [] - epoch: "3.0" - - id: 239 - transactions: [] - epoch: "3.0" - - id: 240 - transactions: [] - epoch: "3.0" - - id: 241 - transactions: [] - epoch: "3.0" - - id: 242 - transactions: [] - epoch: "3.0" - - id: 243 - transactions: [] - epoch: "3.0" - - id: 244 - transactions: [] - epoch: "3.0" - - id: 245 - transactions: [] - epoch: "3.0" - - id: 246 - transactions: [] - epoch: "3.0" - - id: 247 - transactions: [] - epoch: "3.0" - - id: 248 - transactions: [] - epoch: "3.0" - - id: 249 - transactions: [] - epoch: "3.0" - - id: 250 - transactions: [] - epoch: "3.0" - - id: 251 - transactions: [] - epoch: "3.0" - - id: 252 - transactions: [] - epoch: "3.0" - - id: 253 - transactions: [] - epoch: "3.0" - - id: 254 - transactions: [] - epoch: "3.0" - - id: 255 - transactions: [] - epoch: "3.0" - - id: 256 - transactions: [] - epoch: "3.0" - - id: 257 - transactions: [] - epoch: "3.0" - - id: 258 - transactions: [] - epoch: "3.0" - - id: 259 - transactions: [] - epoch: "3.0" - - id: 260 - transactions: [] - epoch: "3.0" - - id: 261 - transactions: [] - epoch: "3.0" - - id: 262 - transactions: [] - epoch: "3.0" - - id: 263 - transactions: [] - epoch: "3.0" - - id: 264 - transactions: [] - epoch: "3.0" - - id: 265 - transactions: [] - epoch: "3.0" - - id: 266 - transactions: [] - epoch: "3.0" - - id: 267 - transactions: [] - epoch: "3.0" - - id: 268 - transactions: [] - epoch: "3.0" - - id: 269 - transactions: [] - epoch: "3.0" - - id: 270 - transactions: [] - epoch: "3.0" - - id: 271 - transactions: [] - epoch: "3.0" - - id: 272 - transactions: [] - epoch: "3.0" - - id: 273 - transactions: [] - epoch: "3.0" - - id: 274 - transactions: [] - epoch: "3.0" - - id: 275 - transactions: [] - epoch: "3.0" - - id: 276 - transactions: [] - epoch: "3.0" - - id: 277 - transactions: [] - epoch: "3.0" - - id: 278 - transactions: [] - epoch: "3.0" diff --git a/tests/dao/aibtcdev-base-dao.test.ts b/tests/dao/aibtcdev-base-dao.test.ts index 835019d2..ae95145a 100644 --- a/tests/dao/aibtcdev-base-dao.test.ts +++ b/tests/dao/aibtcdev-base-dao.test.ts @@ -4,9 +4,9 @@ import { describe, expect, it } from "vitest"; const accounts = simnet.getAccounts(); const address1 = accounts.get("wallet_1")!; const address2 = accounts.get("wallet_2")!; -const addressDeployer = accounts.get("deployer")!; +const deployer = accounts.get("deployer")!; -const contractAddress = `${addressDeployer}.aibtcdev-base-dao`; +const contractAddress = `${deployer}.aibtcdev-base-dao`; enum ErrCode { ERR_UNAUTHORIZED = 1000, @@ -16,6 +16,10 @@ enum ErrCode { } describe("aibtcdev-base-dao", () => { + it("should have tests written", () => { + expect(true).toBe(true); + }); + /* // Extension Management Tests describe("set-extension()", () => { it("fails if caller is not DAO or extension"); @@ -27,7 +31,7 @@ describe("aibtcdev-base-dao", () => { it("succeeds and sets multiple extension statuses"); }); - // Execution Tests + // Execution Tests describe("execute()", () => { it("fails if caller is not DAO or extension"); it("succeeds and executes proposal"); @@ -54,6 +58,9 @@ describe("aibtcdev-base-dao", () => { describe("executed-at()", () => { it("succeeds and returns none with unrecognized proposal"); - it("succeeds and returns the Bitcoin block height the proposal was executed"); + it( + "succeeds and returns the Bitcoin block height the proposal was executed" + ); }); + */ }); diff --git a/tests/dao/extensions/aibtc-action-proposals.test.ts b/tests/dao/extensions/aibtc-action-proposals.test.ts index e483f1fc..15f156dd 100644 --- a/tests/dao/extensions/aibtc-action-proposals.test.ts +++ b/tests/dao/extensions/aibtc-action-proposals.test.ts @@ -4,198 +4,40 @@ import { describe, expect, it } from "vitest"; const accounts = simnet.getAccounts(); const address1 = accounts.get("wallet_1")!; const address2 = accounts.get("wallet_2")!; -const addressDeployer = accounts.get("deployer")!; +const deployer = accounts.get("deployer")!; -const contractAddress = `${addressDeployer}.aibtc-action-proposals`; +const contractAddress = `${deployer}.aibtc-action-proposals`; -enum ErrCode { - ERR_UNAUTHORIZED = 1000, - ERR_NOT_DAO_OR_EXTENSION, - - ERR_NOT_INITIALIZED = 1100, - ERR_ALREADY_INITIALIZED, - - ERR_TREASURY_MUST_BE_CONTRACT = 1200, - ERR_TREASURY_CANNOT_BE_SELF, - ERR_TREASURY_ALREADY_SET, - ERR_TREASURY_MISMATCH, - - ERR_TOKEN_MUST_BE_CONTRACT = 1300, - ERR_TOKEN_NOT_INITIALIZED, - ERR_TOKEN_MISMATCH, +export enum ErrCode { + ERR_NOT_DAO_OR_EXTENSION = 1000, ERR_INSUFFICIENT_BALANCE, - - ERR_PROPOSAL_NOT_FOUND = 1400, - ERR_PROPOSAL_ALREADY_EXECUTED, + ERR_FETCHING_TOKEN_DATA, + ERR_PROPOSAL_NOT_FOUND, ERR_PROPOSAL_STILL_ACTIVE, ERR_SAVING_PROPOSAL, ERR_PROPOSAL_ALREADY_CONCLUDED, - - ERR_VOTE_TOO_SOON = 1500, + ERR_RETRIEVING_START_BLOCK_HASH, + ERR_VOTE_TOO_SOON, ERR_VOTE_TOO_LATE, ERR_ALREADY_VOTED, - ERR_ZERO_VOTING_POWER, - ERR_QUORUM_NOT_REACHED, - - ERR_INVALID_ACTION = 1600, - ERR_INVALID_PARAMETERS, + ERR_INVALID_ACTION, } -describe("aibtc-action-proposals", () => { - // Protocol Treasury Tests - describe("set-protocol-treasury()", () => { - it("fails if caller is not DAO or extension", () => { - const receipt = simnet.callPublicFn( - contractAddress, - "set-protocol-treasury", - [Cl.contractPrincipal(addressDeployer, "test-treasury")], - address1 - ); - expect(receipt.result).toBeErr(Cl.uint(ErrCode.ERR_NOT_DAO_OR_EXTENSION)); - }); - - it("fails if treasury is not a contract", () => { - const receipt = simnet.callPublicFn( - contractAddress, - "set-protocol-treasury", - [Cl.standardPrincipal(address1)], - addressDeployer - ); - expect(receipt.result).toBeErr( - Cl.uint(ErrCode.ERR_TREASURY_MUST_BE_CONTRACT) - ); - }); - - it("fails if treasury is self", () => { - const receipt = simnet.callPublicFn( - contractAddress, - "set-protocol-treasury", - [Cl.contractPrincipal(addressDeployer, "aibtc-action-proposals")], - addressDeployer - ); - expect(receipt.result).toBeErr( - Cl.uint(ErrCode.ERR_TREASURY_CANNOT_BE_SELF) - ); - }); +const votingPeriod = 144; // 24 hours in BTC blocks +const votingQuorum = 66; // 66% quorum - it("fails if treasury is already set", () => { - // First set the treasury - simnet.callPublicFn( - contractAddress, - "set-protocol-treasury", - [Cl.contractPrincipal(addressDeployer, "test-treasury")], - addressDeployer - ); - - // Try to set it to the same value - const receipt = simnet.callPublicFn( - contractAddress, - "set-protocol-treasury", - [Cl.contractPrincipal(addressDeployer, "test-treasury")], - addressDeployer - ); - expect(receipt.result).toBeErr(Cl.uint(ErrCode.ERR_TREASURY_ALREADY_SET)); - }); - - it("succeeds and sets new treasury", () => { - const receipt = simnet.callPublicFn( - contractAddress, - "set-protocol-treasury", - [Cl.contractPrincipal(addressDeployer, "test-treasury")], - addressDeployer - ); - expect(receipt.result).toBeOk(Cl.bool(true)); - - // Verify treasury was set - const getReceipt = simnet.callReadOnlyFn( - contractAddress, - "get-protocol-treasury", - [], - addressDeployer - ); - expect(getReceipt.result).toBeOk( - Cl.some(Cl.contractPrincipal(addressDeployer, "test-treasury")) - ); - }); - }); - - // Voting Token Tests - describe("set-voting-token()", () => { - it("fails if caller is not DAO or extension", () => { - const receipt = simnet.callPublicFn( - contractAddress, - "set-voting-token", - [Cl.contractPrincipal(addressDeployer, "test-token")], - address1 - ); - expect(receipt.result).toBeErr(Cl.uint(ErrCode.ERR_NOT_DAO_OR_EXTENSION)); - }); - - it("fails if token is not a contract", () => { - const receipt = simnet.callPublicFn( - contractAddress, - "set-voting-token", - [Cl.standardPrincipal(address1)], - addressDeployer - ); - expect(receipt.result).toBeErr( - Cl.uint(ErrCode.ERR_TOKEN_MUST_BE_CONTRACT) - ); - }); - - it("fails if token is not initialized", () => { - const receipt = simnet.callPublicFn( - contractAddress, - "set-voting-token", - [Cl.contractPrincipal(addressDeployer, "test-token")], - addressDeployer - ); - expect(receipt.result).toBeErr( - Cl.uint(ErrCode.ERR_TOKEN_NOT_INITIALIZED) - ); - }); - - it("fails if token mismatches", () => { - // First initialize the token - simnet.callPublicFn( - contractAddress, - "set-voting-token", - [Cl.contractPrincipal(addressDeployer, "test-token")], - addressDeployer - ); - - // Try to set a different token - const receipt = simnet.callPublicFn( - contractAddress, - "set-voting-token", - [Cl.contractPrincipal(addressDeployer, "different-token")], - addressDeployer - ); - expect(receipt.result).toBeErr(Cl.uint(ErrCode.ERR_TOKEN_MISMATCH)); - }); - - it("succeeds and sets new token", () => { - const receipt = simnet.callPublicFn( - contractAddress, - "set-voting-token", - [Cl.contractPrincipal(addressDeployer, "test-token")], - addressDeployer - ); - expect(receipt.result).toBeOk(Cl.bool(true)); - - // Verify token was set - const getReceipt = simnet.callReadOnlyFn( - contractAddress, - "get-voting-token", - [], - addressDeployer - ); - expect(getReceipt.result).toBeOk( - Cl.some(Cl.contractPrincipal(addressDeployer, "test-token")) - ); - }); +describe("aibtc-action-proposals", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); }); + /* // Proposal Tests describe("propose-action()", () => { it("fails if contract not initialized", () => { @@ -205,7 +47,7 @@ describe("aibtc-action-proposals", () => { [ Cl.stringAscii("send-message"), Cl.list([Cl.stringUtf8("Hello World")]), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -217,15 +59,15 @@ describe("aibtc-action-proposals", () => { simnet.callPublicFn( contractAddress, "set-protocol-treasury", - [Cl.contractPrincipal(addressDeployer, "test-treasury")], - addressDeployer + [Cl.contractPrincipal(deployer, "test-treasury")], + deployer ); simnet.callPublicFn( contractAddress, "set-voting-token", - [Cl.contractPrincipal(addressDeployer, "test-token")], - addressDeployer + [Cl.contractPrincipal(deployer, "test-token")], + deployer ); const receipt = simnet.callPublicFn( @@ -234,7 +76,7 @@ describe("aibtc-action-proposals", () => { [ Cl.stringAscii("send-message"), Cl.list([Cl.stringUtf8("Hello World")]), - Cl.contractPrincipal(addressDeployer, "wrong-token"), + Cl.contractPrincipal(deployer, "wrong-token"), ], address1 ); @@ -248,7 +90,7 @@ describe("aibtc-action-proposals", () => { [ Cl.stringAscii("send-message"), Cl.list([Cl.stringUtf8("Hello World")]), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -259,10 +101,10 @@ describe("aibtc-action-proposals", () => { // Mock some balance for the caller simnet.callPublicFn( - `${addressDeployer}.test-token`, + `${deployer}.test-token`, "mint", [Cl.uint(1000000), Cl.standardPrincipal(address1)], - addressDeployer + deployer ); const receipt = simnet.callPublicFn( @@ -271,7 +113,7 @@ describe("aibtc-action-proposals", () => { [ Cl.stringAscii("invalid-action"), Cl.list([Cl.stringUtf8("Hello World")]), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -285,21 +127,20 @@ describe("aibtc-action-proposals", () => { [ Cl.stringAscii("send-message"), Cl.list([]), // Empty parameters - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); expect(receipt.result).toBeErr(Cl.uint(ErrCode.ERR_INVALID_PARAMETERS)); }); - /* TODO: fix test below it("succeeds and creates new proposal", () => { // Mock some balance for the caller simnet.callPublicFn( - `${addressDeployer}.test-token`, + `${deployer}.test-token`, "mint", [Cl.uint(1000000), Cl.standardPrincipal(address1)], - addressDeployer + deployer ); const receipt = simnet.callPublicFn( @@ -308,7 +149,7 @@ describe("aibtc-action-proposals", () => { [ Cl.stringAscii("send-message"), Cl.list([Cl.stringUtf8("Hello World")]), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -319,7 +160,7 @@ describe("aibtc-action-proposals", () => { contractAddress, "get-total-proposals", [], - addressDeployer + deployer ); expect(getReceipt.result).toBeOk(Cl.uint(1)); @@ -328,7 +169,7 @@ describe("aibtc-action-proposals", () => { contractAddress, "get-proposal", [Cl.uint(1)], - addressDeployer + deployer ); const proposal = proposalReceipt.result.expectSome().expectTuple(); expect(proposal.action).toBe("send-message"); @@ -338,17 +179,19 @@ describe("aibtc-action-proposals", () => { expect(proposal.votesAgainst).toBe(0); }); */ - }); +}); +/* // Voting Tests describe("vote-on-proposal()", () => { + it("fails if contract not initialized", () => { const receipt = simnet.callPublicFn( contractAddress, "vote-on-proposal", [ Cl.uint(1), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), Cl.bool(true), ], address1 @@ -361,15 +204,15 @@ describe("aibtc-action-proposals", () => { simnet.callPublicFn( contractAddress, "set-protocol-treasury", - [Cl.contractPrincipal(addressDeployer, "test-treasury")], - addressDeployer + [Cl.contractPrincipal(deployer, "test-treasury")], + deployer ); simnet.callPublicFn( contractAddress, "set-voting-token", - [Cl.contractPrincipal(addressDeployer, "test-token")], - addressDeployer + [Cl.contractPrincipal(deployer, "test-token")], + deployer ); const receipt = simnet.callPublicFn( @@ -377,7 +220,7 @@ describe("aibtc-action-proposals", () => { "vote-on-proposal", [ Cl.uint(1), - Cl.contractPrincipal(addressDeployer, "wrong-token"), + Cl.contractPrincipal(deployer, "wrong-token"), Cl.bool(true), ], address1 @@ -391,7 +234,7 @@ describe("aibtc-action-proposals", () => { "vote-on-proposal", [ Cl.uint(1), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), Cl.bool(true), ], address1 @@ -402,10 +245,10 @@ describe("aibtc-action-proposals", () => { it("fails if voting too soon", () => { // Mock some balance for the caller simnet.callPublicFn( - `${addressDeployer}.test-token`, + `${deployer}.test-token`, "mint", [Cl.uint(1000000), Cl.standardPrincipal(address1)], - addressDeployer + deployer ); // Create a proposal @@ -415,7 +258,7 @@ describe("aibtc-action-proposals", () => { [ Cl.stringAscii("send-message"), Cl.list([Cl.stringUtf8("Hello World")]), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -426,7 +269,7 @@ describe("aibtc-action-proposals", () => { "vote-on-proposal", [ Cl.uint(1), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), Cl.bool(true), ], address1 @@ -443,7 +286,7 @@ describe("aibtc-action-proposals", () => { "vote-on-proposal", [ Cl.uint(1), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), Cl.bool(true), ], address1 @@ -458,8 +301,8 @@ describe("aibtc-action-proposals", () => { "conclude-proposal", [ Cl.uint(1), - Cl.contractPrincipal(addressDeployer, "test-treasury"), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-treasury"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -469,7 +312,7 @@ describe("aibtc-action-proposals", () => { "vote-on-proposal", [ Cl.uint(1), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), Cl.bool(true), ], address1 @@ -487,7 +330,7 @@ describe("aibtc-action-proposals", () => { [ Cl.stringAscii("send-message"), Cl.list([Cl.stringUtf8("Hello World")]), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -498,7 +341,7 @@ describe("aibtc-action-proposals", () => { "vote-on-proposal", [ Cl.uint(2), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), Cl.bool(true), ], address1 @@ -510,7 +353,7 @@ describe("aibtc-action-proposals", () => { "vote-on-proposal", [ Cl.uint(2), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), Cl.bool(true), ], address1 @@ -524,7 +367,7 @@ describe("aibtc-action-proposals", () => { "vote-on-proposal", [ Cl.uint(2), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), Cl.bool(true), ], address2 @@ -536,7 +379,7 @@ describe("aibtc-action-proposals", () => { contractAddress, "get-total-votes", [Cl.uint(2), Cl.standardPrincipal(address2)], - addressDeployer + deployer ); expect(getReceipt.result).toBeOk(Cl.uint(1000000)); }); @@ -550,8 +393,8 @@ describe("aibtc-action-proposals", () => { "conclude-proposal", [ Cl.uint(1), - Cl.contractPrincipal(addressDeployer, "test-treasury"), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-treasury"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -563,15 +406,15 @@ describe("aibtc-action-proposals", () => { simnet.callPublicFn( contractAddress, "set-protocol-treasury", - [Cl.contractPrincipal(addressDeployer, "test-treasury")], - addressDeployer + [Cl.contractPrincipal(deployer, "test-treasury")], + deployer ); simnet.callPublicFn( contractAddress, "set-voting-token", - [Cl.contractPrincipal(addressDeployer, "test-token")], - addressDeployer + [Cl.contractPrincipal(deployer, "test-token")], + deployer ); const receipt = simnet.callPublicFn( @@ -579,8 +422,8 @@ describe("aibtc-action-proposals", () => { "conclude-proposal", [ Cl.uint(1), - Cl.contractPrincipal(addressDeployer, "wrong-treasury"), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "wrong-treasury"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -595,7 +438,7 @@ describe("aibtc-action-proposals", () => { [ Cl.stringAscii("send-message"), Cl.list([Cl.stringUtf8("Hello World")]), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -605,8 +448,8 @@ describe("aibtc-action-proposals", () => { "conclude-proposal", [ Cl.uint(3), - Cl.contractPrincipal(addressDeployer, "test-treasury"), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-treasury"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -625,8 +468,8 @@ describe("aibtc-action-proposals", () => { "conclude-proposal", [ Cl.uint(3), - Cl.contractPrincipal(addressDeployer, "test-treasury"), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-treasury"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -637,8 +480,8 @@ describe("aibtc-action-proposals", () => { "conclude-proposal", [ Cl.uint(3), - Cl.contractPrincipal(addressDeployer, "test-treasury"), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-treasury"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -655,7 +498,7 @@ describe("aibtc-action-proposals", () => { [ Cl.stringAscii("send-message"), Cl.list([Cl.stringUtf8("Hello World")]), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -666,7 +509,7 @@ describe("aibtc-action-proposals", () => { "vote-on-proposal", [ Cl.uint(4), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), Cl.bool(true), ], address1 @@ -680,8 +523,8 @@ describe("aibtc-action-proposals", () => { "conclude-proposal", [ Cl.uint(4), - Cl.contractPrincipal(addressDeployer, "test-treasury"), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-treasury"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -696,7 +539,7 @@ describe("aibtc-action-proposals", () => { [ Cl.stringAscii("send-message"), Cl.list([Cl.stringUtf8("Hello World")]), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -707,7 +550,7 @@ describe("aibtc-action-proposals", () => { "vote-on-proposal", [ Cl.uint(5), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), Cl.bool(false), ], address1 @@ -721,8 +564,8 @@ describe("aibtc-action-proposals", () => { "conclude-proposal", [ Cl.uint(5), - Cl.contractPrincipal(addressDeployer, "test-treasury"), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-treasury"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ); @@ -737,7 +580,7 @@ describe("aibtc-action-proposals", () => { contractAddress, "get-voting-period", [], - addressDeployer + deployer ); expect(receipt.result).toBe(Cl.uint(144)); // 144 blocks, ~1 day }); @@ -749,7 +592,7 @@ describe("aibtc-action-proposals", () => { contractAddress, "get-voting-quorum", [], - addressDeployer + deployer ); expect(receipt.result).toBe(Cl.uint(66)); // 66% of liquid supply }); @@ -764,7 +607,7 @@ describe("aibtc-action-proposals", () => { contractAddress, "is-initialized", [], - addressDeployer + deployer ); expect(receipt.result).toBeBool(false); }); @@ -774,21 +617,21 @@ describe("aibtc-action-proposals", () => { simnet.callPublicFn( contractAddress, "set-protocol-treasury", - [Cl.contractPrincipal(addressDeployer, "test-treasury")], - addressDeployer + [Cl.contractPrincipal(deployer, "test-treasury")], + deployer ); simnet.callPublicFn( contractAddress, "set-voting-token", - [Cl.contractPrincipal(addressDeployer, "test-token")], - addressDeployer + [Cl.contractPrincipal(deployer, "test-token")], + deployer ); const receipt = simnet.callReadOnlyFn( contractAddress, "is-initialized", [], - addressDeployer + deployer ); expect(receipt.result).toBeBool(true); }); @@ -803,7 +646,7 @@ describe("aibtc-action-proposals", () => { contractAddress, "get-protocol-treasury", [], - addressDeployer + deployer ); expect(receipt.result).toBe(Cl.none()); }); @@ -813,18 +656,18 @@ describe("aibtc-action-proposals", () => { simnet.callPublicFn( contractAddress, "set-protocol-treasury", - [Cl.contractPrincipal(addressDeployer, "test-treasury")], - addressDeployer + [Cl.contractPrincipal(deployer, "test-treasury")], + deployer ); const receipt = simnet.callReadOnlyFn( contractAddress, "get-protocol-treasury", [], - addressDeployer + deployer ); expect(receipt.result).toBeOk( - Cl.some(Cl.contractPrincipal(addressDeployer, "test-treasury")) + Cl.some(Cl.contractPrincipal(deployer, "test-treasury")) ); }); }); @@ -838,7 +681,7 @@ describe("aibtc-action-proposals", () => { contractAddress, "get-voting-token", [], - addressDeployer + deployer ); expect(receipt.result).toBe(Cl.none()); }); @@ -848,18 +691,18 @@ describe("aibtc-action-proposals", () => { simnet.callPublicFn( contractAddress, "set-voting-token", - [Cl.contractPrincipal(addressDeployer, "test-token")], - addressDeployer + [Cl.contractPrincipal(deployer, "test-token")], + deployer ); const receipt = simnet.callReadOnlyFn( contractAddress, "get-voting-token", [], - addressDeployer + deployer ); expect(receipt.result).toBeOk( - Cl.some(Cl.contractPrincipal(addressDeployer, "test-token")) + Cl.some(Cl.contractPrincipal(deployer, "test-token")) ); }); }); @@ -870,12 +713,11 @@ describe("aibtc-action-proposals", () => { contractAddress, "get-proposal", [Cl.uint(999)], - addressDeployer + deployer ); expect(receipt.result).toBeOk(Cl.none()); }); - /* TODO: fix test below it("returns proposal details for existing proposal", () => { // Create a proposal first simnet.callPublicFn( @@ -884,7 +726,7 @@ describe("aibtc-action-proposals", () => { [ Cl.stringAscii("send-message"), Cl.list([Cl.stringUtf8("Hello World")]), - Cl.contractPrincipal(addressDeployer, "test-token"), + Cl.contractPrincipal(deployer, "test-token"), ], address1 ), @@ -893,7 +735,7 @@ describe("aibtc-action-proposals", () => { contractAddress, "get-proposal", [Cl.uint(1)], - addressDeployer + deployer ); const proposal = receipt.result.expectOk().expectSome().expectTuple(); @@ -903,177 +745,121 @@ describe("aibtc-action-proposals", () => { expect(proposal.votesFor).toBe(0); expect(proposal.votesAgainst).toBe(0); }); - */ + }); - - describe("get-total-proposals()", () => { - it("returns 0 when no proposals exist", () => { - // Reset contract state - simnet.mineBlock([]); - - const receipt = simnet.callReadOnlyFn( - contractAddress, - "get-total-proposals", - [], - addressDeployer - ); - expect(receipt.result).toBe(Cl.uint(0)); - }); - - it("returns correct count after creating proposals", () => { - // Create two proposals - simnet.callPublicFn( - contractAddress, - "propose-action", - [ - Cl.stringAscii("send-message"), - Cl.list([Cl.stringUtf8("First")]), - Cl.contractPrincipal(addressDeployer, "test-token"), - ], - address1 - ); - simnet.callPublicFn( - contractAddress, - "propose-action", - [ - Cl.stringAscii("send-message"), - Cl.list([Cl.stringUtf8("Second")]), - Cl.contractPrincipal(addressDeployer, "test-token"), - ], - address1 - ); - - const receipt = simnet.callReadOnlyFn( - contractAddress, - "get-total-proposals", - [], - addressDeployer - ); - expect(receipt.result).toBeOk(Cl.uint(2)); - }); + */ + +describe("get-total-proposals()", () => { + it("returns 0 when no proposals exist", () => { + // Reset contract state + simnet.mineBlock([]); + + const receipt = simnet.callReadOnlyFn( + contractAddress, + "get-total-proposals", + [], + deployer + ); + expect(receipt.result).toStrictEqual(Cl.uint(0)); }); - describe("get-total-votes()", () => { - it("returns 0 for proposal with no votes", () => { - const receipt = simnet.callReadOnlyFn( - contractAddress, - "get-total-votes", - [Cl.uint(1), Cl.standardPrincipal(address1)], - addressDeployer - ); - expect(receipt.result).toBeOk(Cl.uint(0)); - }); - - it("returns correct vote amount for proposal with votes", () => { - // Create proposal and vote - simnet.callPublicFn( - contractAddress, - "propose-action", - [ - Cl.stringAscii("send-message"), - Cl.list([Cl.stringUtf8("Hello World")]), - Cl.contractPrincipal(addressDeployer, "test-token"), - ], - address1 - ); - simnet.callPublicFn( - contractAddress, - "vote-on-proposal", - [ - Cl.uint(1), - Cl.contractPrincipal(addressDeployer, "test-token"), - Cl.bool(true), - ], - address1 - ); - - const receipt = simnet.callReadOnlyFn( - contractAddress, - "get-total-votes", - [Cl.uint(1), Cl.standardPrincipal(address1)], - addressDeployer - ); - expect(receipt.result).toBeOk(Cl.uint(1000000)); // Amount from previous mint - }); + /* + it("returns correct count after creating proposals", () => { + // Create two proposals + simnet.callPublicFn( + contractAddress, + "propose-action", + [ + Cl.stringAscii("send-message"), + Cl.list([Cl.stringUtf8("First")]), + Cl.contractPrincipal(deployer, "test-token"), + ], + address1 + ); + simnet.callPublicFn( + contractAddress, + "propose-action", + [ + Cl.stringAscii("send-message"), + Cl.list([Cl.stringUtf8("Second")]), + Cl.contractPrincipal(deployer, "test-token"), + ], + address1 + ); + + const receipt = simnet.callReadOnlyFn( + contractAddress, + "get-total-proposals", + [], + deployer + ); + expect(receipt.result).toBeOk(Cl.uint(2)); }); + */ +}); - describe("get-voting-period()", () => { - it("returns the correct voting period", () => { - const receipt = simnet.callReadOnlyFn( - contractAddress, - "get-voting-period", - [], - addressDeployer - ); - expect(receipt.result).toBeOk(Cl.uint(144)); // 144 blocks, ~1 day - }); +describe("get-total-votes()", () => { + it("returns 0 for proposal with no votes", () => { + const receipt = simnet.callReadOnlyFn( + contractAddress, + "get-total-votes", + [Cl.uint(1), Cl.standardPrincipal(address1)], + deployer + ); + expect(receipt.result).toStrictEqual(Cl.uint(0)); }); - describe("get-voting-quorum()", () => { - it("returns the correct voting quorum", () => { - const receipt = simnet.callReadOnlyFn( - contractAddress, - "get-voting-quorum", - [], - addressDeployer - ); - expect(receipt.result).toBeOk(Cl.uint(66)); // 66% of liquid supply - }); + /* + it("returns correct vote amount for proposal with votes", () => { + // Create proposal and vote + simnet.callPublicFn( + contractAddress, + "propose-action", + [ + Cl.stringAscii("send-message"), + Cl.list([Cl.stringUtf8("Hello World")]), + Cl.contractPrincipal(deployer, "test-token"), + ], + address1 + ); + simnet.callPublicFn( + contractAddress, + "vote-on-proposal", + [Cl.uint(1), Cl.contractPrincipal(deployer, "test-token"), Cl.bool(true)], + address1 + ); + + const receipt = simnet.callReadOnlyFn( + contractAddress, + "get-total-votes", + [Cl.uint(1), Cl.standardPrincipal(address1)], + deployer + ); + expect(receipt.result).toBeOk(Cl.uint(1000000)); // Amount from previous mint }); + */ +}); - describe("is-initialized()", () => { - it("returns false when treasury and token not set", () => { - // Reset contract state - simnet.mineBlock([]); - - const receipt = simnet.callReadOnlyFn( - contractAddress, - "is-initialized", - [], - addressDeployer - ); - expect(receipt.result).toBeOk(Cl.bool(false)); - }); - - /* TODO: fix test below - it("returns true when treasury and token are set", () => { - // Set treasury and token - simnet.callPublicFn( - contractAddress, - "set-protocol-treasury", - [Cl.contractPrincipal(addressDeployer, "test-treasury")], - addressDeployer - ) - simnet.callPublicFn( - contractAddress, - "set-voting-token", - [Cl.contractPrincipal(addressDeployer, "test-token")], - addressDeployer - ), - - const receipt = simnet.callReadOnlyFn( - contractAddress, - "is-initialized", - [], - addressDeployer - ).result; - expect(receipt).toBeOk(Cl.bool(true)); - }); - */ +describe("get-voting-period()", () => { + it("returns the correct voting period", () => { + const receipt = simnet.callReadOnlyFn( + contractAddress, + "get-voting-period", + [], + deployer + ); + expect(receipt.result).toStrictEqual(Cl.uint(144)); // 144 blocks, ~1 day }); +}); - describe("callback()", () => { - it("succeeds with any sender and memo", () => { - const receipt = simnet.callPublicFn( - contractAddress, - "callback", - [ - Cl.standardPrincipal(address1), - Cl.buffer(new TextEncoder().encode("memo")), - ], - address1 - ); - expect(receipt.result).toBeOk(Cl.bool(true)); - }); +describe("get-voting-quorum()", () => { + it("returns the correct voting quorum", () => { + const receipt = simnet.callReadOnlyFn( + contractAddress, + "get-voting-quorum", + [], + deployer + ); + expect(receipt.result).toStrictEqual(Cl.uint(66)); // 66% of liquid supply }); }); diff --git a/tests/dao/extensions/aibtc-bank-account.test.ts b/tests/dao/extensions/aibtc-bank-account.test.ts index 2145654d..b7f6c132 100644 --- a/tests/dao/extensions/aibtc-bank-account.test.ts +++ b/tests/dao/extensions/aibtc-bank-account.test.ts @@ -4,9 +4,9 @@ import { describe, expect, it } from "vitest"; const accounts = simnet.getAccounts(); const address1 = accounts.get("wallet_1")!; const address2 = accounts.get("wallet_2")!; -const addressDeployer = accounts.get("deployer")!; +const deployer = accounts.get("deployer")!; -const contractAddress = `${addressDeployer}.aibtc-bank-account`; +const contractAddress = `${deployer}.aibtc-bank-account`; enum ErrCode { ERR_INVALID = 2000, @@ -19,6 +19,16 @@ const withdrawalAmount = 10000000; // 10 STX const withdrawalPeriod = 144; // 144 blocks describe("aibtc-bank-account", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); + }); + /* // Account Holder Tests describe("set-account-holder()", () => { it("fails if caller is not DAO or extension"); @@ -59,4 +69,5 @@ describe("aibtc-bank-account", () => { it("fails if withdrawing too soon"); it("succeeds and transfers STX to account holder"); }); + */ }); diff --git a/tests/dao/extensions/aibtc-bitflow-pool.test.ts b/tests/dao/extensions/aibtc-bitflow-pool.test.ts index e69de29b..518627f4 100644 --- a/tests/dao/extensions/aibtc-bitflow-pool.test.ts +++ b/tests/dao/extensions/aibtc-bitflow-pool.test.ts @@ -0,0 +1,7 @@ +import { describe, expect, it } from "vitest"; + +describe("aibtc-bitflow-pool", () => { + it("should have tests written", () => { + expect(true).toBe(true); + }); +}); diff --git a/tests/dao/extensions/aibtc-core-proposals.test.ts b/tests/dao/extensions/aibtc-core-proposals.test.ts index 3240559c..a106c08e 100644 --- a/tests/dao/extensions/aibtc-core-proposals.test.ts +++ b/tests/dao/extensions/aibtc-core-proposals.test.ts @@ -6,6 +6,24 @@ const deployer = accounts.get("deployer")!; const contractAddress = `${deployer}.aibtc-core-proposals`; +export enum ErrCode { + ERR_NOT_DAO_OR_EXTENSION = 3000, + ERR_FETCHING_TOKEN_DATA, + ERR_INSUFFICIENT_BALANCE, + ERR_PROPOSAL_NOT_FOUND, + ERR_PROPOSAL_ALREADY_EXECUTED, + ERR_PROPOSAL_STILL_ACTIVE, + ERR_SAVING_PROPOSAL, + ERR_PROPOSAL_ALREADY_CONCLUDED, + ERR_RETRIEVING_START_BLOCK_HASH, + ERR_VOTE_TOO_SOON, + ERR_VOTE_TOO_LATE, + ERR_ALREADY_VOTED, +} + +const votingPeriod = 144; // 24 hours in BTC blocks +const votingQuorum = 95; // 95% quorum + describe("aibtc-core-proposals", () => { it("callback() should respond with (ok true)", () => { const callback = simnet.callPublicFn( @@ -20,35 +38,7 @@ describe("aibtc-core-proposals", () => { /* -enum ErrCode { - ERR_UNAUTHORIZED = 3000, - ERR_NOT_DAO_OR_EXTENSION, - - ERR_NOT_INITIALIZED = 3100, - ERR_ALREADY_INITIALIZED, - ERR_TREASURY_MUST_BE_CONTRACT = 3200, - ERR_TREASURY_CANNOT_BE_SELF, - ERR_TREASURY_ALREADY_SET, - ERR_TREASURY_MISMATCH, - - ERR_TOKEN_MUST_BE_CONTRACT = 3300, - ERR_TOKEN_NOT_INITIALIZED, - ERR_TOKEN_MISMATCH, - ERR_INSUFFICIENT_BALANCE, - - ERR_PROPOSAL_NOT_FOUND = 3400, - ERR_PROPOSAL_ALREADY_EXECUTED, - ERR_PROPOSAL_STILL_ACTIVE, - ERR_SAVING_PROPOSAL, - ERR_PROPOSAL_ALREADY_CONCLUDED, - - ERR_VOTE_TOO_SOON = 3500, - ERR_VOTE_TOO_LATE, - ERR_ALREADY_VOTED, - ERR_ZERO_VOTING_POWER, - ERR_QUORUM_NOT_REACHED, -} describe("aibtc-ext003-direct-execute", () => { diff --git a/tests/dao/extensions/aibtc-onchain-messaging.test.ts b/tests/dao/extensions/aibtc-onchain-messaging.test.ts index 689e720b..71576517 100644 --- a/tests/dao/extensions/aibtc-onchain-messaging.test.ts +++ b/tests/dao/extensions/aibtc-onchain-messaging.test.ts @@ -8,8 +8,9 @@ const deployer = accounts.get("deployer")!; const contractAddress = `${deployer}.aibtc-onchain-messaging`; -enum ErrCode { - ERR_UNAUTHORIZED = 4000, +export enum ErrCode { + INPUT_ERROR = 4000, + ERR_UNAUTHORIZED, } describe("aibtc-onchain-messaging", () => { diff --git a/tests/dao/extensions/aibtc-payments-invoices.test.ts b/tests/dao/extensions/aibtc-payments-invoices.test.ts index f3cc20b4..6c4d047e 100644 --- a/tests/dao/extensions/aibtc-payments-invoices.test.ts +++ b/tests/dao/extensions/aibtc-payments-invoices.test.ts @@ -4,9 +4,9 @@ import { describe, expect, it } from "vitest"; const accounts = simnet.getAccounts(); const address1 = accounts.get("wallet_1")!; const address2 = accounts.get("wallet_2")!; -const addressDeployer = accounts.get("deployer")!; +const deployer = accounts.get("deployer")!; -const contractAddress = `${addressDeployer}.aibtc-payments-invoices`; +const contractAddress = `${deployer}.aibtc-payments-invoices`; enum ErrCode { ERR_UNAUTHORIZED = 5000, @@ -26,6 +26,16 @@ enum ErrCode { } describe("aibtc-payments-invoices", () => { + it("callback() should respond with (ok true)", () => { + const callback = simnet.callPublicFn( + contractAddress, + "callback", + [Cl.principal(deployer), Cl.bufferFromAscii("test")], + deployer + ); + expect(callback.result).toBeOk(Cl.bool(true)); + }); + /* // Payment Address Tests describe("set-payment-address()", () => { it("fails if caller is not DAO or extension"); @@ -72,4 +82,5 @@ describe("aibtc-payments-invoices", () => { it("fails if resource is disabled"); it("succeeds and updates info for resource"); }); + */ }); diff --git a/tests/dao/extensions/aibtc-token-dex.test.ts b/tests/dao/extensions/aibtc-token-dex.test.ts index e69de29b..e9734554 100644 --- a/tests/dao/extensions/aibtc-token-dex.test.ts +++ b/tests/dao/extensions/aibtc-token-dex.test.ts @@ -0,0 +1,7 @@ +import { describe, expect, it } from "vitest"; + +describe("aibtc-token-dex", () => { + it("should have tests written", () => { + expect(true).toBe(true); + }); +}); diff --git a/tests/dao/extensions/aibtc-token.test.ts b/tests/dao/extensions/aibtc-token.test.ts index e69de29b..cde85ff5 100644 --- a/tests/dao/extensions/aibtc-token.test.ts +++ b/tests/dao/extensions/aibtc-token.test.ts @@ -0,0 +1,7 @@ +import { describe, expect, it } from "vitest"; + +describe("aibtc-token", () => { + it("should have tests written", () => { + expect(true).toBe(true); + }); +}); diff --git a/tests/dao/proposals/aibtc-action-proposals-set-protocol-treasury.test.ts b/tests/dao/proposals/aibtc-action-proposals-set-protocol-treasury.test.ts deleted file mode 100644 index fa38b2b1..00000000 --- a/tests/dao/proposals/aibtc-action-proposals-set-protocol-treasury.test.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Cl } from "@stacks/transactions"; -import { describe, expect, it } from "vitest"; - -const accounts = simnet.getAccounts(); -const deployer = accounts.get("deployer")!; - -const contractAddress = `${deployer}.aibtc-action-add-resource`; - -describe("aibtc-action-proposals-set-protocol-treasury", () => { - it("execute() should fail if called directly", () => { - const callback = simnet.callPublicFn( - contractAddress, - "execute", - [Cl.principal(deployer)], - deployer - ); - expect(callback.result).toBeErr(); - }); -}); diff --git a/tests/dao/proposals/aibtc-action-proposals-set-voting-token.test.ts b/tests/dao/proposals/aibtc-action-proposals-set-voting-token.test.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/dao/proposals/aibtc-bank-account-set-protocol-treasury.test.ts b/tests/dao/proposals/aibtc-bank-account-set-protocol-treasury.test.ts deleted file mode 100644 index ef184563..00000000 --- a/tests/dao/proposals/aibtc-bank-account-set-protocol-treasury.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { describe, expect, it } from "vitest"; - -describe("aibtc-bank-account-set-protocol-treasury", () => { - it("should have tests written", () => { - expect(true).toBe(true); - }); -}); diff --git a/tests/dao/proposals/aibtc-bank-account-withdraw-stx.test.ts b/tests/dao/proposals/aibtc-bank-account-withdraw-stx.test.ts index e69de29b..30346a33 100644 --- a/tests/dao/proposals/aibtc-bank-account-withdraw-stx.test.ts +++ b/tests/dao/proposals/aibtc-bank-account-withdraw-stx.test.ts @@ -0,0 +1,7 @@ +import { describe, expect, it } from "vitest"; + +describe("aibtc-bank-account-withdraw-stx", () => { + it("should have tests written", () => { + expect(true).toBe(true); + }); +}); diff --git a/tests/dao/proposals/aibtc-base-add-new-extension.test.ts b/tests/dao/proposals/aibtc-base-add-new-extension.test.ts index e69de29b..7f13dfd6 100644 --- a/tests/dao/proposals/aibtc-base-add-new-extension.test.ts +++ b/tests/dao/proposals/aibtc-base-add-new-extension.test.ts @@ -0,0 +1,7 @@ +import { describe, expect, it } from "vitest"; + +describe("aibtc-base-add-new-extension", () => { + it("should have tests written", () => { + expect(true).toBe(true); + }); +}); diff --git a/tests/dao/proposals/aibtc-base-bootstrap-initialization.test.ts b/tests/dao/proposals/aibtc-base-bootstrap-initialization.test.ts index 6869bb11..6423498a 100644 --- a/tests/dao/proposals/aibtc-base-bootstrap-initialization.test.ts +++ b/tests/dao/proposals/aibtc-base-bootstrap-initialization.test.ts @@ -4,13 +4,22 @@ import { describe, expect, it } from "vitest"; const accounts = simnet.getAccounts(); const address1 = accounts.get("wallet_1")!; const address2 = accounts.get("wallet_2")!; -const addressDeployer = accounts.get("deployer")!; +const deployer = accounts.get("deployer")!; -const contractAddress = `${addressDeployer}.aibtc-prop001-bootstrap`; +const contractAddress = `${deployer}.aibtc-base-bootstrap-initialization`; -describe("aibtc-prop001-bootstrap", () => { +const daoManifest = + "This is where the DAO can put it's mission, purpose, and goals."; + +describe("aibtc-base-bootstrap-proposal", () => { // Manifest Tests - describe("get-dao-manifest()", () => { - it("returns DAO_MANIFEST as string"); + it("get-dao-manifest() returns DAO_MANIFEST as string", () => { + const receipt = simnet.callReadOnlyFn( + contractAddress, + "get-dao-manifest", + [], + deployer + ); + expect(receipt.result).toStrictEqual(Cl.stringAscii(daoManifest)); }); }); diff --git a/tests/dao/proposals/aibtc-base-replace-extension.test.ts b/tests/dao/proposals/aibtc-base-replace-extension.test.ts index e69de29b..9f946aa8 100644 --- a/tests/dao/proposals/aibtc-base-replace-extension.test.ts +++ b/tests/dao/proposals/aibtc-base-replace-extension.test.ts @@ -0,0 +1,7 @@ +import { describe, expect, it } from "vitest"; + +describe("aibtc-base-replace-extension", () => { + it("should have tests written", () => { + expect(true).toBe(true); + }); +}); diff --git a/tests/dao/proposals/aibtc-core-proposals-set-protocol-treasury.test.ts b/tests/dao/proposals/aibtc-core-proposals-set-protocol-treasury.test.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/dao/proposals/aibtc-core-proposals-set-voting-token.test.ts b/tests/dao/proposals/aibtc-core-proposals-set-voting-token.test.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/dao/proposals/aibtc-treasury-delegate-stx.test.ts b/tests/dao/proposals/aibtc-treasury-delegate-stx.test.ts index e69de29b..26c9a164 100644 --- a/tests/dao/proposals/aibtc-treasury-delegate-stx.test.ts +++ b/tests/dao/proposals/aibtc-treasury-delegate-stx.test.ts @@ -0,0 +1,7 @@ +import { describe, expect, it } from "vitest"; + +describe("aibtc-treasury-delegate-stx", () => { + it("should have tests written", () => { + expect(true).toBe(true); + }); +}); diff --git a/tests/dao/proposals/aibtc-treasury-freeze-asset.test.ts b/tests/dao/proposals/aibtc-treasury-freeze-asset.test.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/dao/proposals/aibtc-treasury-revoke-delegation.test.ts b/tests/dao/proposals/aibtc-treasury-revoke-delegation.test.ts index e69de29b..1f1fabb1 100644 --- a/tests/dao/proposals/aibtc-treasury-revoke-delegation.test.ts +++ b/tests/dao/proposals/aibtc-treasury-revoke-delegation.test.ts @@ -0,0 +1,7 @@ +import { describe, expect, it } from "vitest"; + +describe("aibtc-treasury-revoke-delegation", () => { + it("should have tests written", () => { + expect(true).toBe(true); + }); +}); diff --git a/tests/dao/proposals/aibtc-treasury-withdraw-ft.test.ts b/tests/dao/proposals/aibtc-treasury-withdraw-ft.test.ts index e69de29b..49fa8a90 100644 --- a/tests/dao/proposals/aibtc-treasury-withdraw-ft.test.ts +++ b/tests/dao/proposals/aibtc-treasury-withdraw-ft.test.ts @@ -0,0 +1,7 @@ +import { describe, expect, it } from "vitest"; + +describe("aibtc-treasury-withdraw-ft", () => { + it("should have tests written", () => { + expect(true).toBe(true); + }); +}); diff --git a/tests/dao/proposals/aibtc-treasury-withdraw-nft.test.ts b/tests/dao/proposals/aibtc-treasury-withdraw-nft.test.ts index e69de29b..af5a2ed9 100644 --- a/tests/dao/proposals/aibtc-treasury-withdraw-nft.test.ts +++ b/tests/dao/proposals/aibtc-treasury-withdraw-nft.test.ts @@ -0,0 +1,7 @@ +import { describe, expect, it } from "vitest"; + +describe("aibtc-treasury-withdraw-nft", () => { + it("should have tests written", () => { + expect(true).toBe(true); + }); +}); diff --git a/tests/dao/proposals/aibtc-treasury-withdraw-stx.test.ts b/tests/dao/proposals/aibtc-treasury-withdraw-stx.test.ts index e69de29b..86562314 100644 --- a/tests/dao/proposals/aibtc-treasury-withdraw-stx.test.ts +++ b/tests/dao/proposals/aibtc-treasury-withdraw-stx.test.ts @@ -0,0 +1,7 @@ +import { describe, expect, it } from "vitest"; + +describe("aibtc-treasury-withdraw-stx", () => { + it("should have tests written", () => { + expect(true).toBe(true); + }); +}); From e1b1da53032cd2ee3f0d78d597bc7fc51d573185 Mon Sep 17 00:00:00 2001 From: Jason Schrader Date: Tue, 14 Jan 2025 14:11:03 -0700 Subject: [PATCH 09/10] chore: minor package updates, deployment plan fix This version works with the test, the clarinet check version causes problems for some reason. Shouldn't be an issue in GH action. --- deployments/default.simnet-plan.yaml | 610 +-------------------- package-lock.json | 768 +++++++++++++++++---------- package.json | 12 +- 3 files changed, 483 insertions(+), 907 deletions(-) diff --git a/deployments/default.simnet-plan.yaml b/deployments/default.simnet-plan.yaml index 98cbd801..0306fd5d 100644 --- a/deployments/default.simnet-plan.yaml +++ b/deployments/default.simnet-plan.yaml @@ -48,11 +48,6 @@ genesis: plan: batches: - id: 0 - transactions: [] - - id: 1 - transactions: [] - epoch: "2.0" - - id: 2 transactions: - emulated-contract-publish: contract-name: nft-trait @@ -65,130 +60,7 @@ plan: path: "./.cache/requirements/SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.clar" clarity-version: 1 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 + - id: 1 transactions: - emulated-contract-publish: contract-name: sip-010-trait-ft-standard @@ -211,130 +83,7 @@ plan: path: "./.cache/requirements/ST295MNE41DC74QYCPRS8N37YYMC06N6Q3VQDZ6G1.xyk-core-v-1-2.clar" clarity-version: 2 epoch: "2.5" - - id: 45 - transactions: [] - epoch: "2.5" - - id: 46 - transactions: [] - epoch: "2.5" - - id: 47 - transactions: [] - epoch: "2.5" - - id: 48 - transactions: [] - epoch: "2.5" - - id: 49 - transactions: [] - epoch: "2.5" - - id: 50 - transactions: [] - epoch: "2.5" - - id: 51 - transactions: [] - epoch: "2.5" - - id: 52 - transactions: [] - epoch: "2.5" - - id: 53 - transactions: [] - epoch: "2.5" - - id: 54 - transactions: [] - epoch: "2.5" - - id: 55 - transactions: [] - epoch: "2.5" - - id: 56 - transactions: [] - epoch: "2.5" - - id: 57 - transactions: [] - epoch: "2.5" - - id: 58 - transactions: [] - epoch: "2.5" - - id: 59 - transactions: [] - epoch: "2.5" - - id: 60 - transactions: [] - epoch: "2.5" - - id: 61 - transactions: [] - epoch: "2.5" - - id: 62 - transactions: [] - epoch: "2.5" - - id: 63 - transactions: [] - epoch: "2.5" - - id: 64 - transactions: [] - epoch: "2.5" - - id: 65 - transactions: [] - epoch: "2.5" - - id: 66 - transactions: [] - epoch: "2.5" - - id: 67 - transactions: [] - epoch: "2.5" - - id: 68 - transactions: [] - epoch: "2.5" - - id: 69 - transactions: [] - epoch: "2.5" - - id: 70 - transactions: [] - epoch: "2.5" - - id: 71 - transactions: [] - epoch: "2.5" - - id: 72 - transactions: [] - epoch: "2.5" - - id: 73 - transactions: [] - epoch: "2.5" - - id: 74 - transactions: [] - epoch: "2.5" - - id: 75 - transactions: [] - epoch: "2.5" - - id: 76 - transactions: [] - epoch: "2.5" - - id: 77 - transactions: [] - epoch: "2.5" - - id: 78 - transactions: [] - epoch: "2.5" - - id: 79 - transactions: [] - epoch: "2.5" - - id: 80 - transactions: [] - epoch: "2.5" - - id: 81 - transactions: [] - epoch: "2.5" - - id: 82 - transactions: [] - epoch: "2.5" - - id: 83 - transactions: [] - epoch: "2.5" - - id: 84 - transactions: [] - epoch: "2.5" - - id: 85 - transactions: [] - epoch: "2.5" - - id: 86 + - id: 2 transactions: - emulated-contract-publish: contract-name: aibtcdev-dao-traits-v1 @@ -462,7 +211,7 @@ plan: path: contracts/dao/proposals/aibtc-base-bootstrap-initialization.clar clarity-version: 2 epoch: "3.0" - - id: 87 + - id: 3 transactions: - emulated-contract-publish: contract-name: aibtc-base-disable-extension @@ -590,7 +339,7 @@ plan: path: contracts/dao/proposals/aibtc-treasury-withdraw-ft.clar clarity-version: 2 epoch: "3.0" - - id: 88 + - id: 4 transactions: - emulated-contract-publish: contract-name: aibtc-treasury-withdraw-nft @@ -633,354 +382,3 @@ plan: path: contracts/test/proxy.clar clarity-version: 2 epoch: "3.0" - - id: 89 - transactions: [] - epoch: "3.0" - - id: 90 - transactions: [] - epoch: "3.0" - - id: 91 - transactions: [] - epoch: "3.0" - - id: 92 - transactions: [] - epoch: "3.0" - - id: 93 - transactions: [] - epoch: "3.0" - - id: 94 - transactions: [] - epoch: "3.0" - - id: 95 - transactions: [] - epoch: "3.0" - - id: 96 - transactions: [] - epoch: "3.0" - - id: 97 - transactions: [] - epoch: "3.0" - - id: 98 - transactions: [] - epoch: "3.0" - - id: 99 - transactions: [] - epoch: "3.0" - - id: 100 - transactions: [] - epoch: "3.0" - - id: 101 - transactions: [] - epoch: "3.0" - - id: 102 - transactions: [] - epoch: "3.0" - - id: 103 - transactions: [] - epoch: "3.0" - - id: 104 - transactions: [] - epoch: "3.0" - - id: 105 - transactions: [] - epoch: "3.0" - - id: 106 - transactions: [] - epoch: "3.0" - - id: 107 - transactions: [] - epoch: "3.0" - - id: 108 - transactions: [] - epoch: "3.0" - - id: 109 - transactions: [] - epoch: "3.0" - - id: 110 - transactions: [] - epoch: "3.0" - - id: 111 - transactions: [] - epoch: "3.0" - - id: 112 - transactions: [] - epoch: "3.0" - - id: 113 - transactions: [] - epoch: "3.0" - - id: 114 - transactions: [] - epoch: "3.0" - - id: 115 - transactions: [] - epoch: "3.0" - - id: 116 - transactions: [] - epoch: "3.0" - - id: 117 - transactions: [] - epoch: "3.0" - - id: 118 - transactions: [] - epoch: "3.0" - - id: 119 - transactions: [] - epoch: "3.0" - - id: 120 - transactions: [] - epoch: "3.0" - - id: 121 - transactions: [] - epoch: "3.0" - - id: 122 - transactions: [] - epoch: "3.0" - - id: 123 - transactions: [] - epoch: "3.0" - - id: 124 - transactions: [] - epoch: "3.0" - - id: 125 - transactions: [] - epoch: "3.0" - - id: 126 - transactions: [] - epoch: "3.0" - - id: 127 - transactions: [] - epoch: "3.0" - - id: 128 - transactions: [] - epoch: "3.0" - - id: 129 - transactions: [] - epoch: "3.0" - - id: 130 - transactions: [] - epoch: "3.0" - - id: 131 - transactions: [] - epoch: "3.0" - - id: 132 - transactions: [] - epoch: "3.0" - - id: 133 - transactions: [] - epoch: "3.0" - - id: 134 - transactions: [] - epoch: "3.0" - - id: 135 - transactions: [] - epoch: "3.0" - - id: 136 - transactions: [] - epoch: "3.0" - - id: 137 - transactions: [] - epoch: "3.0" - - id: 138 - transactions: [] - epoch: "3.0" - - id: 139 - transactions: [] - epoch: "3.0" - - id: 140 - transactions: [] - epoch: "3.0" - - id: 141 - transactions: [] - epoch: "3.0" - - id: 142 - transactions: [] - epoch: "3.0" - - id: 143 - transactions: [] - epoch: "3.0" - - id: 144 - transactions: [] - epoch: "3.0" - - id: 145 - transactions: [] - epoch: "3.0" - - id: 146 - transactions: [] - epoch: "3.0" - - id: 147 - transactions: [] - epoch: "3.0" - - id: 148 - transactions: [] - epoch: "3.0" - - id: 149 - transactions: [] - epoch: "3.0" - - id: 150 - transactions: [] - epoch: "3.0" - - id: 151 - transactions: [] - epoch: "3.0" - - id: 152 - transactions: [] - epoch: "3.0" - - id: 153 - transactions: [] - epoch: "3.0" - - id: 154 - transactions: [] - epoch: "3.0" - - id: 155 - transactions: [] - epoch: "3.0" - - id: 156 - transactions: [] - epoch: "3.0" - - id: 157 - transactions: [] - epoch: "3.0" - - id: 158 - transactions: [] - epoch: "3.0" - - id: 159 - transactions: [] - epoch: "3.0" - - id: 160 - transactions: [] - epoch: "3.0" - - id: 161 - transactions: [] - epoch: "3.0" - - id: 162 - transactions: [] - epoch: "3.0" - - id: 163 - transactions: [] - epoch: "3.0" - - id: 164 - transactions: [] - epoch: "3.0" - - id: 165 - transactions: [] - epoch: "3.0" - - id: 166 - transactions: [] - epoch: "3.0" - - id: 167 - transactions: [] - epoch: "3.0" - - id: 168 - transactions: [] - epoch: "3.0" - - id: 169 - transactions: [] - epoch: "3.0" - - id: 170 - transactions: [] - epoch: "3.0" - - id: 171 - transactions: [] - epoch: "3.0" - - id: 172 - transactions: [] - epoch: "3.0" - - id: 173 - transactions: [] - epoch: "3.0" - - id: 174 - transactions: [] - epoch: "3.0" - - id: 175 - transactions: [] - epoch: "3.0" - - id: 176 - transactions: [] - epoch: "3.0" - - id: 177 - transactions: [] - epoch: "3.0" - - id: 178 - transactions: [] - epoch: "3.0" - - id: 179 - transactions: [] - epoch: "3.0" - - id: 180 - transactions: [] - epoch: "3.0" - - id: 181 - transactions: [] - epoch: "3.0" - - id: 182 - transactions: [] - epoch: "3.0" - - id: 183 - transactions: [] - epoch: "3.0" - - id: 184 - transactions: [] - epoch: "3.0" - - id: 185 - transactions: [] - epoch: "3.0" - - id: 186 - transactions: [] - epoch: "3.0" - - id: 187 - transactions: [] - epoch: "3.0" - - id: 188 - transactions: [] - epoch: "3.0" - - id: 189 - transactions: [] - epoch: "3.0" - - id: 190 - transactions: [] - epoch: "3.0" - - id: 191 - transactions: [] - epoch: "3.0" - - id: 192 - transactions: [] - epoch: "3.0" - - id: 193 - transactions: [] - epoch: "3.0" - - id: 194 - transactions: [] - epoch: "3.0" - - id: 195 - transactions: [] - epoch: "3.0" - - id: 196 - transactions: [] - epoch: "3.0" - - id: 197 - transactions: [] - epoch: "3.0" - - id: 198 - transactions: [] - epoch: "3.0" - - id: 199 - transactions: [] - epoch: "3.0" - - id: 200 - transactions: [] - epoch: "3.0" - - id: 201 - transactions: [] - epoch: "3.0" - - id: 202 - transactions: [] - epoch: "3.0" - - id: 203 - transactions: [] - epoch: "3.0" - - id: 204 - transactions: [] - epoch: "3.0" - - id: 205 - transactions: [] - epoch: "3.0" diff --git a/package-lock.json b/package-lock.json index 7c563d45..9d63d6f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,22 +9,23 @@ "version": "0.0.2", "license": "MIT", "dependencies": { - "@hirosystems/clarinet-sdk": "^2.3.2", - "@stacks/transactions": "^6.12.0", + "@hirosystems/clarinet-sdk": "^2.12.0", + "@stacks/transactions": "^6.17.0", "chokidar-cli": "^3.0.0", - "typescript": "^5.3.3", - "vite": "^5.1.4", - "vitest": "^1.3.1", - "vitest-environment-clarinet": "^2.0.0" + "typescript": "^5.7.3", + "vite": "^5.4.11", + "vitest": "^1.6.0", + "vitest-environment-clarinet": "^2.1.0" } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", - "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", "cpu": [ "ppc64" ], + "license": "MIT", "optional": true, "os": [ "aix" @@ -34,12 +35,13 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", - "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "android" @@ -49,12 +51,13 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", - "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "android" @@ -64,12 +67,13 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", - "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "android" @@ -79,12 +83,13 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", - "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "darwin" @@ -94,12 +99,13 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", - "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "darwin" @@ -109,12 +115,13 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", - "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -124,12 +131,13 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", - "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -139,12 +147,13 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", - "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -154,12 +163,13 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", - "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -169,12 +179,13 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", - "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", "cpu": [ "ia32" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -184,12 +195,13 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", - "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", "cpu": [ "loong64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -199,12 +211,13 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", - "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", "cpu": [ "mips64el" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -214,12 +227,13 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", - "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", "cpu": [ "ppc64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -229,12 +243,13 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", - "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", "cpu": [ "riscv64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -244,12 +259,13 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", - "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", "cpu": [ "s390x" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -259,12 +275,13 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", - "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -274,12 +291,13 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", - "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "netbsd" @@ -289,12 +307,13 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", - "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "openbsd" @@ -304,12 +323,13 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", - "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "sunos" @@ -319,12 +339,13 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", - "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -334,12 +355,13 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", - "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", "cpu": [ "ia32" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -349,12 +371,13 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", - "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -364,33 +387,36 @@ } }, "node_modules/@hirosystems/clarinet-sdk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@hirosystems/clarinet-sdk/-/clarinet-sdk-2.3.2.tgz", - "integrity": "sha512-l3g9NSf8nGoOwONczLvHYVNOuuaNR1yuFPRTMhLfP+TE5F5q+UI+wtT98ZZSdCXDgTSg98Nc+f7DY67Ibx4yxw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@hirosystems/clarinet-sdk/-/clarinet-sdk-2.12.0.tgz", + "integrity": "sha512-6Jr/THJg4t52QO19ZKVEvIz99pTpSUOGMe1/TeczgzzQnb1k6MORvogWT2UhCGjSyku0VlnYQZS6CBP2xK2XsA==", + "license": "GPL-3.0", "dependencies": { - "@hirosystems/clarinet-sdk-wasm": "^2.3.2", - "@stacks/transactions": "^6.12.0", + "@hirosystems/clarinet-sdk-wasm": "^2.12.0", + "@stacks/transactions": "^6.13.0", "kolorist": "^1.8.0", "prompts": "^2.4.2", - "vitest": "^1.0.4", + "vitest": "^1.6.0", "yargs": "^17.7.2" }, "bin": { - "clarinet-sdk": "dist/cjs/bin/index.js" + "clarinet-sdk": "dist/cjs/node/src/bin/index.js" }, "engines": { "node": ">=18.0.0" } }, "node_modules/@hirosystems/clarinet-sdk-wasm": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@hirosystems/clarinet-sdk-wasm/-/clarinet-sdk-wasm-2.3.2.tgz", - "integrity": "sha512-Uz5RX06hRB05S6JPyS5j1F7HOPmmRArqR8c+61IUlOarPwYxum2MmLW7DnmsKWuC/m6wD8zbxUN22xRpHLFJWA==" + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@hirosystems/clarinet-sdk-wasm/-/clarinet-sdk-wasm-2.12.0.tgz", + "integrity": "sha512-82fuVgGZ2pt7fdHc1gTZJK1ryS2LvhWUGDyJXS16j7b5Bge9z0k/qwE2MWcZ5VBYVgbaKLvnaxH1o4Yow05QAQ==", + "license": "GPL-3.0" }, "node_modules/@jest/schemas": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "license": "MIT", "dependencies": { "@sinclair/typebox": "^0.27.8" }, @@ -399,9 +425,10 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" }, "node_modules/@noble/hashes": { "version": "1.1.5", @@ -412,7 +439,8 @@ "type": "individual", "url": "https://paulmillr.com/funding/" } - ] + ], + "license": "MIT" }, "node_modules/@noble/secp256k1": { "version": "1.7.1", @@ -423,159 +451,251 @@ "type": "individual", "url": "https://paulmillr.com/funding/" } - ] + ], + "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.6.tgz", - "integrity": "sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.30.1.tgz", + "integrity": "sha512-pSWY+EVt3rJ9fQ3IqlrEUtXh3cGqGtPDH1FQlNZehO2yYxCHEX1SPsz1M//NXwYfbTlcKr9WObLnJX9FsS9K1Q==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.6.tgz", - "integrity": "sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.30.1.tgz", + "integrity": "sha512-/NA2qXxE3D/BRjOJM8wQblmArQq1YoBVJjrjoTSBS09jgUisq7bqxNHJ8kjCHeV21W/9WDGwJEWSN0KQ2mtD/w==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.6.tgz", - "integrity": "sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.30.1.tgz", + "integrity": "sha512-r7FQIXD7gB0WJ5mokTUgUWPl0eYIH0wnxqeSAhuIwvnnpjdVB8cRRClyKLQr7lgzjctkbp5KmswWszlwYln03Q==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.6.tgz", - "integrity": "sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.30.1.tgz", + "integrity": "sha512-x78BavIwSH6sqfP2xeI1hd1GpHL8J4W2BXcVM/5KYKoAD3nNsfitQhvWSw+TFtQTLZ9OmlF+FEInEHyubut2OA==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "darwin" ] }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.30.1.tgz", + "integrity": "sha512-HYTlUAjbO1z8ywxsDFWADfTRfTIIy/oUlfIDmlHYmjUP2QRDTzBuWXc9O4CXM+bo9qfiCclmHk1x4ogBjOUpUQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.30.1.tgz", + "integrity": "sha512-1MEdGqogQLccphhX5myCJqeGNYTNcmTyaic9S7CG3JhwuIByJ7J05vGbZxsizQthP1xpVx7kd3o31eOogfEirw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.6.tgz", - "integrity": "sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.30.1.tgz", + "integrity": "sha512-PaMRNBSqCx7K3Wc9QZkFx5+CX27WFpAMxJNiYGAXfmMIKC7jstlr32UhTgK6T07OtqR+wYlWm9IxzennjnvdJg==", "cpu": [ "arm" ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.30.1.tgz", + "integrity": "sha512-B8Rcyj9AV7ZlEFqvB5BubG5iO6ANDsRKlhIxySXcF1axXYUyqwBok+XZPgIYGBgs7LDXfWfifxhw0Ik57T0Yug==", + "cpu": [ + "arm" + ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.6.tgz", - "integrity": "sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.30.1.tgz", + "integrity": "sha512-hqVyueGxAj3cBKrAI4aFHLV+h0Lv5VgWZs9CUGqr1z0fZtlADVV1YPOij6AhcK5An33EXaxnDLmJdQikcn5NEw==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.6.tgz", - "integrity": "sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.30.1.tgz", + "integrity": "sha512-i4Ab2vnvS1AE1PyOIGp2kXni69gU2DAUVt6FSXeIqUCPIR3ZlheMW3oP2JkukDfu3PsexYRbOiJrY+yVNSk9oA==", "cpu": [ "arm64" ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.30.1.tgz", + "integrity": "sha512-fARcF5g296snX0oLGkVxPmysetwUk2zmHcca+e9ObOovBR++9ZPOhqFUM61UUZ2EYpXVPN1redgqVoBB34nTpQ==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.30.1.tgz", + "integrity": "sha512-GLrZraoO3wVT4uFXh67ElpwQY0DIygxdv0BNW9Hkm3X34wu+BkqrDrkcsIapAY+N2ATEbvak0XQ9gxZtCIA5Rw==", + "cpu": [ + "ppc64" + ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.6.tgz", - "integrity": "sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.30.1.tgz", + "integrity": "sha512-0WKLaAUUHKBtll0wvOmh6yh3S0wSU9+yas923JIChfxOaaBarmb/lBKPF0w/+jTVozFnOXJeRGZ8NvOxvk/jcw==", "cpu": [ "riscv64" ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.30.1.tgz", + "integrity": "sha512-GWFs97Ruxo5Bt+cvVTQkOJ6TIx0xJDD/bMAOXWJg8TCSTEK8RnFeOeiFTxKniTc4vMIaWvCplMAFBt9miGxgkA==", + "cpu": [ + "s390x" + ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.6.tgz", - "integrity": "sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.30.1.tgz", + "integrity": "sha512-UtgGb7QGgXDIO+tqqJ5oZRGHsDLO8SlpE4MhqpY9Llpzi5rJMvrK6ZGhsRCST2abZdBqIBeXW6WPD5fGK5SDwg==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.6.tgz", - "integrity": "sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.30.1.tgz", + "integrity": "sha512-V9U8Ey2UqmQsBT+xTOeMzPzwDzyXmnAoO4edZhL7INkwQcaW1Ckv3WJX3qrrp/VHaDkEWIBWhRwP47r8cdrOow==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.6.tgz", - "integrity": "sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.30.1.tgz", + "integrity": "sha512-WabtHWiPaFF47W3PkHnjbmWawnX/aE57K47ZDT1BXTS5GgrBUEpvOzq0FI0V/UYzQJgdb8XlhVNH8/fwV8xDjw==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.6.tgz", - "integrity": "sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.30.1.tgz", + "integrity": "sha512-pxHAU+Zv39hLUTdQQHUVHf4P+0C47y/ZloorHpzs2SXMRqeAWmGghzAhfOlzFHHwjvgokdFAhC4V+6kC1lRRfw==", "cpu": [ "ia32" ], + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.6.tgz", - "integrity": "sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.30.1.tgz", + "integrity": "sha512-D6qjsXGcvhTjv0kI4fU8tUuBDF/Ueee4SVX79VfNDXZa64TfCW1Slkb6Z7O1p7vflqZjcmOVdZlqf8gvJxc6og==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -584,51 +704,57 @@ "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "license": "MIT" }, "node_modules/@stacks/common": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@stacks/common/-/common-6.10.0.tgz", - "integrity": "sha512-6x5Z7AKd9/kj3+DYE9xIDIkFLHihBH614i2wqrZIjN02WxVo063hWSjIlUxlx8P4gl6olVzlOy5LzhLJD9OP0A==", + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/@stacks/common/-/common-6.16.0.tgz", + "integrity": "sha512-PnzvhrdGRMVZvxTulitlYafSK4l02gPCBBoI9QEoTqgSnv62oaOXhYAUUkTMFKxdHW1seVEwZsrahuXiZPIAwg==", + "license": "MIT", "dependencies": { "@types/bn.js": "^5.1.0", "@types/node": "^18.0.4" } }, "node_modules/@stacks/network": { - "version": "6.11.3", - "resolved": "https://registry.npmjs.org/@stacks/network/-/network-6.11.3.tgz", - "integrity": "sha512-c4ClCU/QUwuu8NbHtDKPJNa0M5YxauLN3vYaR0+S4awbhVIKFQSxirm9Q9ckV1WBh7FtD6u2S0x+tDQGAODjNg==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@stacks/network/-/network-6.17.0.tgz", + "integrity": "sha512-numHbfKjwco/rbkGPOEz8+FcJ2nBnS/tdJ8R422Q70h3SiA9eqk9RjSzB8p4JP8yW1SZvW+eihADHfMpBuZyfw==", + "license": "MIT", "dependencies": { - "@stacks/common": "^6.10.0", + "@stacks/common": "^6.16.0", "cross-fetch": "^3.1.5" } }, "node_modules/@stacks/transactions": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@stacks/transactions/-/transactions-6.12.0.tgz", - "integrity": "sha512-gRP3SfTaAIoTdjMvOiLrMZb/senqB8JQlT5Y4C3/CiHhiprYwTx7TbOCSa7WsNOU99H4aNfHvatmymuggXQVkA==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@stacks/transactions/-/transactions-6.17.0.tgz", + "integrity": "sha512-FUah2BRgV66ApLcEXGNGhwyFTRXqX5Zco3LpiM3essw8PF0NQlHwwdPgtDko5RfrJl3LhGXXe/30nwsfNnB3+g==", + "license": "MIT", "dependencies": { "@noble/hashes": "1.1.5", "@noble/secp256k1": "1.7.1", - "@stacks/common": "^6.10.0", - "@stacks/network": "^6.11.3", + "@stacks/common": "^6.16.0", + "@stacks/network": "^6.17.0", "c32check": "^2.0.0", "lodash.clonedeep": "^4.5.0" } }, "node_modules/@types/bn.js": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", - "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", + "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", + "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "license": "MIT" }, "node_modules/@types/node": { "version": "18.19.9", @@ -639,12 +765,13 @@ } }, "node_modules/@vitest/expect": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.3.1.tgz", - "integrity": "sha512-xofQFwIzfdmLLlHa6ag0dPV8YsnKOCP1KdAeVVh34vSjN2dcUiXYCD9htu/9eM7t8Xln4v03U9HLxLpPlsXdZw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.0.tgz", + "integrity": "sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==", + "license": "MIT", "dependencies": { - "@vitest/spy": "1.3.1", - "@vitest/utils": "1.3.1", + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", "chai": "^4.3.10" }, "funding": { @@ -652,11 +779,12 @@ } }, "node_modules/@vitest/runner": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.3.1.tgz", - "integrity": "sha512-5FzF9c3jG/z5bgCnjr8j9LNq/9OxV2uEBAITOXfoe3rdZJTdO7jzThth7FXv/6b+kdY65tpRQB7WaKhNZwX+Kg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.0.tgz", + "integrity": "sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==", + "license": "MIT", "dependencies": { - "@vitest/utils": "1.3.1", + "@vitest/utils": "1.6.0", "p-limit": "^5.0.0", "pathe": "^1.1.1" }, @@ -665,9 +793,10 @@ } }, "node_modules/@vitest/snapshot": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.3.1.tgz", - "integrity": "sha512-EF++BZbt6RZmOlE3SuTPu/NfwBF6q4ABS37HHXzs2LUVPBLx2QoY/K0fKpRChSo8eLiuxcbCVfqKgx/dplCDuQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.0.tgz", + "integrity": "sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==", + "license": "MIT", "dependencies": { "magic-string": "^0.30.5", "pathe": "^1.1.1", @@ -678,9 +807,10 @@ } }, "node_modules/@vitest/spy": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.3.1.tgz", - "integrity": "sha512-xAcW+S099ylC9VLU7eZfdT9myV67Nor9w9zhf0mGCYJSO+zM2839tOeROTdikOi/8Qeusffvxb/MyBSOja1Uig==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.0.tgz", + "integrity": "sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==", + "license": "MIT", "dependencies": { "tinyspy": "^2.2.0" }, @@ -689,9 +819,10 @@ } }, "node_modules/@vitest/utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.3.1.tgz", - "integrity": "sha512-d3Waie/299qqRyHTm2DjADeTaNdNSVsnwHPWrs20JMpjh6eiVq7ggggweO8rc4arhf6rRkWuHKwvxGvejUXZZQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.0.tgz", + "integrity": "sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==", + "license": "MIT", "dependencies": { "diff-sequences": "^29.6.3", "estree-walker": "^3.0.3", @@ -733,6 +864,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "license": "MIT", "engines": { "node": ">=10" }, @@ -756,6 +888,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "license": "MIT", "engines": { "node": "*" } @@ -763,7 +896,8 @@ "node_modules/base-x": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==", + "license": "MIT" }, "node_modules/binary-extensions": { "version": "2.2.0", @@ -788,6 +922,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/c32check/-/c32check-2.0.0.tgz", "integrity": "sha512-rpwfAcS/CMqo0oCqDf3r9eeLgScRE3l/xHDCXhM3UyrfvIn7PrLq63uHh7yYbv8NzaZn5MVsVhIRpQ+5GZ5HyA==", + "license": "MIT", "dependencies": { "@noble/hashes": "^1.1.2", "base-x": "^4.0.0" @@ -800,6 +935,7 @@ "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "license": "MIT", "engines": { "node": ">=8" } @@ -813,9 +949,10 @@ } }, "node_modules/chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.3", @@ -823,7 +960,7 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" }, "engines": { "node": ">=4" @@ -833,6 +970,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "license": "MIT", "dependencies": { "get-func-name": "^2.0.2" }, @@ -1020,11 +1158,12 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/cross-fetch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", - "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.2.0.tgz", + "integrity": "sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q==", + "license": "MIT", "dependencies": { - "node-fetch": "^2.6.12" + "node-fetch": "^2.7.0" } }, "node_modules/cross-spawn": { @@ -1041,11 +1180,12 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -1065,9 +1205,10 @@ } }, "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "license": "MIT", "dependencies": { "type-detect": "^4.0.0" }, @@ -1079,6 +1220,7 @@ "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "license": "MIT", "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } @@ -1089,10 +1231,11 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/esbuild": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", - "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -1100,29 +1243,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.12", - "@esbuild/android-arm": "0.19.12", - "@esbuild/android-arm64": "0.19.12", - "@esbuild/android-x64": "0.19.12", - "@esbuild/darwin-arm64": "0.19.12", - "@esbuild/darwin-x64": "0.19.12", - "@esbuild/freebsd-arm64": "0.19.12", - "@esbuild/freebsd-x64": "0.19.12", - "@esbuild/linux-arm": "0.19.12", - "@esbuild/linux-arm64": "0.19.12", - "@esbuild/linux-ia32": "0.19.12", - "@esbuild/linux-loong64": "0.19.12", - "@esbuild/linux-mips64el": "0.19.12", - "@esbuild/linux-ppc64": "0.19.12", - "@esbuild/linux-riscv64": "0.19.12", - "@esbuild/linux-s390x": "0.19.12", - "@esbuild/linux-x64": "0.19.12", - "@esbuild/netbsd-x64": "0.19.12", - "@esbuild/openbsd-x64": "0.19.12", - "@esbuild/sunos-x64": "0.19.12", - "@esbuild/win32-arm64": "0.19.12", - "@esbuild/win32-ia32": "0.19.12", - "@esbuild/win32-x64": "0.19.12" + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" } }, "node_modules/escalade": { @@ -1137,6 +1280,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "license": "MIT", "dependencies": { "@types/estree": "^1.0.0" } @@ -1210,6 +1354,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "license": "MIT", "engines": { "node": "*" } @@ -1359,7 +1504,8 @@ "node_modules/lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "license": "MIT" }, "node_modules/lodash.debounce": { "version": "4.0.8", @@ -1375,19 +1521,18 @@ "version": "2.3.7", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "license": "MIT", "dependencies": { "get-func-name": "^2.0.1" } }, "node_modules/magic-string": { - "version": "0.30.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz", - "integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==", + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" + "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/merge-stream": { @@ -1418,20 +1563,22 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -1443,6 +1590,7 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -1509,6 +1657,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", + "license": "MIT", "dependencies": { "yocto-queue": "^1.0.0" }, @@ -1577,14 +1726,16 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "license": "MIT", "engines": { "node": "*" } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -1608,9 +1759,9 @@ } }, "node_modules/postcss": { - "version": "8.4.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", - "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.1.tgz", + "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==", "funding": [ { "type": "opencollective", @@ -1625,10 +1776,11 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -1638,6 +1790,7 @@ "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "license": "MIT", "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", @@ -1660,9 +1813,10 @@ } }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" }, "node_modules/readdirp": { "version": "3.6.0", @@ -1689,11 +1843,12 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, "node_modules/rollup": { - "version": "4.9.6", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.6.tgz", - "integrity": "sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.30.1.tgz", + "integrity": "sha512-mlJ4glW020fPuLi7DkM/lN97mYEZGWeqBnrljzN0gs7GLctqX3lNWxKQ7Gl712UAX+6fog/L3jh4gb7R6aVi3w==", + "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -1703,19 +1858,25 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.6", - "@rollup/rollup-android-arm64": "4.9.6", - "@rollup/rollup-darwin-arm64": "4.9.6", - "@rollup/rollup-darwin-x64": "4.9.6", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.6", - "@rollup/rollup-linux-arm64-gnu": "4.9.6", - "@rollup/rollup-linux-arm64-musl": "4.9.6", - "@rollup/rollup-linux-riscv64-gnu": "4.9.6", - "@rollup/rollup-linux-x64-gnu": "4.9.6", - "@rollup/rollup-linux-x64-musl": "4.9.6", - "@rollup/rollup-win32-arm64-msvc": "4.9.6", - "@rollup/rollup-win32-ia32-msvc": "4.9.6", - "@rollup/rollup-win32-x64-msvc": "4.9.6", + "@rollup/rollup-android-arm-eabi": "4.30.1", + "@rollup/rollup-android-arm64": "4.30.1", + "@rollup/rollup-darwin-arm64": "4.30.1", + "@rollup/rollup-darwin-x64": "4.30.1", + "@rollup/rollup-freebsd-arm64": "4.30.1", + "@rollup/rollup-freebsd-x64": "4.30.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.30.1", + "@rollup/rollup-linux-arm-musleabihf": "4.30.1", + "@rollup/rollup-linux-arm64-gnu": "4.30.1", + "@rollup/rollup-linux-arm64-musl": "4.30.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.30.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.30.1", + "@rollup/rollup-linux-riscv64-gnu": "4.30.1", + "@rollup/rollup-linux-s390x-gnu": "4.30.1", + "@rollup/rollup-linux-x64-gnu": "4.30.1", + "@rollup/rollup-linux-x64-musl": "4.30.1", + "@rollup/rollup-win32-arm64-msvc": "4.30.1", + "@rollup/rollup-win32-ia32-msvc": "4.30.1", + "@rollup/rollup-win32-x64-msvc": "4.30.1", "fsevents": "~2.3.2" } }, @@ -1765,9 +1926,10 @@ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -1834,9 +1996,10 @@ "integrity": "sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==" }, "node_modules/tinypool": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.2.tgz", - "integrity": "sha512-SUszKYe5wgsxnNOVlBYO6IC+8VGWdVGZWAqUxp3UErNBtptZvWbwyUOyzNL59zigz2rCA92QiL3wvG+JDSdJdQ==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz", + "integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==", + "license": "MIT", "engines": { "node": ">=14.0.0" } @@ -1845,6 +2008,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", + "license": "MIT", "engines": { "node": ">=14.0.0" } @@ -1863,20 +2027,23 @@ "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" }, "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -1896,13 +2063,14 @@ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/vite": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.4.tgz", - "integrity": "sha512-n+MPqzq+d9nMVTKyewqw6kSt+R3CkvF9QAKY8obiQn8g1fwTscKxyfaYnC632HtBXAQGc1Yjomphwn1dtwGAHg==", + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", + "license": "MIT", "dependencies": { - "esbuild": "^0.19.3", - "postcss": "^8.4.35", - "rollup": "^4.2.0" + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" }, "bin": { "vite": "bin/vite.js" @@ -1921,6 +2089,7 @@ "less": "*", "lightningcss": "^1.21.0", "sass": "*", + "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" @@ -1938,6 +2107,9 @@ "sass": { "optional": true }, + "sass-embedded": { + "optional": true + }, "stylus": { "optional": true }, @@ -1950,9 +2122,10 @@ } }, "node_modules/vite-node": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.3.1.tgz", - "integrity": "sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.6.0.tgz", + "integrity": "sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==", + "license": "MIT", "dependencies": { "cac": "^6.7.14", "debug": "^4.3.4", @@ -1971,15 +2144,16 @@ } }, "node_modules/vitest": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.3.1.tgz", - "integrity": "sha512-/1QJqXs8YbCrfv/GPQ05wAZf2eakUPLPa18vkJAKE7RXOKfVHqMZZ1WlTjiwl6Gcn65M5vpNUB6EFLnEdRdEXQ==", - "dependencies": { - "@vitest/expect": "1.3.1", - "@vitest/runner": "1.3.1", - "@vitest/snapshot": "1.3.1", - "@vitest/spy": "1.3.1", - "@vitest/utils": "1.3.1", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.0.tgz", + "integrity": "sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==", + "license": "MIT", + "dependencies": { + "@vitest/expect": "1.6.0", + "@vitest/runner": "1.6.0", + "@vitest/snapshot": "1.6.0", + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", "acorn-walk": "^8.3.2", "chai": "^4.3.10", "debug": "^4.3.4", @@ -1991,9 +2165,9 @@ "std-env": "^3.5.0", "strip-literal": "^2.0.0", "tinybench": "^2.5.1", - "tinypool": "^0.8.2", + "tinypool": "^0.8.3", "vite": "^5.0.0", - "vite-node": "1.3.1", + "vite-node": "1.6.0", "why-is-node-running": "^2.2.2" }, "bin": { @@ -2008,8 +2182,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "1.3.1", - "@vitest/ui": "1.3.1", + "@vitest/browser": "1.6.0", + "@vitest/ui": "1.6.0", "happy-dom": "*", "jsdom": "*" }, @@ -2035,23 +2209,26 @@ } }, "node_modules/vitest-environment-clarinet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/vitest-environment-clarinet/-/vitest-environment-clarinet-2.0.0.tgz", - "integrity": "sha512-NW8Z0JPV/hwB1WkvGiGED9JmXsefPUjImJRbO3BEsxdL8qxA1y2EAwuqjfmvXYDeisQSnZGbfns7DN8eDxJnpg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vitest-environment-clarinet/-/vitest-environment-clarinet-2.1.0.tgz", + "integrity": "sha512-1SA9XZh47qmbV724sGo2FyjVU+Ar3m5TOU4bLGSlWDb/x388IKUPrHbHWqIQNwY+gwEm9VBfXEAd1LOSUdemBw==", + "license": "GPL-3.0", "peerDependencies": { - "@hirosystems/clarinet-sdk": "2", - "vitest": "^1.3.1" + "@hirosystems/clarinet-sdk": ">=2.6.0", + "vitest": "^1.5.2" } }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -2171,9 +2348,10 @@ } }, "node_modules/yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", + "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", + "license": "MIT", "engines": { "node": ">=12.20" }, diff --git a/package.json b/package.json index e85e8f22..eced3e6f 100644 --- a/package.json +++ b/package.json @@ -10,12 +10,12 @@ "test:watch": "chokidar \"tests/**/*.ts\" \"contracts/**/*.clar\" -c \"npm run test:report\"" }, "dependencies": { - "@hirosystems/clarinet-sdk": "^2.3.2", - "@stacks/transactions": "^6.12.0", + "@hirosystems/clarinet-sdk": "^2.12.0", + "@stacks/transactions": "^6.17.0", "chokidar-cli": "^3.0.0", - "typescript": "^5.3.3", - "vite": "^5.1.4", - "vitest": "^1.3.1", - "vitest-environment-clarinet": "^2.0.0" + "typescript": "^5.7.3", + "vite": "^5.4.11", + "vitest": "^1.6.0", + "vitest-environment-clarinet": "^2.1.0" } } From 3a5bd72d3ef38c9e42a22497f9fb28495cc80386 Mon Sep 17 00:00:00 2001 From: Jason Schrader Date: Tue, 14 Jan 2025 14:16:25 -0700 Subject: [PATCH 10/10] fix: add stub test for missing proposal --- tests/dao/proposals/aibtc-treasury-freeze-asset.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests/dao/proposals/aibtc-treasury-freeze-asset.test.ts diff --git a/tests/dao/proposals/aibtc-treasury-freeze-asset.test.ts b/tests/dao/proposals/aibtc-treasury-freeze-asset.test.ts new file mode 100644 index 00000000..71e07733 --- /dev/null +++ b/tests/dao/proposals/aibtc-treasury-freeze-asset.test.ts @@ -0,0 +1,7 @@ +import { describe, expect, it } from "vitest"; + +describe("aibtc-treasury-freeze-asset", () => { + it("should have tests written", () => { + expect(true).toBe(true); + }); +});