Skip to content

Conversation

@whoabuddy
Copy link
Contributor

@whoabuddy whoabuddy commented Mar 26, 2025

Work completed:

Left off:

  • add read-only tests for timed-vault contracts
  • create matching timed-vault core proposals
  • verify all default amounts and ranges are correct moved to Verify default and range limits for timed-vault contracts #55
  • implement same pattern for aibtc-payments-invoices (renaming to aibtc-payment-processor-TOKEN)
  • create v3 of traits file (needs to be deployed)

Breaking changes:

  • c81c269 renamed aibtc-action-allow-asset to aibtc-action-treasury-allow-asset
  • c81c269 removed aibtc-action-set-account-holder
  • c81c269 removed aibtc-action-set-withdrawal-amount
  • c81c269 removed aibtc-action-set-withdrawal-period
  • 666cd0b converted aibtc-timed-vault to 3 versions -stx -sbtc and -dao
    • there will be one timed vault per token at launch, single purpose for each, single account holder
  • 666cd0b converted aibtc-action-configure-timed-vault to 3 versions -stx -sbtc and -dao
    • same for types, tests, etc, everything gets a matching version now
  • 22e2528 changed timed-vault deposit-stx to deposit and withdraw-stx to withdraw
    • simplifies trait definition, testing, tooling, etc. amount is always in micro-units for deposit.
  • 514bf47 aibtc-payments-invoices removed, replaced with aibtc-payment-processor- variants
  • 122a367 78225e0 using -pmt- shorthand for payment processor in longer contract names
  • 1494750 implemented new traits for all contracts: aibtc-dao-v3, aibtc-dao-traits-v3, and aibtc-smart-wallet-v2
  • 45421eb changed treasury allow-assets to return (ok true) when complete
  • e7bae81 return type for get-total-proposals() is now a tuple: { total: uint, concluded: uint, executed: uint }

@codecov
Copy link

codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 92.07792% with 61 lines in your changes missing coverage. Please review.

Project coverage is 70.21%. Comparing base (4170468) to head (25c267f).
Report is 95 commits behind head on main.

Files with missing lines Patch % Lines
...ts/dao/extensions/aibtc-payment-processor-dao.clar 89.41% 17 Missing and 1 partial ⚠️
...s/dao/extensions/aibtc-payment-processor-sbtc.clar 89.41% 17 Missing and 1 partial ⚠️
...ontracts/dao/extensions/aibtc-timed-vault-dao.clar 88.88% 7 Missing ⚠️
...ntracts/dao/extensions/aibtc-timed-vault-sbtc.clar 88.88% 7 Missing ⚠️
...ts/dao/extensions/aibtc-payment-processor-stx.clar 60.00% 2 Missing ⚠️
...ctions/aibtc-action-configure-timed-vault-dao.clar 96.55% 1 Missing ⚠️
...tions/aibtc-action-configure-timed-vault-sbtc.clar 96.55% 1 Missing ⚠️
...ctions/aibtc-action-configure-timed-vault-stx.clar 96.55% 1 Missing ⚠️
...ns/actions/aibtc-action-pmt-sbtc-add-resource.clar 92.30% 1 Missing ⚠️
...ons/actions/aibtc-action-pmt-stx-add-resource.clar 92.30% 1 Missing ⚠️
... and 4 more
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main      #36       +/-   ##
===========================================
+ Coverage   57.23%   70.21%   +12.98%     
===========================================
  Files          60       84       +24     
  Lines        2268     2911      +643     
  Branches      335      429       +94     
===========================================
+ Hits         1298     2044      +746     
+ Misses        962      861      -101     
+ Partials        8        6        -2     
Files with missing lines Coverage Δ
contracts/aibtc-user-agent-smart-wallet.clar 92.37% <100.00%> (ø)
contracts/dao/aibtc-base-dao.clar 76.66% <ø> (ø)
...ons/actions/aibtc-action-pmt-dao-add-resource.clar 92.30% <100.00%> (ø)
.../actions/aibtc-action-pmt-dao-toggle-resource.clar 100.00% <100.00%> (ø)
...actions/aibtc-action-pmt-sbtc-toggle-resource.clar 100.00% <100.00%> (ø)
.../actions/aibtc-action-pmt-stx-toggle-resource.clar 100.00% <100.00%> (ø)
.../extensions/actions/aibtc-action-send-message.clar 100.00% <ø> (ø)
...ons/actions/aibtc-action-treasury-allow-asset.clar 100.00% <ø> (ø)
...acts/dao/extensions/aibtc-action-proposals-v2.clar 95.62% <100.00%> (+0.12%) ⬆️
contracts/dao/extensions/aibtc-dao-charter.clar 81.39% <ø> (ø)
... and 69 more

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

whoabuddy added 26 commits April 2, 2025 16:17
Will replace the other three, waiting until tested.
We can use the (and) short circuit to just make the call or not, but the print event and message would go through so better to fail here and let (ok false) propagate in the conclude tx.
Single describe block, it with function name
whoabuddy added 21 commits April 4, 2025 18:14
Also caught one more spot to remove old payments-invoices code.
This is really a band-aid to make sure the check looks at all other contracts files, it excludes the trait directory by default for the dao but the smart wallet trait lives next to the file. Probably some reorg of the files can fix this but for now the test will just exclude matching a test file for any contract name that includes "traits".
Since we print the allow-asset event for each allowed we can simplify this, the return type using map over the private function and the trait were not lining up.
@whoabuddy whoabuddy changed the title Final additions before code freeze Combine timed vault actions, fully support sbtc and dao tokens Apr 6, 2025
@whoabuddy whoabuddy merged commit e9f6460 into main Apr 7, 2025
3 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in AIBTC Sprint Board Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

2 participants