Augmented Bond Curves
ABCs are cool! This will try and implement much of what is in this excellent blog post.
To do:
- [x] Add max supply option
- [x] Update curve
- [x] Update max supply
- [x] Close bonding curve (only sell)
- [x] MinMax contribution amounts for hatching
- [x] Fix token metadata so that it's set correctly
- [x] Test allowlist
- [x] Test close curve
- [x] Test update curve
- [x] Test update max supply
- [x] Factory contract for creating cw-abc DAOs
- [ ] Curve type validation
- [ ] Move related contracts to
experimentalfolder
Bonus:
- [ ] Move curves into a new
cw-curvespackage - [ ] Add more curves (Taylor Series. S-Curve, Piecewise Linear)
- [ ] Extend allowlist options (i.e. keep existing list, but add a query to check if an address is a member of a DAO)
doing G-d's work, Ser! 👏
Codecov Report
Patch coverage: 56.01% and project coverage change: -2.34 :warning:
Comparison is base (
0367c84) 93.97% compared to head (1ac6a88) 91.64%.
Additional details and impacted files
@@ Coverage Diff @@
## development #697 +/- ##
===============================================
- Coverage 93.97% 91.64% -2.34%
===============================================
Files 62 68 +6
Lines 5596 5962 +366
===============================================
+ Hits 5259 5464 +205
- Misses 337 498 +161
| Impacted Files | Coverage Δ | |
|---|---|---|
| contracts/external/cw-abc/src/queries.rs | 31.42% <31.42%> (ø) |
|
| contracts/external/cw-abc/src/commands.rs | 38.75% <38.75%> (ø) |
|
| contracts/external/cw-abc/src/abc.rs | 47.14% <47.14%> (ø) |
|
| contracts/external/cw-abc/src/contract.rs | 65.00% <65.00%> (ø) |
|
| contracts/external/cw-abc/src/curves.rs | 100.00% <100.00%> (ø) |
|
| contracts/external/cw-abc/src/state.rs | 100.00% <100.00%> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Codecov Report
Attention: 519 lines in your changes are missing coverage. Please review.
Comparison is base (
95e4f73) 96.25% compared to head (d10fff4) 94.85%. Report is 1 commits behind head on development.
Additional details and impacted files
@@ Coverage Diff @@
## development #697 +/- ##
===============================================
- Coverage 96.25% 94.85% -1.40%
===============================================
Files 203 212 +9
Lines 50082 51289 +1207
===============================================
+ Hits 48207 48651 +444
- Misses 1875 2638 +763
| Files | Coverage Δ | |
|---|---|---|
| contracts/external/cw-abc/src/error.rs | 100.00% <100.00%> (ø) |
|
| contracts/external/cw-abc/src/testing.rs | 100.00% <100.00%> (ø) |
|
| contracts/external/cw-abc/src/curves.rs | 99.53% <99.53%> (ø) |
|
| contracts/external/cw-abc/src/state.rs | 90.90% <90.90%> (ø) |
|
| contracts/external/cw-abc/src/msg.rs | 0.00% <0.00%> (ø) |
|
| contracts/external/cw-abc/src/abc.rs | 31.77% <31.77%> (ø) |
|
| contracts/external/cw-abc/src/queries.rs | 0.00% <0.00%> (ø) |
|
| contracts/external/cw-abc/src/contract.rs | 23.46% <23.46%> (ø) |
|
| contracts/external/cw-abc/src/commands.rs | 28.72% <28.72%> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Welcome to Codecov :tada:
Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.
Thanks for integrating Codecov - We've got you covered :open_umbrella:
Welcome to Codecov :tada:
Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.
Thanks for integrating Codecov - We've got you covered :open_umbrella:
For the cw-curves package it may be worth looking and the Wynd DAO implementation: https://github.com/wynddao/wynddao/blob/main/packages/utils/src/curve.rs
Probably some useful stuff in there. Would be nice to have a solid curves package.