From 0ead7f7eb7d5559dc1a7ea365bf971f4bbdaa22b Mon Sep 17 00:00:00 2001 From: friedger Date: Fri, 22 Mar 2024 13:28:34 +0100 Subject: [PATCH 1/9] feat: add ccip-019 --- Clarinet.toml | 5 + contracts/proposals/ccip019-nakamoto.clar | 313 ++++++++++++++++++++++ 2 files changed, 318 insertions(+) create mode 100644 contracts/proposals/ccip019-nakamoto.clar diff --git a/Clarinet.toml b/Clarinet.toml index 7f9bd00..6ce49cd 100644 --- a/Clarinet.toml +++ b/Clarinet.toml @@ -164,6 +164,11 @@ path = "contracts/proposals/ccip017-extend-sunset-period.clar" clarity_version = 2 epoch = 2.4 +[contracts.ccip019-nakamoto] +path = "contracts/proposals/ccip019-nakamoto.clar" +clarity_version = 2 +epoch = 2.4 + # CITYCOINS PROTOCOL TRAITS [contracts.extension-trait] diff --git a/contracts/proposals/ccip019-nakamoto.clar b/contracts/proposals/ccip019-nakamoto.clar new file mode 100644 index 0000000..cbb3e70 --- /dev/null +++ b/contracts/proposals/ccip019-nakamoto.clar @@ -0,0 +1,313 @@ +;; TRAITS + +(impl-trait .proposal-trait.proposal-trait) +(impl-trait .ccip015-trait.ccip015-trait) + +;; ERRORS + +(define-constant ERR_PANIC (err u1400)) +(define-constant ERR_VOTED_ALREADY (err u1401)) +(define-constant ERR_NOTHING_STACKED (err u1402)) +(define-constant ERR_USER_NOT_FOUND (err u1403)) +(define-constant ERR_PROPOSAL_NOT_ACTIVE (err u1404)) +(define-constant ERR_PROPOSAL_STILL_ACTIVE (err u1405)) +(define-constant ERR_NO_CITY_ID (err u1406)) +(define-constant ERR_VOTE_FAILED (err u1407)) + +;; CONSTANTS + +(define-constant SELF (as-contract tx-sender)) +(define-constant MISSED_PAYOUT u1) +(define-constant CCIP_019 { + name: "Upgrade for Nakamoto", + link: "", + hash: "", +}) + +(define-constant VOTE_SCALE_FACTOR (pow u10 u16)) ;; 16 decimal places +(define-constant MIA_SCALE_BASE (pow u10 u4)) ;; 4 decimal places +(define-constant MIA_SCALE_FACTOR u8760) ;; 0.8760 or 87.60% +;; MIA votes scaled to make 1 MIA = 1 NYC +;; full calculation available in CCIP-014 + +;; DATA VARS + +;; vote block heights +(define-data-var voteActive bool true) +(define-data-var voteStart uint u0) +(define-data-var voteEnd uint u0) + +(var-set voteStart block-height) + +;; vote tracking +(define-data-var yesVotes uint u0) +(define-data-var yesTotal uint u0) +(define-data-var noVotes uint u0) +(define-data-var noTotal uint u0) + +;; DATA MAPS + +(define-map UserVotes + uint ;; user ID + { ;; vote + vote: bool, + mia: uint, + nyc: uint, + total: uint, + } +) + +;; PUBLIC FUNCTIONS + +(define-public (execute (sender principal)) + (let + ( + (miaId (unwrap! (contract-call? .ccd004-city-registry get-city-id "mia") ERR_PANIC)) + (nycId (unwrap! (contract-call? .ccd004-city-registry get-city-id "nyc") ERR_PANIC)) + (miaBalance (contract-call? .ccd002-treasury-mia-mining-v2 get-balance-stx)) + (nycBalance (contract-call? .ccd002-treasury-nyc-mining-v2 get-balance-stx)) + ) + + ;; check vote complete/passed + (try! (is-executable)) + + ;; update vote variables + (var-set voteEnd block-height) + (var-set voteActive false) + + ;; enable new treasuries in the DAO + (try! (contract-call? .base-dao set-extensions + (list + {extension: .ccd002-treasury-mia-mining-v3, enabled: true} + {extension: .ccd002-treasury-nyc-mining-v3, enabled: true} + ) + )) + + ;; allow MIA/NYC in respective treasuries + ;; MAINNET: 'SP1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8Y634C7R.miamicoin-token-v2 + ;; MAINNET: 'SPSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1F4DYQ11.newyorkcitycoin-token-v2 + (try! (contract-call? .ccd002-treasury-mia-mining-v3 set-allowed 'ST1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8WRH7C6H.miamicoin-token-v2 true)) + (try! (contract-call? .ccd002-treasury-nyc-mining-v3 set-allowed 'STSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1D64KKHQ.newyorkcitycoin-token-v2 true)) + + ;; transfer funds to new treasury extensions + (try! (contract-call? .ccd002-treasury-mia-mining-v2 withdraw-stx miaBalance .ccd002-treasury-mia-mining-v3)) + (try! (contract-call? .ccd002-treasury-nyc-mining-v2 withdraw-stx nycBalance .ccd002-treasury-nyc-mining-v3)) + + ;; delegate stack the STX in the mining treasuries (up to 50M STX each) + ;; MAINNET: SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP.pox-fast-pool-v2 + ;; MAINNET: SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP.pox-fast-pool-v2 + (try! (contract-call? .ccd002-treasury-mia-mining-v3 delegate-stx u50000000000000 'ST1XQXW9JNQ1W4A7PYTN3HCHPEY7SHM6KPA085ES6)) + (try! (contract-call? .ccd002-treasury-nyc-mining-v3 delegate-stx u50000000000000 'ST1XQXW9JNQ1W4A7PYTN3HCHPEY7SHM6KPA085ES6)) + + ;; add treasuries to ccd005-city-data + (try! (contract-call? .ccd005-city-data add-treasury miaId .ccd002-treasury-mia-mining-v3 "mining-v2")) + (try! (contract-call? .ccd005-city-data add-treasury nycId .ccd002-treasury-nyc-mining-v3 "mining-v2")) + + (ok true) + ) +) + +(define-public (vote-on-proposal (vote bool)) + (let + ( + (miaId (unwrap! (contract-call? .ccd004-city-registry get-city-id "mia") ERR_NO_CITY_ID)) + (nycId (unwrap! (contract-call? .ccd004-city-registry get-city-id "nyc") ERR_NO_CITY_ID)) + (voterId (unwrap! (contract-call? .ccd003-user-registry get-user-id contract-caller) ERR_USER_NOT_FOUND)) + (voterRecord (map-get? UserVotes voterId)) + ) + ;; check that proposal is active + ;;(asserts! (and + ;; (>= block-height (var-get voteStart)) + ;; (<= block-height (var-get voteEnd))) + ;; ERR_PROPOSAL_NOT_ACTIVE) + (asserts! (var-get voteActive) ERR_PROPOSAL_NOT_ACTIVE) + ;; check if vote record exists + (match voterRecord record + ;; if the voterRecord exists + (begin + ;; check vote is not the same as before + (asserts! (not (is-eq (get vote record) vote)) ERR_VOTED_ALREADY) + ;; record the new vote for the user + (map-set UserVotes voterId + (merge record { vote: vote }) + ) + ;; update the overall vote totals + (if vote + (begin + (var-set yesVotes (+ (var-get yesVotes) u1)) + (var-set yesTotal (+ (var-get yesTotal) (get total record))) + (var-set noVotes (- (var-get noVotes) u1)) + (var-set noTotal (- (var-get noTotal) (get total record))) + ) + (begin + (var-set yesVotes (- (var-get yesVotes) u1)) + (var-set yesTotal (- (var-get yesTotal) (get total record))) + (var-set noVotes (+ (var-get noVotes) u1)) + (var-set noTotal (+ (var-get noTotal) (get total record))) + ) + ) + ) + ;; if the voterRecord does not exist + (let + ( + (scaledVoteMia (default-to u0 (get-mia-vote miaId voterId true))) + (scaledVoteNyc (default-to u0 (get-nyc-vote nycId voterId true))) + (voteMia (scale-down scaledVoteMia)) + (voteNyc (scale-down scaledVoteNyc)) + (voteTotal (+ voteMia voteNyc)) + ) + ;; record the vote for the user + (map-insert UserVotes voterId { + vote: vote, + mia: voteMia, + nyc: voteNyc, + total: voteTotal, + }) + ;; update the overall vote totals + (if vote + (begin + (var-set yesVotes (+ (var-get yesVotes) u1)) + (var-set yesTotal (+ (var-get yesTotal) voteTotal)) + ) + (begin + (var-set noVotes (+ (var-get noVotes) u1)) + (var-set noTotal (+ (var-get noTotal) voteTotal)) + ) + ) + ) + ) + ;; print voter information + (print (map-get? UserVotes voterId)) + ;; print vote totals + (print (get-vote-totals)) + (ok true) + ) +) + +;; READ ONLY FUNCTIONS + +(define-read-only (is-executable) + (begin + ;; additional checks could be added here in future proposals + ;; line below revised since vote will start at deployed height + ;; (asserts! (>= block-height (var-get voteStart)) ERR_PROPOSAL_NOT_ACTIVE) + ;; line below revised since vote will end when proposal executes + ;; (asserts! (>= block-height (var-get voteEnd)) ERR_PROPOSAL_STILL_ACTIVE) + ;; check that there is at least one vote + (asserts! (or (> (var-get yesVotes) u0) (> (var-get noVotes) u0)) ERR_VOTE_FAILED) + ;; check that yes total is more than no total + (asserts! (> (var-get yesTotal) (var-get noTotal)) ERR_VOTE_FAILED) + (ok true) + ) +) + +(define-read-only (is-vote-active) + (some (var-get voteActive)) +) + +(define-read-only (get-proposal-info) + (some CCIP_019) +) + +(define-read-only (get-vote-period) + (if (and + (> (var-get voteStart) u0) + (> (var-get voteEnd) u0)) + ;; if both are set, return values + (some { + startBlock: (var-get voteStart), + endBlock: (var-get voteEnd), + length: (- (var-get voteEnd) (var-get voteStart)) + }) + ;; else return none + none + ) +) + +(define-read-only (get-vote-totals) + (some { + yesVotes: (var-get yesVotes), + yesTotal: (var-get yesTotal), + noVotes: (var-get noVotes), + noTotal: (var-get noTotal) + }) +) + +(define-read-only (get-voter-info (id uint)) + (map-get? UserVotes id) +) + +;; MIA vote calculation +;; returns (some uint) or (none) +;; optionally scaled by VOTE_SCALE_FACTOR (10^6) +(define-read-only (get-mia-vote (cityId uint) (userId uint) (scaled bool)) + (let + ( + ;; MAINNET: MIA cycle 54 / first block BTC 779,450 STX 97,453 + ;; cycle 2 / u4500 used in tests + (cycle54Hash (unwrap! (get-block-hash u4500) none)) + (cycle54Data (at-block cycle54Hash (contract-call? .ccd007-citycoin-stacking get-stacker cityId u2 userId))) + (cycle54Amount (get stacked cycle54Data)) + ;; MAINNET: MIA cycle 55 / first block BTC 781,550 STX 99,112 + ;; cycle 3 / u6600 used in tests + (cycle55Hash (unwrap! (get-block-hash u6600) none)) + (cycle55Data (at-block cycle55Hash (contract-call? .ccd007-citycoin-stacking get-stacker cityId u3 userId))) + (cycle55Amount (get stacked cycle55Data)) + ;; MIA vote calculation + (avgStacked (/ (+ (scale-up cycle54Amount) (scale-up cycle55Amount)) u2)) + (scaledVote (/ (* avgStacked MIA_SCALE_FACTOR) MIA_SCALE_BASE)) + ) + ;; check that at least one value is positive + (asserts! (or (> cycle54Amount u0) (> cycle55Amount u0)) none) + ;; return scaled or unscaled value + (if scaled (some scaledVote) (some (/ scaledVote VOTE_SCALE_FACTOR))) + ) +) + +;; NYC vote calculation +;; returns (some uint) or (none) +;; optionally scaled by VOTE_SCALE_FACTOR (10^6) +(define-read-only (get-nyc-vote (cityId uint) (userId uint) (scaled bool)) + (let + ( + ;; NYC cycle 54 / first block BTC 779,450 STX 97,453 + ;; cycle 2 / u4500 used in tests + (cycle54Hash (unwrap! (get-block-hash u4500) none)) + (cycle54Data (at-block cycle54Hash (contract-call? .ccd007-citycoin-stacking get-stacker cityId u2 userId))) + (cycle54Amount (get stacked cycle54Data)) + ;; NYC cycle 55 / first block BTC 781,550 STX 99,112 + ;; cycle 3 / u6600 used in tests + (cycle55Hash (unwrap! (get-block-hash u6600) none)) + (cycle55Data (at-block cycle55Hash (contract-call? .ccd007-citycoin-stacking get-stacker cityId u3 userId))) + (cycle55Amount (get stacked cycle55Data)) + ;; NYC vote calculation + (scaledVote (/ (+ (scale-up cycle54Amount) (scale-up cycle55Amount)) u2)) + ) + ;; check that at least one value is positive + (asserts! (or (> cycle54Amount u0) (> cycle55Amount u0)) none) + ;; return scaled or unscaled value + (if scaled (some scaledVote) (some (/ scaledVote VOTE_SCALE_FACTOR))) + ) +) + +;; PRIVATE FUNCTIONS + +;; get block hash by height +(define-private (get-block-hash (blockHeight uint)) + (get-block-info? id-header-hash blockHeight) +) + +;; CREDIT: ALEX math-fixed-point-16.clar + +(define-private (scale-up (a uint)) + (* a VOTE_SCALE_FACTOR) +) + +(define-private (scale-down (a uint)) + (/ a VOTE_SCALE_FACTOR) +) + +;; INITIALIZATION + +;; fund proposal with 8 uSTX for payouts from deployer +(stx-transfer? (* MISSED_PAYOUT u8) tx-sender (as-contract tx-sender)) From 71265babe3426935526438766c1a5101c725f4cc Mon Sep 17 00:00:00 2001 From: friedger Date: Sat, 4 May 2024 16:48:05 +0200 Subject: [PATCH 2/9] chore: remove unused code --- contracts/extensions/ccd002-treasury-v3.clar | 2 +- .../proposals/ccip019-pox-4-stacking.clar | 20 ++----------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/contracts/extensions/ccd002-treasury-v3.clar b/contracts/extensions/ccd002-treasury-v3.clar index 0748342..a5802bd 100644 --- a/contracts/extensions/ccd002-treasury-v3.clar +++ b/contracts/extensions/ccd002-treasury-v3.clar @@ -177,7 +177,7 @@ ;; MAINNET: 'SP000000000000000000002Q6VF78.pox-4 ;; TESTNET: 'ST000000000000000000002AMW42H.pox-4 (match (as-contract (contract-call? 'ST000000000000000000002AMW42H.pox-4 revoke-delegate-stx)) - success (ok success) + success (begin (print success) (ok true)) err (err (to-uint err)) ) ) diff --git a/contracts/proposals/ccip019-pox-4-stacking.clar b/contracts/proposals/ccip019-pox-4-stacking.clar index 7141d8a..23ce399 100644 --- a/contracts/proposals/ccip019-pox-4-stacking.clar +++ b/contracts/proposals/ccip019-pox-4-stacking.clar @@ -5,13 +5,6 @@ ;; ERRORS (define-constant ERR_PANIC (err u1400)) -(define-constant ERR_VOTED_ALREADY (err u1401)) -(define-constant ERR_NOTHING_STACKED (err u1402)) -(define-constant ERR_USER_NOT_FOUND (err u1403)) -(define-constant ERR_PROPOSAL_NOT_ACTIVE (err u1404)) -(define-constant ERR_PROPOSAL_STILL_ACTIVE (err u1405)) -(define-constant ERR_NO_CITY_ID (err u1406)) -(define-constant ERR_VOTE_FAILED (err u1407)) ;; CONSTANTS @@ -34,9 +27,6 @@ (nycBalance (contract-call? .ccd002-treasury-nyc-mining-v2 get-balance-stx)) ) - ;; check vote complete/passed - (try! (is-executable)) - ;; enable new treasuries in the DAO (try! (contract-call? .base-dao set-extensions (list @@ -56,8 +46,8 @@ (try! (contract-call? .ccd002-treasury-nyc-mining-v2 withdraw-stx nycBalance .ccd002-treasury-nyc-mining-v3)) ;; delegate stack the STX in the mining treasuries (up to 50M STX each) - ;; MAINNET: SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP.pox-fast-pool-v2 - ;; MAINNET: SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP.pox-fast-pool-v2 + ;; MAINNET: SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP.pox4-fast-pool-v3 + ;; MAINNET: SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP.pox4-fast-pool-v3 (try! (contract-call? .ccd002-treasury-mia-mining-v3 delegate-stx u50000000000000 'ST1XQXW9JNQ1W4A7PYTN3HCHPEY7SHM6KPA085ES6)) (try! (contract-call? .ccd002-treasury-nyc-mining-v3 delegate-stx u50000000000000 'ST1XQXW9JNQ1W4A7PYTN3HCHPEY7SHM6KPA085ES6)) @@ -71,12 +61,6 @@ ;; READ ONLY FUNCTIONS -(define-read-only (is-executable) - (begin - (ok true) - ) -) - (define-read-only (get-proposal-info) (some CCIP_019) ) \ No newline at end of file From 0127f6912ab0c6d3619724d8568cf470cd312b1e Mon Sep 17 00:00:00 2001 From: friedger Date: Sat, 4 May 2024 17:14:01 +0200 Subject: [PATCH 3/9] feat: add rewards-treasury --- Clarinet.toml | 15 ++++++++ .../extensions/ccip019-rewards-treasury.clar | 35 +++++++++++++++++++ .../proposals/ccip019-pox-4-stacking.clar | 1 + contracts/traits/ccip019-proxy-trait.clar | 3 ++ 4 files changed, 54 insertions(+) create mode 100644 contracts/extensions/ccip019-rewards-treasury.clar create mode 100644 contracts/traits/ccip019-proxy-trait.clar diff --git a/Clarinet.toml b/Clarinet.toml index 2404074..492f85a 100644 --- a/Clarinet.toml +++ b/Clarinet.toml @@ -94,6 +94,8 @@ path = "contracts/extensions/ccd002-treasury-v2.clar" [contracts.ccd002-treasury-mia-mining-v3] path = "contracts/extensions/ccd002-treasury-v3.clar" +clarity_version = 2 +epoch = 2.5 [contracts.ccd002-treasury-mia-stacking] path = "contracts/extensions/ccd002-treasury.clar" @@ -106,6 +108,8 @@ path = "contracts/extensions/ccd002-treasury-v2.clar" [contracts.ccd002-treasury-nyc-mining-v3] path = "contracts/extensions/ccd002-treasury-v3.clar" +clarity_version = 2 +epoch = 2.5 [contracts.ccd002-treasury-nyc-stacking] path = "contracts/extensions/ccd002-treasury.clar" @@ -140,6 +144,11 @@ path = "contracts/extensions/ccd010-core-v2-adapter.clar" [contracts.ccd011-stacking-payouts] path = "contracts/extensions/ccd011-stacking-payouts.clar" +[contracts.ccip019-rewards-treasury] +path = "contracts/extensions/ccip019-rewards-treasury.clar" +clarity_version = 2 +epoch = 2.5 + [contracts.ccip012-bootstrap] path = "contracts/proposals/ccip012-bootstrap.clar" @@ -202,6 +211,12 @@ path = "contracts/traits/ccd007-trait.clar" [contracts.ccip015-trait] path = "contracts/traits/ccip015-trait.clar" +[contracts.ccip019-proxy-trait] +path = "contracts/traits/ccip019-proxy-trait.clar" +clarity_version = 2 +epoch = 2.5 + + # CITYCOINS EXTERNAL CONTRACTS [contracts.citycoin-vrf-v2] diff --git a/contracts/extensions/ccip019-rewards-treasury.clar b/contracts/extensions/ccip019-rewards-treasury.clar new file mode 100644 index 0000000..8465b4b --- /dev/null +++ b/contracts/extensions/ccip019-rewards-treasury.clar @@ -0,0 +1,35 @@ + +(use-trait proxy-trait .ccip019-proxy-trait.proxy-trait) +(use-trait sip-010-trait 'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.sip-010-trait) + +(define-constant ERR_UNAUTHORIZED (err u10000)) + +(define-public (is-dao-or-extension) + (ok (asserts! (or (is-eq tx-sender .base-dao) + (contract-call? .base-dao is-extension contract-caller)) ERR_UNAUTHORIZED + )) +) + +(define-public (stx-transfer (amount uint) (recipient principal) (memo (optional (buff 34)))) + (begin + (try! (is-dao-or-extension)) + (as-contract (match memo + to-print (stx-transfer-memo? amount tx-sender recipient to-print) + (stx-transfer? amount tx-sender recipient) + )) + ) +) + +(define-public (sip010-transfer (amount uint) (recipient principal) (memo (optional (buff 34))) (sip010 )) + (begin + (try! (is-dao-or-extension)) + (contract-call? sip010 transfer amount (as-contract tx-sender) recipient memo) + ) +) + +(define-public (proxy-call (proxy ) (payload (buff 2048))) + (begin + (try! (is-dao-or-extension)) + (as-contract (contract-call? proxy proxy-call payload)) + ) +) diff --git a/contracts/proposals/ccip019-pox-4-stacking.clar b/contracts/proposals/ccip019-pox-4-stacking.clar index 23ce399..3f86570 100644 --- a/contracts/proposals/ccip019-pox-4-stacking.clar +++ b/contracts/proposals/ccip019-pox-4-stacking.clar @@ -32,6 +32,7 @@ (list {extension: .ccd002-treasury-mia-mining-v3, enabled: true} {extension: .ccd002-treasury-nyc-mining-v3, enabled: true} + {extension: .ccd012-rewards-treasury, enabled: true} ) )) diff --git a/contracts/traits/ccip019-proxy-trait.clar b/contracts/traits/ccip019-proxy-trait.clar new file mode 100644 index 0000000..7618835 --- /dev/null +++ b/contracts/traits/ccip019-proxy-trait.clar @@ -0,0 +1,3 @@ +(define-trait proxy-trait + ((proxy-call ((buff 2048)) (response bool uint))) +) From f6df20b34a9c432b01a407cd1e0b5918cb560dfd Mon Sep 17 00:00:00 2001 From: friedger Date: Sat, 4 May 2024 17:21:59 +0200 Subject: [PATCH 4/9] chore: upgrade to support 2.5 --- .github/workflows/test-contracts.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/test-contracts.yaml b/.github/workflows/test-contracts.yaml index 884badd..c92c176 100644 --- a/.github/workflows/test-contracts.yaml +++ b/.github/workflows/test-contracts.yaml @@ -25,15 +25,6 @@ jobs: - name: "Checkout code" uses: actions/checkout@v4 - name: "Check contract syntax" - uses: docker://hirosystems/clarinet:1.8.0 + uses: docker://hirosystems/clarinet:2.6.0 with: args: check - - name: "Run all contract tests" - uses: docker://hirosystems/clarinet:1.8.0 - with: - args: test --coverage - - name: "Upload code coverage" - uses: codecov/codecov-action@v4 - with: - files: ./coverage.lcov - token: ${{ secrets.CODECOV_TOKEN }} From 3372bc41792382ad9e4079365c0a4e8ffdd3db22 Mon Sep 17 00:00:00 2001 From: friedger Date: Tue, 16 Jul 2024 00:08:35 +0200 Subject: [PATCH 5/9] feat: add voting --- .../proposals/ccip019-pox-4-stacking.clar | 241 +++++++++++++++++- contracts/traits/ccip019-proxy-trait.clar | 3 - 2 files changed, 237 insertions(+), 7 deletions(-) delete mode 100644 contracts/traits/ccip019-proxy-trait.clar diff --git a/contracts/proposals/ccip019-pox-4-stacking.clar b/contracts/proposals/ccip019-pox-4-stacking.clar index fe3177a..44318d5 100644 --- a/contracts/proposals/ccip019-pox-4-stacking.clar +++ b/contracts/proposals/ccip019-pox-4-stacking.clar @@ -4,17 +4,56 @@ ;; ERRORS -(define-constant ERR_PANIC (err u1400)) - +(define-constant ERR_PANIC (err u19000)) +(define-constant ERR_SAVING_VOTE (err u19001)) +(define-constant ERR_VOTED_ALREADY (err u19002)) +(define-constant ERR_NOTHING_STACKED (err u19003)) +(define-constant ERR_USER_NOT_FOUND (err u19004)) +(define-constant ERR_PROPOSAL_NOT_ACTIVE (err u19005)) +(define-constant ERR_PROPOSAL_STILL_ACTIVE (err u19006)) +(define-constant ERR_VOTE_FAILED (err u19007)) ;; CONSTANTS (define-constant SELF (as-contract tx-sender)) (define-constant CCIP_019 { name: "PoX-4 Stacking", - link: "", + link: "https://github.com/citycoins/protocol/pull/67", hash: "", }) +(define-constant VOTE_SCALE_FACTOR (pow u10 u16)) ;; 16 decimal places + +(define-constant MIA_ID (default-to u2 (contract-call? .ccd004-city-registry get-city-id "mia"))) + +;; DATA VARS + +;; vote block heights +(define-data-var voteActive bool true) +(define-data-var voteStart uint u0) +(define-data-var voteEnd uint u0) + +;; start the vote when deployed +(var-set voteStart block-height) + +;; DATA MAPS + +(define-map CityVotes + uint ;; city ID + { ;; vote + totalAmountYes: uint, + totalAmountNo: uint, + totalVotesYes: uint, + totalVotesNo: uint, + } +) + +(define-map UserVotes + uint ;; user ID + { ;; vote + vote: bool, + mia: uint, + } +) ;; PUBLIC FUNCTIONS @@ -25,6 +64,11 @@ (miaBalance (contract-call? .ccd002-treasury-mia-mining-v2 get-balance-stx)) ) + (try! (is-executable)) + ;; update vote variables + (var-set voteEnd block-height) + (var-set voteActive false) + ;; enable new treasuries in the DAO (try! (contract-call? .base-dao set-extensions (list @@ -52,8 +96,197 @@ ) ) + +(define-public (vote-on-proposal (vote bool)) + (let + ( + (voterId (unwrap! (contract-call? .ccd003-user-registry get-user-id contract-caller) ERR_USER_NOT_FOUND)) + (voterRecord (map-get? UserVotes voterId)) + ) + ;; check if vote is active + (asserts! (var-get voteActive) ERR_PROPOSAL_NOT_ACTIVE) + ;; check if vote record exists for user + (match voterRecord record + ;; if the voterRecord exists + (let + ( + (oldVote (get vote record)) + (miaVoteAmount (get mia record)) + ) + ;; check vote is not the same as before + (asserts! (not (is-eq oldVote vote)) ERR_VOTED_ALREADY) + ;; record the new vote for the user + (map-set UserVotes voterId + (merge record { vote: vote }) + ) + ;; update vote stats for each city + (update-city-votes MIA_ID miaVoteAmount vote true) + (ok true) + ) + ;; if the voterRecord does not exist + (let + ( + (miaVoteAmount (scale-down (default-to u0 (get-mia-vote voterId true)))) + ) + ;; check that the user has a positive vote + (asserts! (or (> miaVoteAmount u0)) ERR_NOTHING_STACKED) + ;; insert new user vote record + (asserts! (map-insert UserVotes voterId { + vote: vote, + mia: miaVoteAmount + }) ERR_SAVING_VOTE) + ;; update vote stats for each city + (update-city-votes MIA_ID miaVoteAmount vote false) + (ok true) + ) + ) + ) +) + ;; READ ONLY FUNCTIONS (define-read-only (get-proposal-info) (some CCIP_019) -) \ No newline at end of file +) + + +(define-read-only (is-executable) + (let + ( + (votingRecord (unwrap! (get-vote-totals) ERR_PANIC)) + (miaRecord (get mia votingRecord)) + (voteTotals (get totals votingRecord)) + ) + ;; check that there is at least one vote + (asserts! (or (> (get totalVotesYes voteTotals) u0) (> (get totalVotesNo voteTotals) u0)) ERR_VOTE_FAILED) + ;; check that the yes total is more than no total + (asserts! (> (get totalVotesYes voteTotals) (get totalVotesNo voteTotals)) ERR_VOTE_FAILED) + ;; check the "yes" votes are at least 25% of the total + (asserts! (>= (get totalAmountYes miaRecord) (/ (get totalAmountYes voteTotals) u4)) ERR_VOTE_FAILED) + ;; allow execution + (ok true) + ) +) + +(define-read-only (is-vote-active) + (some (var-get voteActive)) +) + +(define-read-only (get-vote-period) + (if (and + (> (var-get voteStart) u0) + (> (var-get voteEnd) u0)) + ;; if both are set, return values + (some { + startBlock: (var-get voteStart), + endBlock: (var-get voteEnd), + length: (- (var-get voteEnd) (var-get voteStart)) + }) + ;; else return none + none + ) +) + +(define-read-only (get-vote-total-mia) + (map-get? CityVotes MIA_ID) +) + +(define-read-only (get-vote-total-mia-or-default) + (default-to { totalAmountYes: u0, totalAmountNo: u0, totalVotesYes: u0, totalVotesNo: u0 } (get-vote-total-mia)) +) + +(define-read-only (get-vote-totals) + (let + ( + (miaRecord (get-vote-total-mia-or-default)) + ) + (some { + mia: miaRecord, + totals: { + totalAmountYes: (get totalAmountYes miaRecord), + totalAmountNo: (get totalAmountNo miaRecord), + totalVotesYes: (get totalVotesYes miaRecord), + totalVotesNo: (get totalVotesNo miaRecord), + } + }) + ) +) + +(define-read-only (get-voter-info (id uint)) + (map-get? UserVotes id) +) + +;; mia vote calculation +;; returns (some uint) or (none) +;; optionally scaled by VOTE_SCALE_FACTOR (10^6) +(define-read-only (get-mia-vote (userId uint) (scaled bool)) + (let + ( + ;; MAINNET: mia cycle 82 / first block BTC 838,250 STX 145,643 + ;; cycle 2 / u4500 used in tests + (cycle82Hash (unwrap! (get-block-hash u4500) none)) + (cycle82Data (at-block cycle82Hash (contract-call? .ccd007-citycoin-stacking get-stacker MIA_ID u2 userId))) + (cycle82Amount (get stacked cycle82Data)) + ;; MAINNET: mia cycle 83 / first block BTC 840,350 STX 147,282 + ;; cycle 3 / u6600 used in tests + (cycle83Hash (unwrap! (get-block-hash u6600) none)) + (cycle83Data (at-block cycle83Hash (contract-call? .ccd007-citycoin-stacking get-stacker MIA_ID u3 userId))) + (cycle83Amount (get stacked cycle83Data)) + ;; mia vote calculation + (scaledVote (/ (+ (scale-up cycle82Amount) (scale-up cycle83Amount)) u2)) + ) + ;; check that at least one value is positive + (asserts! (or (> cycle82Amount u0) (> cycle83Amount u0)) none) + ;; return scaled or unscaled value + (if scaled (some scaledVote) (some (/ scaledVote VOTE_SCALE_FACTOR))) + ) +) + +;; PRIVATE FUNCTIONS + +;; update city vote map +(define-private (update-city-votes (cityId uint) (voteAmount uint) (vote bool) (changedVote bool)) + (let + ( + (cityRecord (default-to + { totalAmountYes: u0, totalAmountNo: u0, totalVotesYes: u0, totalVotesNo: u0 } + (map-get? CityVotes cityId))) + ) + ;; do not record if amount is 0 + (if (> voteAmount u0) + ;; handle vote + (if vote + ;; handle yes vote + (map-set CityVotes cityId { + totalAmountYes: (+ voteAmount (get totalAmountYes cityRecord)), + totalVotesYes: (+ u1 (get totalVotesYes cityRecord)), + totalAmountNo: (if changedVote (- (get totalAmountNo cityRecord) voteAmount) (get totalAmountNo cityRecord)), + totalVotesNo: (if changedVote (- (get totalVotesNo cityRecord) u1) (get totalVotesNo cityRecord)) + }) + ;; handle no vote + (map-set CityVotes cityId { + totalAmountYes: (if changedVote (- (get totalAmountYes cityRecord) voteAmount) (get totalAmountYes cityRecord)), + totalVotesYes: (if changedVote (- (get totalVotesYes cityRecord) u1) (get totalVotesYes cityRecord)), + totalAmountNo: (+ voteAmount (get totalAmountNo cityRecord)), + totalVotesNo: (+ u1 (get totalVotesNo cityRecord)), + }) + ) + ;; ignore calls with vote amount equal to 0 + false) + ) +) + +;; get block hash by height +(define-private (get-block-hash (blockHeight uint)) + (get-block-info? id-header-hash blockHeight) +) + +;; CREDIT: ALEX math-fixed-point-16.clar + +(define-private (scale-up (a uint)) + (* a VOTE_SCALE_FACTOR) +) + +(define-private (scale-down (a uint)) + (/ a VOTE_SCALE_FACTOR) +) diff --git a/contracts/traits/ccip019-proxy-trait.clar b/contracts/traits/ccip019-proxy-trait.clar deleted file mode 100644 index 7618835..0000000 --- a/contracts/traits/ccip019-proxy-trait.clar +++ /dev/null @@ -1,3 +0,0 @@ -(define-trait proxy-trait - ((proxy-call ((buff 2048)) (response bool uint))) -) From 8d5e7d292223e8691b8fc4b6022359126a2c6b2b Mon Sep 17 00:00:00 2001 From: friedger Date: Tue, 16 Jul 2024 00:22:07 +0200 Subject: [PATCH 6/9] fix: use new clarinet toml for epoch 2.5+ --- .github/workflows/clarinet.yaml | 2 +- Clarinet-2.5.toml | 584 ++++++++++++++++++++++++++++++++ Clarinet.toml | 13 - 3 files changed, 585 insertions(+), 14 deletions(-) create mode 100644 Clarinet-2.5.toml diff --git a/.github/workflows/clarinet.yaml b/.github/workflows/clarinet.yaml index e761252..f33dc90 100644 --- a/.github/workflows/clarinet.yaml +++ b/.github/workflows/clarinet.yaml @@ -25,4 +25,4 @@ jobs: - name: "Check contract syntax" uses: docker://hirosystems/clarinet:2.6.0 with: - args: check + args: check -m Clarinet-2.5.toml diff --git a/Clarinet-2.5.toml b/Clarinet-2.5.toml new file mode 100644 index 0000000..c08b494 --- /dev/null +++ b/Clarinet-2.5.toml @@ -0,0 +1,584 @@ +[project] +name = "citycoins-protocol" +authors = [] +description = "" +telemetry = false +boot_contracts = ["pox", "costs-v2", "bns"] + +[project.cache_location] +path = ".requirements" + +# MAINNET REQUIREMENTS + +[[project.requirements]] +contract_id = "SP000000000000000000002Q6VF78.pox" + +[[project.requirements]] +contract_id = "SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard" + +[[project.requirements]] +contract_id = "SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait" + +[[project.requirements]] +contract_id = "SPSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1F4DYQ11.citycoin-core-v2-trait" + +[[project.requirements]] +contract_id = "SPSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1F4DYQ11.citycoin-vrf-v2" + +[[project.requirements]] +contract_id = "SP1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8Y634C7R.miamicoin-auth-v2" + +[[project.requirements]] +contract_id = "SP1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8Y634C7R.miamicoin-core-v2" + +[[project.requirements]] +contract_id = "SP1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8Y634C7R.miamicoin-token-v2" + +[[project.requirements]] +contract_id = "SPSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1F4DYQ11.newyorkcitycoin-auth-v2" + +[[project.requirements]] +contract_id = "SPSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1F4DYQ11.newyorkcitycoin-core-v2" + +[[project.requirements]] +contract_id = "SPSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1F4DYQ11.newyorkcitycoin-token-v2" + +# TESTNET REQUIREMENTS + +[[project.requirements]] +contract_id = "ST000000000000000000002AMW42H.pox" + +[[project.requirements]] +contract_id = "ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.sip-010-trait-ft-standard" + +[[project.requirements]] +contract_id = "ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.nft-trait" + +[[project.requirements]] +contract_id = "ST1XQXW9JNQ1W4A7PYTN3HCHPEY7SHM6KPA085ES6.citycoin-core-v2-trait" + +[[project.requirements]] +contract_id = "ST1XQXW9JNQ1W4A7PYTN3HCHPEY7SHM6KPA085ES6.citycoin-vrf-v2" + +[[project.requirements]] +contract_id = "ST1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8WRH7C6H.miamicoin-auth-v2" + +[[project.requirements]] +contract_id = "ST1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8WRH7C6H.miamicoin-core-v2" + +[[project.requirements]] +contract_id = "ST1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8WRH7C6H.miamicoin-token-v2" + +[[project.requirements]] +contract_id = "STSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1D64KKHQ.newyorkcitycoin-auth-v2" + +[[project.requirements]] +contract_id = "STSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1D64KKHQ.newyorkcitycoin-core-v2" + +[[project.requirements]] +contract_id = "STSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1D64KKHQ.newyorkcitycoin-token-v2" + +# CITYCOINS PROTOCOL CONTRACTS + +[contracts.base-dao] +path = "contracts/base-dao.clar" + +[contracts.ccd001-direct-execute] +path = "contracts/extensions/ccd001-direct-execute.clar" + +[contracts.ccd002-treasury-mia-mining] +path = "contracts/extensions/ccd002-treasury.clar" + +[contracts.ccd002-treasury-mia-mining-v2] +path = "contracts/extensions/ccd002-treasury-v2.clar" + +[contracts.ccd002-treasury-mia-mining-v3] +path = "contracts/extensions/ccd002-treasury-v3.clar" +clarity_version = 2 +epoch = 2.5 + +[contracts.ccd002-treasury-mia-stx-rewards-v3] +path = "contracts/extensions/ccd002-treasury-v3.clar" +clarity_version = 2 +epoch = 2.5 + +[contracts.ccd002-treasury-mia-stacking] +path = "contracts/extensions/ccd002-treasury.clar" + +[contracts.ccd002-treasury-nyc-mining] +path = "contracts/extensions/ccd002-treasury.clar" + +[contracts.ccd002-treasury-nyc-mining-v2] +path = "contracts/extensions/ccd002-treasury-v2.clar" + +[contracts.ccd002-treasury-nyc-stacking] +path = "contracts/extensions/ccd002-treasury.clar" + +[contracts.ccd003-user-registry] +path = "contracts/extensions/ccd003-user-registry.clar" + +[contracts.ccd004-city-registry] +path = "contracts/extensions/ccd004-city-registry.clar" + +[contracts.ccd005-city-data] +path = "contracts/extensions/ccd005-city-data.clar" + +[contracts.ccd006-citycoin-mining] +path = "contracts/extensions/ccd006-citycoin-mining.clar" + +[contracts.ccd006-citycoin-mining-v2] +path = "contracts/extensions/ccd006-citycoin-mining-v2.clar" + +[contracts.ccd007-citycoin-stacking] +path = "contracts/extensions/ccd007-citycoin-stacking.clar" + +[contracts.ccd008-city-activation] +path = "contracts/extensions/ccd008-city-activation.clar" + +[contracts.ccd009-auth-v2-adapter] +path = "contracts/extensions/ccd009-auth-v2-adapter.clar" + +[contracts.ccd010-core-v2-adapter] +path = "contracts/extensions/ccd010-core-v2-adapter.clar" + +[contracts.ccd011-stacking-payouts] +path = "contracts/extensions/ccd011-stacking-payouts.clar" + +[contracts.ccd012-redemption-nyc] +path = "contracts/extensions/ccd012-redemption-nyc.clar" +clarity_version = 2 +epoch = 2.4 + +[contracts.ccip012-bootstrap] +path = "contracts/proposals/ccip012-bootstrap.clar" + +[contracts.ccip013-migration] +path = "contracts/proposals/ccip013-migration.clar" + +[contracts.ccip013-activation] +path = "contracts/proposals/ccip013-activation.clar" + +[contracts.ccip014-pox-3] +path = "contracts/proposals/ccip014-pox-3.clar" +clarity_version = 2 +epoch = 2.4 + +[contracts.ccip014-pox-3-v2] +path = "contracts/proposals/ccip014-pox-3-v2.clar" +clarity_version = 2 +epoch = 2.4 + +[contracts.ccip017-extend-sunset-period] +path = "contracts/proposals/ccip017-extend-sunset-period.clar" +clarity_version = 2 +epoch = 2.4 + +[contracts.ccip020-graceful-protocol-shutdown] +path = "contracts/proposals/ccip020-graceful-protocol-shutdown.clar" +clarity_version = 2 +epoch = 2.4 + +[contracts.ccip021-extend-sunset-period-2] +path = "contracts/proposals/ccip021-extend-sunset-period-2.clar" +clarity_version = 2 +epoch = 2.4 + +[contracts.ccip022-treasury-redemption-nyc] +path = "contracts/proposals/ccip022-treasury-redemption-nyc.clar" +clarity_version = 2 +epoch = 2.4 + +[contracts.ccip019-pox-4-stacking] +path = "contracts/proposals/ccip019-pox-4-stacking.clar" +clarity_version = 2 +epoch = 2.5 +# CITYCOINS PROTOCOL TRAITS + +[contracts.extension-trait] +path = "contracts/traits/extension-trait.clar" + +[contracts.proposal-trait] +path = "contracts/traits/proposal-trait.clar" + +[contracts.stacking-trait] +path = "contracts/traits/stacking-trait.clar" + +[contracts.ccd002-trait] +path = "contracts/traits/ccd002-trait.clar" + +[contracts.ccd006-trait] +path = "contracts/traits/ccd006-trait.clar" + +[contracts.ccd007-trait] +path = "contracts/traits/ccd007-trait.clar" + +[contracts.ccip015-trait] +path = "contracts/traits/ccip015-trait.clar" + +# CITYCOINS EXTERNAL CONTRACTS + +[contracts.citycoin-vrf-v2] +path = "tests/contracts/external/citycoin-vrf-v2.clar" + +[contracts.test-ccext-governance-token-mia] +path = "tests/contracts/external/test-ccext-governance-token-mia.clar" + +[contracts.test-ccext-governance-token-nyc] +path = "tests/contracts/external/test-ccext-governance-token-nyc.clar" + +[contracts.test-ccext-governance-token-nyc-v1] +path = "tests/contracts/external/test-ccext-governance-token-nyc-v1.clar" + +[contracts.test-ccext-nft-mia] +path = "tests/contracts/external/test-ccext-nft-mia.clar" + +[contracts.test-ccext-nft-nyc] +path = "tests/contracts/external/test-ccext-nft-nyc.clar" + +[contracts.mock-pox-3] +path = "tests/contracts/external/mock-pox-3.clar" +clarity_version = 2 +epoch = 2.4 + +# CITYCOINS LEGACY CONTRACTS + +[contracts.citycoin-vrf] +path = "contracts/legacy/citycoin-vrf.clar" + +[contracts.citycoin-core-trait] +path = "contracts/legacy/citycoin-core-trait.clar" + +[contracts.citycoin-core-v2-trait] +path = "contracts/legacy/citycoin-core-v2-trait.clar" + +[contracts.citycoin-token-trait] +path = "contracts/legacy/citycoin-token-trait.clar" + +[contracts.citycoin-token-v2-trait] +path = "contracts/legacy/citycoin-token-v2-trait.clar" + +[contracts.miamicoin-auth] +path = "contracts/legacy/miamicoin-auth.clar" + +[contracts.miamicoin-core-v1] +path = "contracts/legacy/miamicoin-core-v1.clar" + +[contracts.miamicoin-token] +path = "contracts/legacy/miamicoin-token.clar" + +[contracts.miamicoin-core-v1-patch] +path = "contracts/legacy/miamicoin-core-v1-patch.clar" + +[contracts.miamicoin-auth-v2] +path = "contracts/legacy/miamicoin-auth-v2.clar" + +[contracts.miamicoin-core-v2] +path = "contracts/legacy/miamicoin-core-v2.clar" + +[contracts.miamicoin-token-v2] +path = "contracts/legacy/miamicoin-token-v2.clar" + +[contracts.newyorkcitycoin-auth] +path = "contracts/legacy/newyorkcitycoin-auth.clar" + +[contracts.newyorkcitycoin-core-v1] +path = "contracts/legacy/newyorkcitycoin-core-v1.clar" + +[contracts.newyorkcitycoin-token] +path = "contracts/legacy/newyorkcitycoin-token.clar" + +[contracts.newyorkcitycoin-core-v1-patch] +path = "contracts/legacy/newyorkcitycoin-core-v1-patch.clar" + +[contracts.newyorkcitycoin-auth-v2] +path = "contracts/legacy/newyorkcitycoin-auth-v2.clar" + +[contracts.newyorkcitycoin-core-v2] +path = "contracts/legacy/newyorkcitycoin-core-v2.clar" + +[contracts.newyorkcitycoin-token-v2] +path = "contracts/legacy/newyorkcitycoin-token-v2.clar" + +# CITYCOINS TEST PROPOSALS + +[contracts.test-ccd001-direct-execute-001] +path = "tests/contracts/proposals/test-ccd001-direct-execute-001.clar" + +[contracts.test-ccd001-direct-execute-002] +path = "tests/contracts/proposals/test-ccd001-direct-execute-002.clar" + +[contracts.test-ccd001-direct-execute-003] +path = "tests/contracts/proposals/test-ccd001-direct-execute-003.clar" + +[contracts.test-ccd002-treasury-001] +path = "tests/contracts/proposals/test-ccd002-treasury-001.clar" + +[contracts.test-ccd002-treasury-002] +path = "tests/contracts/proposals/test-ccd002-treasury-002.clar" + +[contracts.test-ccd002-treasury-003] +path = "tests/contracts/proposals/test-ccd002-treasury-003.clar" + +[contracts.test-ccd002-treasury-004] +path = "tests/contracts/proposals/test-ccd002-treasury-004.clar" + +[contracts.test-ccd002-treasury-005] +path = "tests/contracts/proposals/test-ccd002-treasury-005.clar" + +[contracts.test-ccd002-treasury-006] +path = "tests/contracts/proposals/test-ccd002-treasury-006.clar" + +[contracts.test-ccd002-treasury-007] +path = "tests/contracts/proposals/test-ccd002-treasury-007.clar" + +[contracts.test-ccd002-treasury-008] +path = "tests/contracts/proposals/test-ccd002-treasury-008.clar" + +[contracts.test-ccd002-treasury-009] +path = "tests/contracts/proposals/test-ccd002-treasury-009.clar" + +[contracts.test-ccd002-treasury-010] +path = "tests/contracts/proposals/test-ccd002-treasury-010.clar" + +[contracts.test-ccd002-treasury-011] +path = "tests/contracts/proposals/test-ccd002-treasury-011.clar" + +[contracts.test-ccd002-treasury-012] +path = "tests/contracts/proposals/test-ccd002-treasury-012.clar" + +[contracts.test-ccd002-treasury-v2-001] +path = "tests/contracts/proposals/test-ccd002-treasury-v2-001.clar" + +[contracts.test-ccd002-treasury-v2-002] +path = "tests/contracts/proposals/test-ccd002-treasury-v2-002.clar" + +[contracts.test-ccd002-treasury-v2-003] +path = "tests/contracts/proposals/test-ccd002-treasury-v2-003.clar" + +[contracts.test-ccd002-treasury-v2-004] +path = "tests/contracts/proposals/test-ccd002-treasury-v2-004.clar" + +[contracts.test-ccd002-treasury-v2-005] +path = "tests/contracts/proposals/test-ccd002-treasury-v2-005.clar" + +[contracts.test-ccd002-treasury-v2-006] +path = "tests/contracts/proposals/test-ccd002-treasury-v2-006.clar" + +[contracts.test-ccd002-treasury-v2-007] +path = "tests/contracts/proposals/test-ccd002-treasury-v2-007.clar" + +[contracts.test-ccd002-treasury-v2-008] +path = "tests/contracts/proposals/test-ccd002-treasury-v2-008.clar" + +[contracts.test-ccd002-treasury-v2-009] +path = "tests/contracts/proposals/test-ccd002-treasury-v2-009.clar" + +[contracts.test-ccd002-treasury-v2-010] +path = "tests/contracts/proposals/test-ccd002-treasury-v2-010.clar" + +[contracts.test-ccd002-treasury-v2-011] +path = "tests/contracts/proposals/test-ccd002-treasury-v2-011.clar" + +[contracts.test-ccd002-treasury-v2-012] +path = "tests/contracts/proposals/test-ccd002-treasury-v2-012.clar" + +[contracts.test-ccd003-user-registry-001] +path = "tests/contracts/proposals/test-ccd003-user-registry-001.clar" + +[contracts.test-ccd003-user-registry-002] +path = "tests/contracts/proposals/test-ccd003-user-registry-002.clar" + +[contracts.test-ccd003-user-registry-003] +path = "tests/contracts/proposals/test-ccd003-user-registry-003.clar" + +[contracts.test-ccd004-city-registry-001] +path = "tests/contracts/proposals/test-ccd004-city-registry-001.clar" + +[contracts.test-ccd004-city-registry-002] +path = "tests/contracts/proposals/test-ccd004-city-registry-002.clar" + +[contracts.test-ccd005-city-data-001] +path = "tests/contracts/proposals/test-ccd005-city-data-001.clar" + +[contracts.test-ccd005-city-data-002] +path = "tests/contracts/proposals/test-ccd005-city-data-002.clar" + +[contracts.test-ccd005-city-data-003] +path = "tests/contracts/proposals/test-ccd005-city-data-003.clar" + +[contracts.test-ccd005-city-data-004] +path = "tests/contracts/proposals/test-ccd005-city-data-004.clar" + +[contracts.test-ccd005-city-data-005] +path = "tests/contracts/proposals/test-ccd005-city-data-005.clar" + +[contracts.test-ccd005-city-data-006] +path = "tests/contracts/proposals/test-ccd005-city-data-006.clar" + +[contracts.test-ccd005-city-data-007] +path = "tests/contracts/proposals/test-ccd005-city-data-007.clar" + +[contracts.test-ccd005-city-data-008] +path = "tests/contracts/proposals/test-ccd005-city-data-008.clar" + +[contracts.test-ccd005-city-data-009] +path = "tests/contracts/proposals/test-ccd005-city-data-009.clar" + +[contracts.test-ccd005-city-data-010] +path = "tests/contracts/proposals/test-ccd005-city-data-010.clar" + +[contracts.test-ccd005-city-data-011] +path = "tests/contracts/proposals/test-ccd005-city-data-011.clar" + +[contracts.test-ccd005-city-data-012] +path = "tests/contracts/proposals/test-ccd005-city-data-012.clar" + +[contracts.test-ccd005-city-data-013] +path = "tests/contracts/proposals/test-ccd005-city-data-013.clar" + +[contracts.test-ccd005-city-data-014] +path = "tests/contracts/proposals/test-ccd005-city-data-014.clar" + +[contracts.test-ccd005-city-data-015] +path = "tests/contracts/proposals/test-ccd005-city-data-015.clar" + +[contracts.test-ccd005-city-data-016] +path = "tests/contracts/proposals/test-ccd005-city-data-016.clar" + +[contracts.test-ccd005-city-data-017] +path = "tests/contracts/proposals/test-ccd005-city-data-017.clar" + +[contracts.test-ccd005-city-data-018] +path = "tests/contracts/proposals/test-ccd005-city-data-018.clar" + +[contracts.test-ccd005-city-data-019] +path = "tests/contracts/proposals/test-ccd005-city-data-019.clar" + +[contracts.test-ccd005-city-data-020] +path = "tests/contracts/proposals/test-ccd005-city-data-020.clar" + +[contracts.test-ccd006-citycoin-mining-001] +path = "tests/contracts/proposals/test-ccd006-citycoin-mining-001.clar" + +[contracts.test-ccd006-citycoin-mining-002] +path = "tests/contracts/proposals/test-ccd006-citycoin-mining-002.clar" + +[contracts.test-ccd006-citycoin-mining-003] +path = "tests/contracts/proposals/test-ccd006-citycoin-mining-003.clar" + +[contracts.test-ccd006-citycoin-mining-004] +path = "tests/contracts/proposals/test-ccd006-citycoin-mining-004.clar" + +[contracts.test-ccd006-citycoin-mining-005] +path = "tests/contracts/proposals/test-ccd006-citycoin-mining-005.clar" + +[contracts.test-ccd006-citycoin-mining-v2-001] +path = "tests/contracts/proposals/test-ccd006-citycoin-mining-v2-001.clar" + +[contracts.test-ccd006-citycoin-mining-v2-002] +path = "tests/contracts/proposals/test-ccd006-citycoin-mining-v2-002.clar" + +[contracts.test-ccd006-citycoin-mining-v2-003] +path = "tests/contracts/proposals/test-ccd006-citycoin-mining-v2-003.clar" + +[contracts.test-ccd006-citycoin-mining-v2-004] +path = "tests/contracts/proposals/test-ccd006-citycoin-mining-v2-004.clar" + +[contracts.test-ccd006-citycoin-mining-v2-005] +path = "tests/contracts/proposals/test-ccd006-citycoin-mining-v2-005.clar" + +[contracts.test-ccd006-citycoin-mining-v2-006] +path = "tests/contracts/proposals/test-ccd006-citycoin-mining-v2-006.clar" + +[contracts.test-ccd006-citycoin-mining-v2-007] +path = "tests/contracts/proposals/test-ccd006-citycoin-mining-v2-007.clar" + +[contracts.test-ccd007-citycoin-stacking-001] +path = "tests/contracts/proposals/test-ccd007-citycoin-stacking-001.clar" + +[contracts.test-ccd007-citycoin-stacking-002] +path = "tests/contracts/proposals/test-ccd007-citycoin-stacking-002.clar" + +[contracts.test-ccd007-citycoin-stacking-003] +path = "tests/contracts/proposals/test-ccd007-citycoin-stacking-003.clar" + +[contracts.test-ccd007-citycoin-stacking-004] +path = "tests/contracts/proposals/test-ccd007-citycoin-stacking-004.clar" + +[contracts.test-ccd007-citycoin-stacking-005] +path = "tests/contracts/proposals/test-ccd007-citycoin-stacking-005.clar" + +[contracts.test-ccd007-citycoin-stacking-006] +path = "tests/contracts/proposals/test-ccd007-citycoin-stacking-006.clar" + +[contracts.test-ccd007-citycoin-stacking-007] +path = "tests/contracts/proposals/test-ccd007-citycoin-stacking-007.clar" + +[contracts.test-ccd007-citycoin-stacking-008] +path = "tests/contracts/proposals/test-ccd007-citycoin-stacking-008.clar" + +[contracts.test-ccd007-citycoin-stacking-009] +path = "tests/contracts/proposals/test-ccd007-citycoin-stacking-009.clar" + +[contracts.test-ccd007-citycoin-stacking-010] +path = "tests/contracts/proposals/test-ccd007-citycoin-stacking-010.clar" + +[contracts.test-ccd007-citycoin-stacking-011] +path = "tests/contracts/proposals/test-ccd007-citycoin-stacking-011.clar" + +[contracts.test-ccd007-citycoin-stacking-012] +path = "tests/contracts/proposals/test-ccd007-citycoin-stacking-012.clar" + +[contracts.test-ccd011-stacking-payouts-001] +path = "tests/contracts/proposals/test-ccd011-stacking-payouts-001.clar" + +[contracts.test-ccip014-pox-3-001] +path = "tests/contracts/proposals/test-ccip014-pox-3-001.clar" + +[contracts.test-ccip014-pox-3-002] +path = "tests/contracts/proposals/test-ccip014-pox-3-002.clar" + +[contracts.test-ccip020-shutdown-001] +path = "tests/contracts/proposals/test-ccip020-shutdown-001.clar" +clarity_version = 2 +epoch = 2.4 + +[contracts.test-ccip022-treasury-redemption-nyc-001] +path = "tests/contracts/proposals/test-ccip022-treasury-redemption-nyc-001.clar" +clarity_version = 2 +epoch = 2.4 + +[contracts.test-ccip022-treasury-redemption-nyc-002] +path = "tests/contracts/proposals/test-ccip022-treasury-redemption-nyc-002.clar" +clarity_version = 2 +epoch = 2.4 + +[contracts.test-ccip022-treasury-redemption-nyc-003] +path = "tests/contracts/proposals/test-ccip022-treasury-redemption-nyc-003.clar" +clarity_version = 2 +epoch = 2.4 + +[contracts.test-ccip022-treasury-redemption-nyc-004] +path = "tests/contracts/proposals/test-ccip022-treasury-redemption-nyc-004.clar" +clarity_version = 2 +epoch = 2.4 + +[contracts.test-ccip022-treasury-redemption-nyc-005] +path = "tests/contracts/proposals/test-ccip022-treasury-redemption-nyc-005.clar" +clarity_version = 2 +epoch = 2.4 + +[repl] +costs_version = 2 +parser_version = 2 + +# TEMPORARILY DISABLED + +# [repl.analysis] +# passes = ["check_checker"] + +# [repl.analysis.check_checker] +# strict = false +# trusted_sender = false +# trusted_caller = false +# callee_filter = true diff --git a/Clarinet.toml b/Clarinet.toml index c08b494..7e95afb 100644 --- a/Clarinet.toml +++ b/Clarinet.toml @@ -92,15 +92,6 @@ path = "contracts/extensions/ccd002-treasury.clar" [contracts.ccd002-treasury-mia-mining-v2] path = "contracts/extensions/ccd002-treasury-v2.clar" -[contracts.ccd002-treasury-mia-mining-v3] -path = "contracts/extensions/ccd002-treasury-v3.clar" -clarity_version = 2 -epoch = 2.5 - -[contracts.ccd002-treasury-mia-stx-rewards-v3] -path = "contracts/extensions/ccd002-treasury-v3.clar" -clarity_version = 2 -epoch = 2.5 [contracts.ccd002-treasury-mia-stacking] path = "contracts/extensions/ccd002-treasury.clar" @@ -188,10 +179,6 @@ path = "contracts/proposals/ccip022-treasury-redemption-nyc.clar" clarity_version = 2 epoch = 2.4 -[contracts.ccip019-pox-4-stacking] -path = "contracts/proposals/ccip019-pox-4-stacking.clar" -clarity_version = 2 -epoch = 2.5 # CITYCOINS PROTOCOL TRAITS [contracts.extension-trait] From 9496a7e4157d263a503daa95dc3ea4b0e8f7e062 Mon Sep 17 00:00:00 2001 From: friedger Date: Sun, 21 Jul 2024 00:25:20 +0200 Subject: [PATCH 7/9] feat: add stxer simulation --- .gitignore | 1 + contracts/extensions/ccd002-treasury-v3.clar | 8 +- .../proposals/ccip019-pox-4-stacking.clar | 8 +- package.json | 25 + pnpm-lock.yaml | 1743 +++++++++++++++++ simulations/stxer.ts | 149 ++ tsconfig.json | 26 + vitest.config.js | 42 + 8 files changed, 1994 insertions(+), 8 deletions(-) create mode 100644 package.json create mode 100644 pnpm-lock.yaml create mode 100644 simulations/stxer.ts create mode 100644 tsconfig.json create mode 100644 vitest.config.js diff --git a/.gitignore b/.gitignore index 9432455..7a33ce4 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /coverage_report history.txt coverage.lcov +node_modules diff --git a/contracts/extensions/ccd002-treasury-v3.clar b/contracts/extensions/ccd002-treasury-v3.clar index a5802bd..18da6d9 100644 --- a/contracts/extensions/ccd002-treasury-v3.clar +++ b/contracts/extensions/ccd002-treasury-v3.clar @@ -14,9 +14,9 @@ (impl-trait .stacking-trait.stacking-trait) (impl-trait .ccd002-trait.ccd002-treasury-trait) ;; MAINNET: 'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.sip-010-trait -(use-trait ft-trait 'ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.sip-010-trait-ft-standard.sip-010-trait) +(use-trait ft-trait 'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.sip-010-trait) ;; MAINNET: 'SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.nft-trait -(use-trait nft-trait 'ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.nft-trait.nft-trait) +(use-trait nft-trait 'SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.nft-trait) ;; CONSTANTS @@ -159,7 +159,7 @@ }) ;; MAINNET: 'SP000000000000000000002Q6VF78.pox-4 ;; TESTNET: 'ST000000000000000000002AMW42H.pox-4 - (match (as-contract (contract-call? 'ST000000000000000000002AMW42H.pox-4 delegate-stx maxAmount to none none)) + (match (as-contract (contract-call? 'SP000000000000000000002Q6VF78.pox-4 delegate-stx maxAmount to none none)) success (ok success) err (err (to-uint err)) ) @@ -176,7 +176,7 @@ }) ;; MAINNET: 'SP000000000000000000002Q6VF78.pox-4 ;; TESTNET: 'ST000000000000000000002AMW42H.pox-4 - (match (as-contract (contract-call? 'ST000000000000000000002AMW42H.pox-4 revoke-delegate-stx)) + (match (as-contract (contract-call? 'SP000000000000000000002Q6VF78.pox-4 revoke-delegate-stx)) success (begin (print success) (ok true)) err (err (to-uint err)) ) diff --git a/contracts/proposals/ccip019-pox-4-stacking.clar b/contracts/proposals/ccip019-pox-4-stacking.clar index 44318d5..b763f4a 100644 --- a/contracts/proposals/ccip019-pox-4-stacking.clar +++ b/contracts/proposals/ccip019-pox-4-stacking.clar @@ -79,14 +79,14 @@ ;; allow MIA in treasuries ;; MAINNET: 'SP1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8Y634C7R.miamicoin-token-v2 - (try! (contract-call? .ccd002-treasury-mia-mining-v3 set-allowed 'ST1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8WRH7C6H.miamicoin-token-v2 true)) + (try! (contract-call? .ccd002-treasury-mia-mining-v3 set-allowed 'SP1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8Y634C7R.miamicoin-token-v2 true)) ;; transfer funds to new treasury extensions (try! (contract-call? .ccd002-treasury-mia-mining-v2 withdraw-stx miaBalance .ccd002-treasury-mia-mining-v3)) ;; delegate stack the STX in the mining treasuries (up to 50M STX each) ;; MAINNET: SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP.pox4-fast-pool-v3 - (try! (contract-call? .ccd002-treasury-mia-mining-v3 delegate-stx u50000000000000 'ST1XQXW9JNQ1W4A7PYTN3HCHPEY7SHM6KPA085ES6)) + (try! (contract-call? .ccd002-treasury-mia-mining-v3 delegate-stx u50000000000000 'SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP.pox4-fast-pool-v3)) ;; add treasuries to ccd005-city-data (try! (contract-call? .ccd005-city-data add-treasury miaId .ccd002-treasury-mia-mining-v3 "mining-v3")) @@ -224,12 +224,12 @@ ( ;; MAINNET: mia cycle 82 / first block BTC 838,250 STX 145,643 ;; cycle 2 / u4500 used in tests - (cycle82Hash (unwrap! (get-block-hash u4500) none)) + (cycle82Hash (unwrap! (get-block-hash u145643) none)) (cycle82Data (at-block cycle82Hash (contract-call? .ccd007-citycoin-stacking get-stacker MIA_ID u2 userId))) (cycle82Amount (get stacked cycle82Data)) ;; MAINNET: mia cycle 83 / first block BTC 840,350 STX 147,282 ;; cycle 3 / u6600 used in tests - (cycle83Hash (unwrap! (get-block-hash u6600) none)) + (cycle83Hash (unwrap! (get-block-hash u147282) none)) (cycle83Data (at-block cycle83Hash (contract-call? .ccd007-citycoin-stacking get-stacker MIA_ID u3 userId))) (cycle83Amount (get stacked cycle83Data)) ;; mia vote calculation diff --git a/package.json b/package.json new file mode 100644 index 0000000..b66c8d9 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "city-coins", + "version": "1.0.0", + "description": "Run unit tests on this project.", + "type": "module", + "private": true, + "scripts": { + "test": "vitest run ccip022", + "test:report": "vitest run -- --coverage --costs", + "test:watch": "chokidar \"tests/**/*.ts\" \"contracts/**/*.clar\" -c \"npm run test:report\"" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@hirosystems/clarinet-sdk": "^2.3.2", + "@stacks/network": "^6.16.0", + "@stacks/transactions": "^6.12.0", + "c32check": "^2.0.0", + "chokidar-cli": "^3.0.0", + "typescript": "^5.3.3", + "vite": "^5.1.4", + "vitest": "^1.3.1", + "vitest-environment-clarinet": "^2.0.0" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..670c62d --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,1743 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@hirosystems/clarinet-sdk': + specifier: ^2.3.2 + version: 2.6.0(@types/node@18.19.33) + '@stacks/network': + specifier: ^6.16.0 + version: 6.16.0 + '@stacks/transactions': + specifier: ^6.12.0 + version: 6.15.0 + c32check: + specifier: ^2.0.0 + version: 2.0.0 + chokidar-cli: + specifier: ^3.0.0 + version: 3.0.0 + typescript: + specifier: ^5.3.3 + version: 5.4.5 + vite: + specifier: ^5.1.4 + version: 5.2.11(@types/node@18.19.33) + vitest: + specifier: ^1.3.1 + version: 1.6.0(@types/node@18.19.33) + vitest-environment-clarinet: + specifier: ^2.0.0 + version: 2.1.0(@hirosystems/clarinet-sdk@2.6.0(@types/node@18.19.33))(vitest@1.6.0(@types/node@18.19.33)) + +packages: + + '@esbuild/aix-ppc64@0.20.2': + resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.20.2': + resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.20.2': + resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.20.2': + resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.20.2': + resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.20.2': + resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.20.2': + resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.20.2': + resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.20.2': + resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.20.2': + resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.20.2': + resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.20.2': + resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.20.2': + resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.20.2': + resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.20.2': + resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.20.2': + resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.20.2': + resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-x64@0.20.2': + resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-x64@0.20.2': + resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.20.2': + resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.20.2': + resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.20.2': + resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.20.2': + resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + + '@hirosystems/clarinet-sdk-wasm@2.6.0': + resolution: {integrity: sha512-cUpYrnLX4VnpnumlYTCUNf1gFfl2kL18q63C1qFzUzkjFszffR+x0U2lxOQrz3EY3/U6eWeZvZPdKbOFO3zgqQ==} + + '@hirosystems/clarinet-sdk@2.6.0': + resolution: {integrity: sha512-8qyvpaeTmhn/Lrsg7zjNpIr9Ova1zVfzMNeBC4+y42tqxHX0j6MM58nr5m56bz5/0u+KPOvQpAhuVxGR27/NiA==} + engines: {node: '>=18.0.0'} + hasBin: true + + '@jest/schemas@29.6.3': + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jridgewell/sourcemap-codec@1.4.15': + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + + '@noble/hashes@1.1.5': + resolution: {integrity: sha512-LTMZiiLc+V4v1Yi16TD6aX2gmtKszNye0pQgbaLqkvhIqP7nVsSaJsWloGQjJfJ8offaoP5GtX3yY5swbcJxxQ==} + + '@noble/secp256k1@1.7.1': + resolution: {integrity: sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==} + + '@rollup/rollup-android-arm-eabi@4.17.2': + resolution: {integrity: sha512-NM0jFxY8bB8QLkoKxIQeObCaDlJKewVlIEkuyYKm5An1tdVZ966w2+MPQ2l8LBZLjR+SgyV+nRkTIunzOYBMLQ==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.17.2': + resolution: {integrity: sha512-yeX/Usk7daNIVwkq2uGoq2BYJKZY1JfyLTaHO/jaiSwi/lsf8fTFoQW/n6IdAsx5tx+iotu2zCJwz8MxI6D/Bw==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.17.2': + resolution: {integrity: sha512-kcMLpE6uCwls023+kknm71ug7MZOrtXo+y5p/tsg6jltpDtgQY1Eq5sGfHcQfb+lfuKwhBmEURDga9N0ol4YPw==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.17.2': + resolution: {integrity: sha512-AtKwD0VEx0zWkL0ZjixEkp5tbNLzX+FCqGG1SvOu993HnSz4qDI6S4kGzubrEJAljpVkhRSlg5bzpV//E6ysTQ==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-linux-arm-gnueabihf@4.17.2': + resolution: {integrity: sha512-3reX2fUHqN7sffBNqmEyMQVj/CKhIHZd4y631duy0hZqI8Qoqf6lTtmAKvJFYa6bhU95B1D0WgzHkmTg33In0A==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.17.2': + resolution: {integrity: sha512-uSqpsp91mheRgw96xtyAGP9FW5ChctTFEoXP0r5FAzj/3ZRv3Uxjtc7taRQSaQM/q85KEKjKsZuiZM3GyUivRg==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.17.2': + resolution: {integrity: sha512-EMMPHkiCRtE8Wdk3Qhtciq6BndLtstqZIroHiiGzB3C5LDJmIZcSzVtLRbwuXuUft1Cnv+9fxuDtDxz3k3EW2A==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.17.2': + resolution: {integrity: sha512-NMPylUUZ1i0z/xJUIx6VUhISZDRT+uTWpBcjdv0/zkp7b/bQDF+NfnfdzuTiB1G6HTodgoFa93hp0O1xl+/UbA==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.17.2': + resolution: {integrity: sha512-T19My13y8uYXPw/L/k0JYaX1fJKFT/PWdXiHr8mTbXWxjVF1t+8Xl31DgBBvEKclw+1b00Chg0hxE2O7bTG7GQ==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.17.2': + resolution: {integrity: sha512-BOaNfthf3X3fOWAB+IJ9kxTgPmMqPPH5f5k2DcCsRrBIbWnaJCgX2ll77dV1TdSy9SaXTR5iDXRL8n7AnoP5cg==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.17.2': + resolution: {integrity: sha512-W0UP/x7bnn3xN2eYMql2T/+wpASLE5SjObXILTMPUBDB/Fg/FxC+gX4nvCfPBCbNhz51C+HcqQp2qQ4u25ok6g==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.17.2': + resolution: {integrity: sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.17.2': + resolution: {integrity: sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.17.2': + resolution: {integrity: sha512-tmdtXMfKAjy5+IQsVtDiCfqbynAQE/TQRpWdVataHmhMb9DCoJxp9vLcCBjEQWMiUYxO1QprH/HbY9ragCEFLA==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.17.2': + resolution: {integrity: sha512-7II/QCSTAHuE5vdZaQEwJq2ZACkBpQDOmQsE6D6XUbnBHW8IAhm4eTufL6msLJorzrHDFv3CF8oCA/hSIRuZeQ==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.17.2': + resolution: {integrity: sha512-TGGO7v7qOq4CYmSBVEYpI1Y5xDuCEnbVC5Vth8mOsW0gDSzxNrVERPc790IGHsrT2dQSimgMr9Ub3Y1Jci5/8w==} + cpu: [x64] + os: [win32] + + '@scure/base@1.1.1': + resolution: {integrity: sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==} + + '@scure/base@1.1.6': + resolution: {integrity: sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g==} + + '@scure/bip39@1.1.0': + resolution: {integrity: sha512-pwrPOS16VeTKg98dYXQyIjJEcWfz7/1YJIwxUEPFfQPtc86Ym/1sVgQ2RLoD43AazMk2l/unK4ITySSpW2+82w==} + + '@sinclair/typebox@0.27.8': + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + + '@stacks/common@6.13.0': + resolution: {integrity: sha512-wwzyihjaSdmL6NxKvDeayy3dqM0L0Q2sawmdNtzJDi0FnXuJGm5PeapJj7bEfcI9XwI7Bw5jZoC6mCn9nc5YIw==} + + '@stacks/common@6.16.0': + resolution: {integrity: sha512-PnzvhrdGRMVZvxTulitlYafSK4l02gPCBBoI9QEoTqgSnv62oaOXhYAUUkTMFKxdHW1seVEwZsrahuXiZPIAwg==} + + '@stacks/encryption@6.15.0': + resolution: {integrity: sha512-506BdBvWhbXY1jxCdUcdbBzcSJctO2nzgzfenQwUuoBABSc1N/MFwQdlR9ZusY+E31zBxQPLfbr36V05/p2cfQ==} + + '@stacks/network@6.16.0': + resolution: {integrity: sha512-uqz9Nb6uf+SeyCKENJN+idt51HAfEeggQKrOMfGjpAeFgZV2CR66soB/ci9+OVQR/SURvasncAz2ScI1blfS8A==} + + '@stacks/stacking@6.15.0': + resolution: {integrity: sha512-ZAjcF3mrB82XTaqJKuUpo0Lmo2IvJLyTIrnRUC5wgDm01N5UBn8IWW/45F+RlSi63EXA1Vz4QvRirfZ8aldR2Q==} + + '@stacks/stacks-blockchain-api-types@0.61.0': + resolution: {integrity: sha512-yPOfTUboo5eA9BZL/hqMcM71GstrFs9YWzOrJFPeP4cOO1wgYvAcckgBRbgiE3NqeX0A7SLZLDAXLZbATuRq9w==} + + '@stacks/transactions@6.15.0': + resolution: {integrity: sha512-P6XKDcqqycPy+KBJBw8+5N+u57D8moJN7msYdde1gYXERmvOo9ht/MNREWWQ7SAM7Nlhau5mpezCdYCzXOCilQ==} + + '@types/bn.js@5.1.5': + resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} + + '@types/estree@1.0.5': + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + + '@types/node@18.19.33': + resolution: {integrity: sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==} + + '@vitest/expect@1.6.0': + resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==} + + '@vitest/runner@1.6.0': + resolution: {integrity: sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==} + + '@vitest/snapshot@1.6.0': + resolution: {integrity: sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==} + + '@vitest/spy@1.6.0': + resolution: {integrity: sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==} + + '@vitest/utils@1.6.0': + resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==} + + acorn-walk@8.3.2: + resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} + engines: {node: '>=0.4.0'} + + acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + engines: {node: '>=0.4.0'} + hasBin: true + + ansi-regex@4.1.1: + resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==} + engines: {node: '>=6'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + + base-x@4.0.0: + resolution: {integrity: sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} + + braces@3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + + bs58@5.0.0: + resolution: {integrity: sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==} + + c32check@2.0.0: + resolution: {integrity: sha512-rpwfAcS/CMqo0oCqDf3r9eeLgScRE3l/xHDCXhM3UyrfvIn7PrLq63uHh7yYbv8NzaZn5MVsVhIRpQ+5GZ5HyA==} + engines: {node: '>=8'} + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + + chai@4.4.1: + resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} + engines: {node: '>=4'} + + check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + + chokidar-cli@3.0.0: + resolution: {integrity: sha512-xVW+Qeh7z15uZRxHOkP93Ux8A0xbPzwK4GaqD8dQOYc34TlkqUhVSS59fK36DOp5WdJlrRzlYSy02Ht99FjZqQ==} + engines: {node: '>= 8.10.0'} + hasBin: true + + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + + cliui@5.0.0: + resolution: {integrity: sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + confbox@0.1.7: + resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} + + cross-fetch@3.1.8: + resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + + cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + + debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + + deep-eql@4.1.3: + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + engines: {node: '>=6'} + + diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + emoji-regex@7.0.3: + resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + esbuild@0.20.2: + resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} + engines: {node: '>=12'} + hasBin: true + + escalade@3.1.2: + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + + fill-range@7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + + find-up@3.0.0: + resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} + engines: {node: '>=6'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + + get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@2.0.0: + resolution: {integrity: sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==} + engines: {node: '>=4'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + js-tokens@9.0.0: + resolution: {integrity: sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==} + + kleur@3.0.3: + resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} + engines: {node: '>=6'} + + kolorist@1.8.0: + resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + + local-pkg@0.5.0: + resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} + engines: {node: '>=14'} + + locate-path@3.0.0: + resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} + engines: {node: '>=6'} + + lodash.clonedeep@4.5.0: + resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} + + lodash.debounce@4.0.8: + resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} + + lodash.throttle@4.1.1: + resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==} + + loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + + magic-string@0.30.10: + resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + + mlly@1.7.0: + resolution: {integrity: sha512-U9SDaXGEREBYQgfejV97coK0UL1r+qnF2SyO9A3qcI8MzKnsIFKHNVEkrDyNncQTKQQumsasmeq84eNMdBfsNQ==} + + ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + + nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-limit@5.0.0: + resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==} + engines: {node: '>=18'} + + p-locate@3.0.0: + resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} + engines: {node: '>=6'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + + path-exists@3.0.0: + resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} + engines: {node: '>=4'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + + pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + + picocolors@1.0.1: + resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + pkg-types@1.1.1: + resolution: {integrity: sha512-ko14TjmDuQJ14zsotODv7dBlwxKhUKQEhuhmbqo1uCi9BB0Z2alo/wAXg6q1dTR5TyuqYyWhjtfe/Tsh+X28jQ==} + + postcss@8.4.38: + resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} + engines: {node: ^10 || ^12 || >=14} + + pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + prompts@2.4.2: + resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} + engines: {node: '>= 6'} + + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-main-filename@2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + + ripemd160-min@0.0.6: + resolution: {integrity: sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A==} + engines: {node: '>=8'} + + rollup@4.17.2: + resolution: {integrity: sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + + source-map-js@1.2.0: + resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} + engines: {node: '>=0.10.0'} + + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@3.7.0: + resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} + + string-width@3.1.0: + resolution: {integrity: sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==} + engines: {node: '>=6'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + strip-ansi@5.2.0: + resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==} + engines: {node: '>=6'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + + strip-literal@2.1.0: + resolution: {integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==} + + tinybench@2.8.0: + resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} + + tinypool@0.8.4: + resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} + engines: {node: '>=14.0.0'} + + tinyspy@2.2.1: + resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} + engines: {node: '>=14.0.0'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + + type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + + typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} + hasBin: true + + ufo@1.5.3: + resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} + + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + + varuint-bitcoin@1.1.2: + resolution: {integrity: sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==} + + vite-node@1.6.0: + resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + + vite@5.2.11: + resolution: {integrity: sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + + vitest-environment-clarinet@2.1.0: + resolution: {integrity: sha512-1SA9XZh47qmbV724sGo2FyjVU+Ar3m5TOU4bLGSlWDb/x388IKUPrHbHWqIQNwY+gwEm9VBfXEAd1LOSUdemBw==} + peerDependencies: + '@hirosystems/clarinet-sdk': '>=2.6.0' + vitest: ^1.5.2 + + vitest@1.6.0: + resolution: {integrity: sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 1.6.0 + '@vitest/ui': 1.6.0 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + + which-module@2.0.1: + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + why-is-node-running@2.2.2: + resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + engines: {node: '>=8'} + hasBin: true + + wrap-ansi@5.1.0: + resolution: {integrity: sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==} + engines: {node: '>=6'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + y18n@4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@13.1.2: + resolution: {integrity: sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@13.3.2: + resolution: {integrity: sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yocto-queue@1.0.0: + resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} + engines: {node: '>=12.20'} + +snapshots: + + '@esbuild/aix-ppc64@0.20.2': + optional: true + + '@esbuild/android-arm64@0.20.2': + optional: true + + '@esbuild/android-arm@0.20.2': + optional: true + + '@esbuild/android-x64@0.20.2': + optional: true + + '@esbuild/darwin-arm64@0.20.2': + optional: true + + '@esbuild/darwin-x64@0.20.2': + optional: true + + '@esbuild/freebsd-arm64@0.20.2': + optional: true + + '@esbuild/freebsd-x64@0.20.2': + optional: true + + '@esbuild/linux-arm64@0.20.2': + optional: true + + '@esbuild/linux-arm@0.20.2': + optional: true + + '@esbuild/linux-ia32@0.20.2': + optional: true + + '@esbuild/linux-loong64@0.20.2': + optional: true + + '@esbuild/linux-mips64el@0.20.2': + optional: true + + '@esbuild/linux-ppc64@0.20.2': + optional: true + + '@esbuild/linux-riscv64@0.20.2': + optional: true + + '@esbuild/linux-s390x@0.20.2': + optional: true + + '@esbuild/linux-x64@0.20.2': + optional: true + + '@esbuild/netbsd-x64@0.20.2': + optional: true + + '@esbuild/openbsd-x64@0.20.2': + optional: true + + '@esbuild/sunos-x64@0.20.2': + optional: true + + '@esbuild/win32-arm64@0.20.2': + optional: true + + '@esbuild/win32-ia32@0.20.2': + optional: true + + '@esbuild/win32-x64@0.20.2': + optional: true + + '@hirosystems/clarinet-sdk-wasm@2.6.0': {} + + '@hirosystems/clarinet-sdk@2.6.0(@types/node@18.19.33)': + dependencies: + '@hirosystems/clarinet-sdk-wasm': 2.6.0 + '@stacks/encryption': 6.15.0 + '@stacks/network': 6.16.0 + '@stacks/stacking': 6.15.0 + '@stacks/transactions': 6.15.0 + kolorist: 1.8.0 + prompts: 2.4.2 + vitest: 1.6.0(@types/node@18.19.33) + yargs: 17.7.2 + transitivePeerDependencies: + - '@edge-runtime/vm' + - '@types/node' + - '@vitest/browser' + - '@vitest/ui' + - encoding + - happy-dom + - jsdom + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + + '@jest/schemas@29.6.3': + dependencies: + '@sinclair/typebox': 0.27.8 + + '@jridgewell/sourcemap-codec@1.4.15': {} + + '@noble/hashes@1.1.5': {} + + '@noble/secp256k1@1.7.1': {} + + '@rollup/rollup-android-arm-eabi@4.17.2': + optional: true + + '@rollup/rollup-android-arm64@4.17.2': + optional: true + + '@rollup/rollup-darwin-arm64@4.17.2': + optional: true + + '@rollup/rollup-darwin-x64@4.17.2': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.17.2': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.17.2': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.17.2': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.17.2': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.17.2': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.17.2': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.17.2': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.17.2': + optional: true + + '@rollup/rollup-linux-x64-musl@4.17.2': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.17.2': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.17.2': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.17.2': + optional: true + + '@scure/base@1.1.1': {} + + '@scure/base@1.1.6': {} + + '@scure/bip39@1.1.0': + dependencies: + '@noble/hashes': 1.1.5 + '@scure/base': 1.1.6 + + '@sinclair/typebox@0.27.8': {} + + '@stacks/common@6.13.0': + dependencies: + '@types/bn.js': 5.1.5 + '@types/node': 18.19.33 + + '@stacks/common@6.16.0': + dependencies: + '@types/bn.js': 5.1.5 + '@types/node': 18.19.33 + + '@stacks/encryption@6.15.0': + dependencies: + '@noble/hashes': 1.1.5 + '@noble/secp256k1': 1.7.1 + '@scure/bip39': 1.1.0 + '@stacks/common': 6.13.0 + '@types/node': 18.19.33 + base64-js: 1.5.1 + bs58: 5.0.0 + ripemd160-min: 0.0.6 + varuint-bitcoin: 1.1.2 + + '@stacks/network@6.16.0': + dependencies: + '@stacks/common': 6.16.0 + cross-fetch: 3.1.8 + transitivePeerDependencies: + - encoding + + '@stacks/stacking@6.15.0': + dependencies: + '@noble/hashes': 1.1.5 + '@scure/base': 1.1.1 + '@stacks/common': 6.13.0 + '@stacks/encryption': 6.15.0 + '@stacks/network': 6.16.0 + '@stacks/stacks-blockchain-api-types': 0.61.0 + '@stacks/transactions': 6.15.0 + bs58: 5.0.0 + transitivePeerDependencies: + - encoding + + '@stacks/stacks-blockchain-api-types@0.61.0': {} + + '@stacks/transactions@6.15.0': + dependencies: + '@noble/hashes': 1.1.5 + '@noble/secp256k1': 1.7.1 + '@stacks/common': 6.13.0 + '@stacks/network': 6.16.0 + c32check: 2.0.0 + lodash.clonedeep: 4.5.0 + transitivePeerDependencies: + - encoding + + '@types/bn.js@5.1.5': + dependencies: + '@types/node': 18.19.33 + + '@types/estree@1.0.5': {} + + '@types/node@18.19.33': + dependencies: + undici-types: 5.26.5 + + '@vitest/expect@1.6.0': + dependencies: + '@vitest/spy': 1.6.0 + '@vitest/utils': 1.6.0 + chai: 4.4.1 + + '@vitest/runner@1.6.0': + dependencies: + '@vitest/utils': 1.6.0 + p-limit: 5.0.0 + pathe: 1.1.2 + + '@vitest/snapshot@1.6.0': + dependencies: + magic-string: 0.30.10 + pathe: 1.1.2 + pretty-format: 29.7.0 + + '@vitest/spy@1.6.0': + dependencies: + tinyspy: 2.2.1 + + '@vitest/utils@1.6.0': + dependencies: + diff-sequences: 29.6.3 + estree-walker: 3.0.3 + loupe: 2.3.7 + pretty-format: 29.7.0 + + acorn-walk@8.3.2: {} + + acorn@8.11.3: {} + + ansi-regex@4.1.1: {} + + ansi-regex@5.0.1: {} + + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@5.2.0: {} + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + + assertion-error@1.1.0: {} + + base-x@4.0.0: {} + + base64-js@1.5.1: {} + + binary-extensions@2.3.0: {} + + braces@3.0.2: + dependencies: + fill-range: 7.0.1 + + bs58@5.0.0: + dependencies: + base-x: 4.0.0 + + c32check@2.0.0: + dependencies: + '@noble/hashes': 1.1.5 + base-x: 4.0.0 + + cac@6.7.14: {} + + camelcase@5.3.1: {} + + chai@4.4.1: + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.3 + deep-eql: 4.1.3 + get-func-name: 2.0.2 + loupe: 2.3.7 + pathval: 1.1.1 + type-detect: 4.0.8 + + check-error@1.0.3: + dependencies: + get-func-name: 2.0.2 + + chokidar-cli@3.0.0: + dependencies: + chokidar: 3.6.0 + lodash.debounce: 4.0.8 + lodash.throttle: 4.1.1 + yargs: 13.3.2 + + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + + cliui@5.0.0: + dependencies: + string-width: 3.1.0 + strip-ansi: 5.2.0 + wrap-ansi: 5.1.0 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@1.9.3: + dependencies: + color-name: 1.1.3 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.3: {} + + color-name@1.1.4: {} + + confbox@0.1.7: {} + + cross-fetch@3.1.8: + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + + cross-spawn@7.0.3: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + debug@4.3.4: + dependencies: + ms: 2.1.2 + + decamelize@1.2.0: {} + + deep-eql@4.1.3: + dependencies: + type-detect: 4.0.8 + + diff-sequences@29.6.3: {} + + emoji-regex@7.0.3: {} + + emoji-regex@8.0.0: {} + + esbuild@0.20.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.20.2 + '@esbuild/android-arm': 0.20.2 + '@esbuild/android-arm64': 0.20.2 + '@esbuild/android-x64': 0.20.2 + '@esbuild/darwin-arm64': 0.20.2 + '@esbuild/darwin-x64': 0.20.2 + '@esbuild/freebsd-arm64': 0.20.2 + '@esbuild/freebsd-x64': 0.20.2 + '@esbuild/linux-arm': 0.20.2 + '@esbuild/linux-arm64': 0.20.2 + '@esbuild/linux-ia32': 0.20.2 + '@esbuild/linux-loong64': 0.20.2 + '@esbuild/linux-mips64el': 0.20.2 + '@esbuild/linux-ppc64': 0.20.2 + '@esbuild/linux-riscv64': 0.20.2 + '@esbuild/linux-s390x': 0.20.2 + '@esbuild/linux-x64': 0.20.2 + '@esbuild/netbsd-x64': 0.20.2 + '@esbuild/openbsd-x64': 0.20.2 + '@esbuild/sunos-x64': 0.20.2 + '@esbuild/win32-arm64': 0.20.2 + '@esbuild/win32-ia32': 0.20.2 + '@esbuild/win32-x64': 0.20.2 + + escalade@3.1.2: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.5 + + execa@8.0.1: + dependencies: + cross-spawn: 7.0.3 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.3.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + + fill-range@7.0.1: + dependencies: + to-regex-range: 5.0.1 + + find-up@3.0.0: + dependencies: + locate-path: 3.0.0 + + fsevents@2.3.3: + optional: true + + get-caller-file@2.0.5: {} + + get-func-name@2.0.2: {} + + get-stream@8.0.1: {} + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + human-signals@5.0.0: {} + + is-binary-path@2.1.0: + dependencies: + binary-extensions: 2.3.0 + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@2.0.0: {} + + is-fullwidth-code-point@3.0.0: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-number@7.0.0: {} + + is-stream@3.0.0: {} + + isexe@2.0.0: {} + + js-tokens@9.0.0: {} + + kleur@3.0.3: {} + + kolorist@1.8.0: {} + + local-pkg@0.5.0: + dependencies: + mlly: 1.7.0 + pkg-types: 1.1.1 + + locate-path@3.0.0: + dependencies: + p-locate: 3.0.0 + path-exists: 3.0.0 + + lodash.clonedeep@4.5.0: {} + + lodash.debounce@4.0.8: {} + + lodash.throttle@4.1.1: {} + + loupe@2.3.7: + dependencies: + get-func-name: 2.0.2 + + magic-string@0.30.10: + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + + merge-stream@2.0.0: {} + + mimic-fn@4.0.0: {} + + mlly@1.7.0: + dependencies: + acorn: 8.11.3 + pathe: 1.1.2 + pkg-types: 1.1.1 + ufo: 1.5.3 + + ms@2.1.2: {} + + nanoid@3.3.7: {} + + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + + normalize-path@3.0.0: {} + + npm-run-path@5.3.0: + dependencies: + path-key: 4.0.0 + + onetime@6.0.0: + dependencies: + mimic-fn: 4.0.0 + + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + + p-limit@5.0.0: + dependencies: + yocto-queue: 1.0.0 + + p-locate@3.0.0: + dependencies: + p-limit: 2.3.0 + + p-try@2.2.0: {} + + path-exists@3.0.0: {} + + path-key@3.1.1: {} + + path-key@4.0.0: {} + + pathe@1.1.2: {} + + pathval@1.1.1: {} + + picocolors@1.0.1: {} + + picomatch@2.3.1: {} + + pkg-types@1.1.1: + dependencies: + confbox: 0.1.7 + mlly: 1.7.0 + pathe: 1.1.2 + + postcss@8.4.38: + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.1 + source-map-js: 1.2.0 + + pretty-format@29.7.0: + dependencies: + '@jest/schemas': 29.6.3 + ansi-styles: 5.2.0 + react-is: 18.3.1 + + prompts@2.4.2: + dependencies: + kleur: 3.0.3 + sisteransi: 1.0.5 + + react-is@18.3.1: {} + + readdirp@3.6.0: + dependencies: + picomatch: 2.3.1 + + require-directory@2.1.1: {} + + require-main-filename@2.0.0: {} + + ripemd160-min@0.0.6: {} + + rollup@4.17.2: + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.17.2 + '@rollup/rollup-android-arm64': 4.17.2 + '@rollup/rollup-darwin-arm64': 4.17.2 + '@rollup/rollup-darwin-x64': 4.17.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.17.2 + '@rollup/rollup-linux-arm-musleabihf': 4.17.2 + '@rollup/rollup-linux-arm64-gnu': 4.17.2 + '@rollup/rollup-linux-arm64-musl': 4.17.2 + '@rollup/rollup-linux-powerpc64le-gnu': 4.17.2 + '@rollup/rollup-linux-riscv64-gnu': 4.17.2 + '@rollup/rollup-linux-s390x-gnu': 4.17.2 + '@rollup/rollup-linux-x64-gnu': 4.17.2 + '@rollup/rollup-linux-x64-musl': 4.17.2 + '@rollup/rollup-win32-arm64-msvc': 4.17.2 + '@rollup/rollup-win32-ia32-msvc': 4.17.2 + '@rollup/rollup-win32-x64-msvc': 4.17.2 + fsevents: 2.3.3 + + safe-buffer@5.2.1: {} + + set-blocking@2.0.0: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + siginfo@2.0.0: {} + + signal-exit@4.1.0: {} + + sisteransi@1.0.5: {} + + source-map-js@1.2.0: {} + + stackback@0.0.2: {} + + std-env@3.7.0: {} + + string-width@3.1.0: + dependencies: + emoji-regex: 7.0.3 + is-fullwidth-code-point: 2.0.0 + strip-ansi: 5.2.0 + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + strip-ansi@5.2.0: + dependencies: + ansi-regex: 4.1.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-final-newline@3.0.0: {} + + strip-literal@2.1.0: + dependencies: + js-tokens: 9.0.0 + + tinybench@2.8.0: {} + + tinypool@0.8.4: {} + + tinyspy@2.2.1: {} + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + tr46@0.0.3: {} + + type-detect@4.0.8: {} + + typescript@5.4.5: {} + + ufo@1.5.3: {} + + undici-types@5.26.5: {} + + varuint-bitcoin@1.1.2: + dependencies: + safe-buffer: 5.2.1 + + vite-node@1.6.0(@types/node@18.19.33): + dependencies: + cac: 6.7.14 + debug: 4.3.4 + pathe: 1.1.2 + picocolors: 1.0.1 + vite: 5.2.11(@types/node@18.19.33) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + + vite@5.2.11(@types/node@18.19.33): + dependencies: + esbuild: 0.20.2 + postcss: 8.4.38 + rollup: 4.17.2 + optionalDependencies: + '@types/node': 18.19.33 + fsevents: 2.3.3 + + vitest-environment-clarinet@2.1.0(@hirosystems/clarinet-sdk@2.6.0(@types/node@18.19.33))(vitest@1.6.0(@types/node@18.19.33)): + dependencies: + '@hirosystems/clarinet-sdk': 2.6.0(@types/node@18.19.33) + vitest: 1.6.0(@types/node@18.19.33) + + vitest@1.6.0(@types/node@18.19.33): + 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.4.1 + debug: 4.3.4 + execa: 8.0.1 + local-pkg: 0.5.0 + magic-string: 0.30.10 + pathe: 1.1.2 + picocolors: 1.0.1 + std-env: 3.7.0 + strip-literal: 2.1.0 + tinybench: 2.8.0 + tinypool: 0.8.4 + vite: 5.2.11(@types/node@18.19.33) + vite-node: 1.6.0(@types/node@18.19.33) + why-is-node-running: 2.2.2 + optionalDependencies: + '@types/node': 18.19.33 + transitivePeerDependencies: + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + + webidl-conversions@3.0.1: {} + + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + + which-module@2.0.1: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + why-is-node-running@2.2.2: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + + wrap-ansi@5.1.0: + dependencies: + ansi-styles: 3.2.1 + string-width: 3.1.0 + strip-ansi: 5.2.0 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + y18n@4.0.3: {} + + y18n@5.0.8: {} + + yargs-parser@13.1.2: + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + + yargs-parser@21.1.1: {} + + yargs@13.3.2: + dependencies: + cliui: 5.0.0 + find-up: 3.0.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 3.1.0 + which-module: 2.0.1 + y18n: 4.0.3 + yargs-parser: 13.1.2 + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.1.2 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yocto-queue@1.0.0: {} diff --git a/simulations/stxer.ts b/simulations/stxer.ts new file mode 100644 index 0000000..e4233d8 --- /dev/null +++ b/simulations/stxer.ts @@ -0,0 +1,149 @@ +import { StacksMainnet } from "@stacks/network"; +import { AnchorMode, PostConditionMode, StacksTransaction, boolCV, bufferCV, contractPrincipalCV, listCV, makeUnsignedContractCall, makeUnsignedContractDeploy, principalCV, serializeCV, stringAsciiCV, tupleCV, uintCV } from "@stacks/transactions"; +import { c32addressDecode } from "c32check"; +import fs from "fs"; + +// current beta api endpoint +const SIMULATION_API_ENDPOINT = "https://api.stxer.xyz/simulations"; + +function runTx(tx: StacksTransaction) { + // type 0: run transaction + return tupleCV({ type: uintCV(0), data: bufferCV(tx.serialize()) }); +} + +const common_params = { + network: new StacksMainnet(), + publicKey: "", + postConditionMode: PostConditionMode.Allow, + anchorMode: AnchorMode.Any, + fee: 100, +}; + +function runEval(address: string, contractName: string, code: string) { + // type 1: eval arbitrary code inside a contract + return tupleCV({ + type: uintCV(1), + data: bufferCV( + serializeCV( + tupleCV({ + contract: contractPrincipalCV(address, contractName), + code: stringAsciiCV(code), + }) + ) + ), + }); +} + +async function vote(address: string, nonce: number) { + const [, addressHash] = c32addressDecode(address); + const voteTx1 = await makeUnsignedContractCall({ + contractAddress: "SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH", + contractName: "ccip019-pox-4-stacking", + functionName: "vote-on-proposal", + functionArgs: [boolCV(true)], + nonce: nonce++, + ...common_params, + }); + voteTx1.auth.spendingCondition.signer = addressHash; + return voteTx1; +} + +async function main() { + const block_height = 156894; + const block_hash = "390579d10ed73f98ef829e0068d014d32a6a128e3ba0b80c42321010c61fff1a"; + + // DO NOT sign any transactions you're about to send, this is not required for simulation + let address = "SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH"; + let nonce = 36; + + let [, addressHash] = c32addressDecode(address); + + const deployTx1 = await makeUnsignedContractDeploy({ + contractName: "ccd002-treasury-mia-mining-v3", + codeBody: fs.readFileSync("contracts/extensions/ccd002-treasury-v3.clar").toString(), + nonce: nonce++, + ...common_params, + }); + deployTx1.auth.spendingCondition.signer = addressHash; + + const deployTx2 = await makeUnsignedContractDeploy({ + contractName: "ccd002-treasury-mia-stx-stacking-v3", + codeBody: fs.readFileSync("contracts/extensions/ccd002-treasury-v3.clar").toString(), + nonce: nonce++, + ...common_params, + }); + deployTx2.auth.spendingCondition.signer = addressHash; + + const deployTx3 = await makeUnsignedContractDeploy({ + contractName: "ccip019-pox-4-stacking", + codeBody: fs.readFileSync("contracts/proposals/ccip019-pox-4-stacking.clar").toString(), + nonce: nonce++, + ...common_params, + }); + deployTx3.auth.spendingCondition.signer = addressHash; + + const voteTxs: StacksTransaction[] = []; + + voteTxs.push(await vote("SP3TF26QFS3YMYHC9N3ZZTZQKCM4AFYMVW1WMFRTT", 932)); + voteTxs.push(await vote("SP3W06MK1XP52KTHJB96D04JSBW2NQCA42FFMQZXZ", 565)); + voteTxs.push(await vote("SP2S7Y7BMX7Y73FHV3SV9W1EE63EQ98BE95PZ4C4E", 2486)); + voteTxs.push(await vote("SP1KVKBYWMCK7WSDYS0DDF8R3XT5RD5QKBPQK3SBB", 567)); + voteTxs.push(await vote("SP39XMB07QV4KN4PB6X3KHNQKWARB0F9AXY6K41E0", 626)); + voteTxs.push(await vote("SP1V4BWKPD559WP67GWCV8VR0VRKJ7ESS8WHKYEJP", 905)); + voteTxs.push(await vote("SP3W8BCK1KKJB8H34QA2RWV2Z35E7RNPKEXJSFAF0", 3872)); + voteTxs.push(await vote("SPM3GE47QTMMVBT6DH0XFBXYS1AJHSSAQMYSB4J8", 7706)); + voteTxs.push(await vote("SPN4Y5QPGQA8882ZXW90ADC2DHYXMSTN8VAR8C3X", 802)); + + address = "SP7DGES13508FHRWS1FB0J3SZA326FP6QRMB6JDE"; + [, addressHash] = c32addressDecode(address); + nonce = 120; + const tx1 = await makeUnsignedContractCall({ + contractAddress: "SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH", + contractName: "ccd001-direct-execute", + functionName: "direct-execute", + functionArgs: [principalCV("SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH.ccip019-pox-4-stacking")], + nonce: nonce++, + ...common_params, + }); + tx1.auth.spendingCondition.signer = addressHash; + + address = "SP3YYGCGX1B62CYAH4QX7PQE63YXG7RDTXD8BQHJQ"; + [, addressHash] = c32addressDecode(address); + nonce = 17; + const tx2 = await makeUnsignedContractCall({ + contractAddress: "SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH", + contractName: "ccd001-direct-execute", + functionName: "direct-execute", + functionArgs: [principalCV("SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH.ccip019-pox-4-stacking")], + nonce: nonce++, + ...common_params, + }); + tx2.auth.spendingCondition.signer = addressHash; + + address = "SPN4Y5QPGQA8882ZXW90ADC2DHYXMSTN8VAR8C3X"; + [, addressHash] = c32addressDecode(address); + nonce = 803; + const tx3 = await makeUnsignedContractCall({ + contractAddress: "SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH", + contractName: "ccd001-direct-execute", + functionName: "direct-execute", + functionArgs: [principalCV("SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH.ccip019-pox-4-stacking")], + nonce: nonce++, + ...common_params, + }); + tx3.auth.spendingCondition.signer = addressHash; + + const req = tupleCV({ + block_height: uintCV(block_height), + block_hash: bufferCV(Buffer.from(block_hash, "hex")), + steps: listCV([deployTx1, deployTx2, deployTx3, ...voteTxs, tx1, tx2, tx3].map((t) => runTx(t))), + }); + const body = serializeCV(req); + const rs: any = await fetch(SIMULATION_API_ENDPOINT, { + method: "POST", + body, + }).then((rs) => rs.json()); + console.log("Simulation will be available at: https://stxer.xyz/simulations/" + rs.id); +} + +main().catch(console.error); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..1bdaf36 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,26 @@ + +{ + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ESNext"], + "skipLibCheck": true, + + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + + "strict": true, + "noImplicitAny": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": [ + "node_modules/@hirosystems/clarinet-sdk/vitest-helpers/src", + "tests" + ] +} diff --git a/vitest.config.js b/vitest.config.js new file mode 100644 index 0000000..c6a8506 --- /dev/null +++ b/vitest.config.js @@ -0,0 +1,42 @@ + +/// + +import { defineConfig } from "vite"; +import { vitestSetupFilePath, getClarinetVitestsArgv } from "@hirosystems/clarinet-sdk/vitest"; + +/* + In this file, Vitest is configured so that it works seamlessly with Clarinet and the Simnet. + + The `vitest-environment-clarinet` will initialise the clarinet-sdk + and make the `simnet` object available globally in the test files. + + `vitestSetupFilePath` points to a file in the `@hirosystems/clarinet-sdk` package that does two things: + - run `before` hooks to initialize the simnet and `after` hooks to collect costs and coverage reports. + - load custom vitest matchers to work with Clarity values (such as `expect(...).toBeUint()`) + + The `getClarinetVitestsArgv()` will parse options passed to the command `vitest run --` + - vitest run -- --manifest ./Clarinet.toml # pass a custom path + - vitest run -- --coverage --costs # collect coverage and cost reports +*/ + +export default defineConfig({ + test: { + environment: "clarinet", // use vitest-environment-clarinet + pool: "forks", + poolOptions: { + threads: { singleThread: true }, + forks: { singleFork: true }, + }, + setupFiles: [ + vitestSetupFilePath, + // custom setup files can be added here + ], + environmentOptions: { + clarinet: { + ...getClarinetVitestsArgv(), + // add or override options + }, + }, + }, +}); + From f0987f5a8b3d66bd87fa6a2b29620c00f2678bcc Mon Sep 17 00:00:00 2001 From: friedger Date: Sun, 21 Jul 2024 08:17:45 +0200 Subject: [PATCH 8/9] chore: rename simulation --- simulations/{stxer.ts => stxer-ccip019.ts} | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) rename simulations/{stxer.ts => stxer-ccip019.ts} (87%) diff --git a/simulations/stxer.ts b/simulations/stxer-ccip019.ts similarity index 87% rename from simulations/stxer.ts rename to simulations/stxer-ccip019.ts index e4233d8..328ce68 100644 --- a/simulations/stxer.ts +++ b/simulations/stxer-ccip019.ts @@ -84,15 +84,9 @@ async function main() { const voteTxs: StacksTransaction[] = []; - voteTxs.push(await vote("SP3TF26QFS3YMYHC9N3ZZTZQKCM4AFYMVW1WMFRTT", 932)); - voteTxs.push(await vote("SP3W06MK1XP52KTHJB96D04JSBW2NQCA42FFMQZXZ", 565)); - voteTxs.push(await vote("SP2S7Y7BMX7Y73FHV3SV9W1EE63EQ98BE95PZ4C4E", 2486)); - voteTxs.push(await vote("SP1KVKBYWMCK7WSDYS0DDF8R3XT5RD5QKBPQK3SBB", 567)); - voteTxs.push(await vote("SP39XMB07QV4KN4PB6X3KHNQKWARB0F9AXY6K41E0", 626)); - voteTxs.push(await vote("SP1V4BWKPD559WP67GWCV8VR0VRKJ7ESS8WHKYEJP", 905)); - voteTxs.push(await vote("SP3W8BCK1KKJB8H34QA2RWV2Z35E7RNPKEXJSFAF0", 3872)); - voteTxs.push(await vote("SPM3GE47QTMMVBT6DH0XFBXYS1AJHSSAQMYSB4J8", 7706)); - voteTxs.push(await vote("SPN4Y5QPGQA8882ZXW90ADC2DHYXMSTN8VAR8C3X", 802)); + voteTxs.push(await vote("SP18Z92ZT0GAB2JHD21CZ3KS1WPGNDJCYZS7CV3MD", 524)); + voteTxs.push(await vote("SP34N5WWPHWTVJVYPE368HYDEXMZWKPVF639B3P5T", 978)); + voteTxs.push(await vote("SP1T91N2Y2TE5M937FE3R6DE0HGWD85SGCV50T95A", 243)); address = "SP7DGES13508FHRWS1FB0J3SZA326FP6QRMB6JDE"; [, addressHash] = c32addressDecode(address); @@ -122,7 +116,7 @@ async function main() { address = "SPN4Y5QPGQA8882ZXW90ADC2DHYXMSTN8VAR8C3X"; [, addressHash] = c32addressDecode(address); - nonce = 803; + nonce = 802; const tx3 = await makeUnsignedContractCall({ contractAddress: "SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH", contractName: "ccd001-direct-execute", From 5e04323f17d2cba9476894a243602b590deec506 Mon Sep 17 00:00:00 2001 From: friedger Date: Sun, 21 Jul 2024 08:51:11 +0200 Subject: [PATCH 9/9] fix: add permission to stack for stx rewards treasury --- .../proposals/ccip019-pox-4-stacking.clar | 9 ++- simulations/stxer-ccip019.ts | 76 ++++++++++--------- 2 files changed, 45 insertions(+), 40 deletions(-) diff --git a/contracts/proposals/ccip019-pox-4-stacking.clar b/contracts/proposals/ccip019-pox-4-stacking.clar index b763f4a..d6fc991 100644 --- a/contracts/proposals/ccip019-pox-4-stacking.clar +++ b/contracts/proposals/ccip019-pox-4-stacking.clar @@ -84,9 +84,10 @@ ;; transfer funds to new treasury extensions (try! (contract-call? .ccd002-treasury-mia-mining-v2 withdraw-stx miaBalance .ccd002-treasury-mia-mining-v3)) - ;; delegate stack the STX in the mining treasuries (up to 50M STX each) + ;; delegate stack the STX in the mining and rewards treasuries (up to 50M STX each) ;; MAINNET: SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP.pox4-fast-pool-v3 (try! (contract-call? .ccd002-treasury-mia-mining-v3 delegate-stx u50000000000000 'SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP.pox4-fast-pool-v3)) + (try! (contract-call? .ccd002-treasury-mia-stx-stacking-v3 delegate-stx u50000000000000 'SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP.pox4-fast-pool-v3)) ;; add treasuries to ccd005-city-data (try! (contract-call? .ccd005-city-data add-treasury miaId .ccd002-treasury-mia-mining-v3 "mining-v3")) @@ -129,7 +130,7 @@ (miaVoteAmount (scale-down (default-to u0 (get-mia-vote voterId true)))) ) ;; check that the user has a positive vote - (asserts! (or (> miaVoteAmount u0)) ERR_NOTHING_STACKED) + (asserts! (> miaVoteAmount u0) ERR_NOTHING_STACKED) ;; insert new user vote record (asserts! (map-insert UserVotes voterId { vote: vote, @@ -225,12 +226,12 @@ ;; MAINNET: mia cycle 82 / first block BTC 838,250 STX 145,643 ;; cycle 2 / u4500 used in tests (cycle82Hash (unwrap! (get-block-hash u145643) none)) - (cycle82Data (at-block cycle82Hash (contract-call? .ccd007-citycoin-stacking get-stacker MIA_ID u2 userId))) + (cycle82Data (at-block cycle82Hash (contract-call? .ccd007-citycoin-stacking get-stacker MIA_ID u82 userId))) (cycle82Amount (get stacked cycle82Data)) ;; MAINNET: mia cycle 83 / first block BTC 840,350 STX 147,282 ;; cycle 3 / u6600 used in tests (cycle83Hash (unwrap! (get-block-hash u147282) none)) - (cycle83Data (at-block cycle83Hash (contract-call? .ccd007-citycoin-stacking get-stacker MIA_ID u3 userId))) + (cycle83Data (at-block cycle83Hash (contract-call? .ccd007-citycoin-stacking get-stacker MIA_ID u83 userId))) (cycle83Amount (get stacked cycle83Data)) ;; mia vote calculation (scaledVote (/ (+ (scale-up cycle82Amount) (scale-up cycle83Amount)) u2)) diff --git a/simulations/stxer-ccip019.ts b/simulations/stxer-ccip019.ts index 328ce68..b7ce747 100644 --- a/simulations/stxer-ccip019.ts +++ b/simulations/stxer-ccip019.ts @@ -1,5 +1,5 @@ import { StacksMainnet } from "@stacks/network"; -import { AnchorMode, PostConditionMode, StacksTransaction, boolCV, bufferCV, contractPrincipalCV, listCV, makeUnsignedContractCall, makeUnsignedContractDeploy, principalCV, serializeCV, stringAsciiCV, tupleCV, uintCV } from "@stacks/transactions"; +import { AnchorMode, PostConditionMode, SignedTokenTransferOptions, StacksTransaction, boolCV, bufferCV, contractPrincipalCV, listCV, makeSTXTokenTransfer, makeUnsignedContractCall, makeUnsignedContractDeploy, makeUnsignedSTXTokenTransfer, principalCV, serializeCV, stringAsciiCV, tupleCV, uintCV } from "@stacks/transactions"; import { c32addressDecode } from "c32check"; import fs from "fs"; @@ -48,9 +48,23 @@ async function vote(address: string, nonce: number) { return voteTx1; } +async function directExecute(address: string, nonce: number) { + const [, addressHash] = c32addressDecode(address); + const voteTx1 = await makeUnsignedContractCall({ + contractAddress: "SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH", + contractName: "ccd001-direct-execute", + functionName: "direct-execute", + functionArgs: [principalCV("SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH.ccip019-pox-4-stacking")], + nonce: nonce++, + ...common_params, + }); + voteTx1.auth.spendingCondition.signer = addressHash; + return voteTx1; +} + async function main() { - const block_height = 156894; - const block_hash = "390579d10ed73f98ef829e0068d014d32a6a128e3ba0b80c42321010c61fff1a"; + const block_height = 157894; + const block_hash = "5e584e604a8caffc476be973562f4ad05231cecb70f3ede3af110986dffee4cf"; // DO NOT sign any transactions you're about to send, this is not required for simulation let address = "SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH"; @@ -84,53 +98,43 @@ async function main() { const voteTxs: StacksTransaction[] = []; - voteTxs.push(await vote("SP18Z92ZT0GAB2JHD21CZ3KS1WPGNDJCYZS7CV3MD", 524)); - voteTxs.push(await vote("SP34N5WWPHWTVJVYPE368HYDEXMZWKPVF639B3P5T", 978)); - voteTxs.push(await vote("SP1T91N2Y2TE5M937FE3R6DE0HGWD85SGCV50T95A", 243)); + voteTxs.push(await vote("SP18Z92ZT0GAB2JHD21CZ3KS1WPGNDJCYZS7CV3MD", 529)); + voteTxs.push(await vote("SP34N5WWPHWTVJVYPE368HYDEXMZWKPVF639B3P5T", 982)); + voteTxs.push(await vote("SP1T91N2Y2TE5M937FE3R6DE0HGWD85SGCV50T95A", 245)); - address = "SP7DGES13508FHRWS1FB0J3SZA326FP6QRMB6JDE"; - [, addressHash] = c32addressDecode(address); - nonce = 120; - const tx1 = await makeUnsignedContractCall({ - contractAddress: "SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH", - contractName: "ccd001-direct-execute", - functionName: "direct-execute", - functionArgs: [principalCV("SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH.ccip019-pox-4-stacking")], - nonce: nonce++, - ...common_params, - }); - tx1.auth.spendingCondition.signer = addressHash; + const executeTxs: StacksTransaction[] = []; + executeTxs.push(await directExecute("SP7DGES13508FHRWS1FB0J3SZA326FP6QRMB6JDE", 122)); + executeTxs.push(await directExecute("SP3YYGCGX1B62CYAH4QX7PQE63YXG7RDTXD8BQHJQ", 17)); + executeTxs.push(await directExecute("SPN4Y5QPGQA8882ZXW90ADC2DHYXMSTN8VAR8C3X", 803)); - address = "SP3YYGCGX1B62CYAH4QX7PQE63YXG7RDTXD8BQHJQ"; - [, addressHash] = c32addressDecode(address); - nonce = 17; - const tx2 = await makeUnsignedContractCall({ - contractAddress: "SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH", - contractName: "ccd001-direct-execute", - functionName: "direct-execute", - functionArgs: [principalCV("SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH.ccip019-pox-4-stacking")], + address = "SPN4Y5QPGQA8882ZXW90ADC2DHYXMSTN8VAR8C3X"; + nonce = 804; + const transferStxTx = await makeUnsignedSTXTokenTransfer({ + amount: 10000000, + recipient: "SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH.ccd002-treasury-mia-stx-stacking-v3", nonce: nonce++, ...common_params, }); - tx2.auth.spendingCondition.signer = addressHash; + [, addressHash] = c32addressDecode(address); + transferStxTx.auth.spendingCondition.signer = addressHash; address = "SPN4Y5QPGQA8882ZXW90ADC2DHYXMSTN8VAR8C3X"; - [, addressHash] = c32addressDecode(address); - nonce = 802; - const tx3 = await makeUnsignedContractCall({ - contractAddress: "SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH", - contractName: "ccd001-direct-execute", - functionName: "direct-execute", - functionArgs: [principalCV("SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH.ccip019-pox-4-stacking")], + nonce = 805; + const lockStxTx = await makeUnsignedContractCall({ + contractAddress: "SP21YTSM60CAY6D011EZVEVNKXVW8FVZE198XEFFP", + contractName: "pox4-fast-pool-v3", + functionName: "delegate-stack-stx-many", + functionArgs: [listCV([principalCV("SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH.ccd002-treasury-mia-mining-v3"), principalCV("SP8A9HZ3PKST0S42VM9523Z9NV42SZ026V4K39WH.ccd002-treasury-mia-stx-stacking-v3")])], nonce: nonce++, ...common_params, }); - tx3.auth.spendingCondition.signer = addressHash; + [, addressHash] = c32addressDecode(address); + lockStxTx.auth.spendingCondition.signer = addressHash; const req = tupleCV({ block_height: uintCV(block_height), block_hash: bufferCV(Buffer.from(block_hash, "hex")), - steps: listCV([deployTx1, deployTx2, deployTx3, ...voteTxs, tx1, tx2, tx3].map((t) => runTx(t))), + steps: listCV([deployTx1, deployTx2, deployTx3, ...voteTxs, ...executeTxs, transferStxTx, lockStxTx].map((t) => runTx(t))), }); const body = serializeCV(req); const rs: any = await fetch(SIMULATION_API_ENDPOINT, {