Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit a539980
Merge: 5631670 b3b2ce7
Author: ismellike <glopez11193@gmail.com>
Date:   Wed Sep 18 10:29:49 2024 -0500

    Merge branch 'pr/cw-orch-interface' into improvements/cw-abc

commit b3b2ce7
Author: ismellike <glopez11193@gmail.com>
Date:   Wed Sep 18 10:14:18 2024 -0500

    Update osmosis-test-tube to match cw-orch

commit 5631670
Author: ismellike <glopez11193@gmail.com>
Date:   Tue Sep 17 15:25:57 2024 -0500

    Cleanup dao-testing

commit 5dc69ca
Author: ismellike <glopez11193@gmail.com>
Date:   Tue Sep 17 12:42:11 2024 -0500

    Update schemas

commit b84971c
Author: ismellike <glopez11193@gmail.com>
Date:   Tue Sep 17 12:06:36 2024 -0500

    Return result in to_curve_fn

commit 9dd313e
Author: ismellike <glopez11193@gmail.com>
Date:   Tue Sep 17 11:14:43 2024 -0500

    Improved queries, tests, and error handling on cw-abc

commit 848cecd
Merge: 85654cf 455880f
Author: ismellike <glopez11193@gmail.com>
Date:   Tue Sep 17 09:27:32 2024 -0500

    Merge branch 'cw-abc' into improvements/cw-abc

commit 85654cf
Author: ismellike <glopez11193@gmail.com>
Date:   Tue Sep 10 05:37:43 2024 -0500

    Added cw_orch fn_name for proposal executes

    follows the same naming as `dao_proposal_sudo` execute

commit 685211d
Author: Jake Hartnell <no@no-reply.no>
Date:   Wed Aug 14 17:59:24 2024 -0400

    Fix removing uninstalled packages

commit a9efb44
Author: Jake Hartnell <no@no-reply.no>
Date:   Wed Aug 14 17:57:36 2024 -0400

    Attempt to free up more disk space

commit 6660b23
Author: Jake Hartnell <no@no-reply.no>
Date:   Wed Aug 14 17:52:42 2024 -0400

    Attempt to free up disk space

commit 3990e13
Author: hard-nett <hardnettt@proton.me>
Date:   Thu Jul 25 02:08:47 2024 +0000

    dao cw-orch interface

commit 0cc80ce
Author: hard-nett <hardnettt@proton.me>
Date:   Thu Jul 25 00:42:30 2024 +0000

    cw-orch test suite for contracts

commit c255d1e
Author: Gabe <glopez11193@gmail.com>
Date:   Wed Jul 24 11:58:59 2024 -0500

    Exclude scripts from workspace

commit 06bca64
Author: Gabe <glopez11193@gmail.com>
Date:   Wed Jul 24 10:37:57 2024 -0500

    Update external.rs

commit 0ae02a1
Author: Gabe <glopez11193@gmail.com>
Date:   Wed Jul 24 10:34:31 2024 -0500

    Remove dao-interface-master from scripts

commit f5b9df5
Author: hard-nett <hardnettt@proton.me>
Date:   Wed Jul 24 22:49:38 2024 +0000

    cargo lock

commit ed3020d
Author: hard-nett <hardnettt@proton.me>
Date:   Wed Jul 24 20:20:20 2024 +0000

    bump ismellike cleanups

commit 3bdf843
Author: hard-nett <hardnettt@proton.me>
Date:   Wed Jul 24 15:42:12 2024 +0000

    lint

commit cad9837
Author: hard-nett <hardnettt@proton.me>
Date:   Wed Jul 24 15:27:45 2024 +0000

    remove tf issuer init for now

commit 73fe8c8
Author: Gabe <glopez11193@gmail.com>
Date:   Wed Jul 24 01:22:53 2024 -0500

    Clippy fixes

commit dc43643
Author: Gabe <glopez11193@gmail.com>
Date:   Tue Jul 23 17:12:34 2024 -0500

    Update integration_tests.yml

commit 9e36aed
Author: Gabe <glopez11193@gmail.com>
Date:   Tue Jul 23 16:00:04 2024 -0500

    Fix tokio dependency

commit 0bb200e
Author: hard-nett <hardnettt@proton.me>
Date:   Tue Jul 23 23:28:10 2024 +0000

    cleanup script imports

commit 776ebe3
Author: hard-nett <hardnettt@proton.me>
Date:   Tue Jul 23 23:08:05 2024 +0000

    good btsg cw-orch bump

commit 3b14168
Author: hard-nett <hardnettt@proton.me>
Date:   Tue Jul 23 23:06:45 2024 +0000

    bump

commit bf0b668
Author: hard-nett <hardnettt@proton.me>
Date:   Tue Jul 23 22:47:45 2024 +0000

    bump correct init

commit f2570de
Author: hard-nett <hardnettt@proton.me>
Date:   Tue Jul 23 21:37:15 2024 +0000

    correct import

commit 65091bd
Author: hard-nett <hardnettt@proton.me>
Date:   Tue Jul 23 21:23:30 2024 +0000

    add btsg-ft-factory to cw-orch setup

commit e836dd1
Author: Gabe <glopez11193@gmail.com>
Date:   Tue Jul 23 11:09:32 2024 -0500

    Add more payable flags + distribution contracts to external

commit 79f7052
Author: Gabe <glopez11193@gmail.com>
Date:   Mon Jul 22 17:13:40 2024 -0500

    Add orch payable flag to dao-voting-token-staked stake

commit 713366d
Author: Gabe <glopez11193@gmail.com>
Date:   Mon Jul 22 17:10:45 2024 -0500

    Squashed commit of the following:

    commit f0dceb1
    Author: noah <noahsaso@gmail.com>
    Date:   Mon Jul 22 14:48:52 2024 -0400

        replaced todo with descriptive error (DA0-DA0#858)

    commit aa0fa5f
    Author: noah <noahsaso@gmail.com>
    Date:   Mon Jul 22 14:48:45 2024 -0400

        reorganized publish more (DA0-DA0#857)

    commit cf86aed
    Author: noah <noahsaso@gmail.com>
    Date:   Mon Jul 22 13:51:46 2024 -0400

        added pre-propose v2.4.1 migration tests (DA0-DA0#856)

    commit be861a8
    Author: Jake Hartnell <Jake.Hartnell@gmail.com>
    Date:   Mon Jul 22 19:45:58 2024 +0200

        Add new contracts to publishing script. (DA0-DA0#853)

    commit 71dd109
    Author: noah <noahsaso@gmail.com>
    Date:   Mon Jul 22 03:56:52 2024 -0400

        updated migrate versions (DA0-DA0#855)

    commit 7e6f5ce
    Author: noah <noahsaso@gmail.com>
    Date:   Mon Jul 22 03:54:17 2024 -0400

        started adding pre-propose migration to v2.5.0 (DA0-DA0#854)

    commit 7646730
    Author: bekauz <bekauz@protonmail.com>
    Date:   Mon Jul 22 09:43:58 2024 +0200

        DAO rewards distributor emission rate updates (DA0-DA0#848)

    commit ce946ac
    Author: noah <noahsaso@gmail.com>
    Date:   Fri Jul 19 16:23:14 2024 -0400

        add info query to pre-propose-base (DA0-DA0#852)

    commit ebc7914
    Author: noah <noahsaso@gmail.com>
    Date:   Thu Jul 18 13:12:14 2024 -0400

        Support instantiate2 in `cw-admin-factory` (DA0-DA0#851)

    commit 8c37b9e
    Author: noah <noahsaso@gmail.com>
    Date:   Wed Jul 17 16:03:09 2024 -0400

        BitSong fantoken factory (DA0-DA0#845)

commit 9cea2d1
Author: hard-nett <hardnettt@proton.me>
Date:   Tue Jul 23 20:38:00 2024 +0000

    add external contract cw-orch suites

commit 2478f28
Author: hard-nett <hardnettt@proton.me>
Date:   Mon Jul 22 16:35:28 2024 +0000

    bump /external

commit c5995c0
Author: Gabe <glopez11193@gmail.com>
Date:   Fri Jul 19 12:08:16 2024 -0500

    Revert basic.yml

    i think caching is causing issues with the cargo.lock

commit 48c0067
Author: Gabe <glopez11193@gmail.com>
Date:   Fri Jul 19 12:06:17 2024 -0500

    Lint + not(target_arch = "wasm32") in lib.rs

commit 1d68601
Author: Gabe <glopez11193@gmail.com>
Date:   Fri Jul 19 02:40:02 2024 -0500

    Update to cw-orch .24.1

commit bcbaa7e
Author: Gabriel Lopez <glopez11193@gmail.com>
Date:   Thu Jul 18 20:56:03 2024 -0500

    Revert integration_tests.yml

commit ae81938
Author: Gabriel Lopez <glopez11193@gmail.com>
Date:   Wed Jul 17 13:18:11 2024 -0500

    Update basic.yml to cache only cargo deps

    Nightly toolchain is required for integration_tests

commit a90d77c
Author: Gabriel Lopez <glopez11193@gmail.com>
Date:   Wed Jul 17 12:45:09 2024 -0500

    Set integration_tests toolchain to latest stable

commit 485b7f7
Author: hard-nett <hardnettt@proton.me>
Date:   Sat Jul 13 18:53:38 2024 +0000

    add cw-orch to external contract

commit 449e481
Author: Gabriel Lopez <glopez11193@gmail.com>
Date:   Thu Jul 11 02:21:52 2024 -0500

    Cargo schema + fix orch wasm build and tests

commit 5ccaa5e
Author: Gabriel Lopez <glopez11193@gmail.com>
Date:   Thu Jul 11 00:40:32 2024 -0500

    Fix cargo stuff

commit 3ff1cc7
Author: Gabriel Lopez <glopez11193@gmail.com>
Date:   Wed Jul 10 23:47:50 2024 -0500

    Add cache to basic.yml

commit 2c4db48
Author: Gabriel Lopez <glopez11193@gmail.com>
Date:   Wed Jul 10 23:47:40 2024 -0500

    Fix lints

    Also updates just lint to match basic.yml

commit 1cce2ea
Author: Kayanski <kowalski.kowalskin@gmail.com>
Date:   Fri May 17 09:09:32 2024 +0000

    Added other derives

commit 7bf054c
Author: Kayanski <kowalski.kowalskin@gmail.com>
Date:   Fri May 17 09:06:45 2024 +0000

    Added derive fns

commit 302b1aa
Author: Kayanski <kowalski.kowalskin@gmail.com>
Date:   Fri May 17 08:54:07 2024 +0000

    Fix tests

commit 7999ce8
Author: Kayanski <kowalski.kowalskin@gmail.com>
Date:   Fri May 17 08:52:54 2024 +0000

    Added Queryfns on voting

commit d06b377
Author: Kayanski <kowalski.kowalskin@gmail.com>
Date:   Fri May 17 08:06:38 2024 +0000

    Finalize test changes

commit 364d12d
Author: Kayanski <kowalski.kowalskin@gmail.com>
Date:   Fri May 17 07:40:35 2024 +0000

    More tests

commit 5fa3d44
Author: Kayanski <kowalski.kowalskin@gmail.com>
Date:   Thu May 16 17:24:41 2024 +0000

    Added tests with cw-orch

commit 75d7492
Author: Kayanski <kowalski.kowalskin@gmail.com>
Date:   Thu May 16 14:41:02 2024 +0000

    First test modifications

commit 455880f
Author: ismellike <glopez11193@gmail.com>
Date:   Mon May 20 13:06:39 2024 -0500

    Fix issue with instantiating cw-abc with hatchers (DA0-DA0#830)

    allow self to call method

commit f656e8a
Author: ismellike <glopez11193@gmail.com>
Date:   Tue May 14 13:44:13 2024 -0500

    ABC Improvements (DA0-DA0#818)

    * Make hatcher_allowlist a map

    Also cleans up state when going from Hatch -> Open
    Various spell-checking fixes

    * Allow existing tokens to be used with ABC's

    I think it's important for an existing token to be supported by an ABC.
    Token DAO's will be able to set up liquidity more easily by simply allowing mint & burn functionality after instantiating the ABC while holding ownership of it.

    *Also adds a query for hatcher allowlist
    *fixes spell checks I ran into
    *moves TokenInfo from dao-voting-token-staked to dao-interface for use in cw-abc

    * Complete funding pool logic

    Renamed fees_recipient to funding_pool_forwarding for better naming
    Made funding_pool_forwarding optional
    Allow updating the funding_pool_forwarding by owner
    Allow withdrawing from the funding pool by owner

    * Implement a circuit breaker

    Adds IS_PAUSED state that is checked in execute entry
    Also fixes naming in commands

    * Add query for initial supply at ABC creation

    * Allow donation into the reserve pool

    Also fixes donation state being lost after multiple donations

    * Move cw-abc curves to its own package cw-curves

    * Improve validation for max_supply

    * Support DAO membership in hatcher allowlist

    Could use a test here
    Also fixes some warnings and flag for cw-std

    * Clippy fix

    * Only clone decimals from curve_state

    also reorg buy command to be closer to sell command for readability

    * QoL improvements

    Derive copy on DecimalPlaces
    Catch OverflowError directly in ContractError
    Do not set initial supply as supply - will further remove allowing initial supplies

    * Revert support for initial supply

    * Fix clippy unnecessary clones

    * Donate only into the funding pool

    * Add a test for donate and withdraw from funding pool

    * Add test for dao hatchers + update schemas

    Also removes unused deps from cw-abc which now live in cw-curves

    * Update Cargo.toml

    * Buy & Sell Quotes

    Let users know the curve state and returned amount after x payment

    * Complete DAO hatchers w/ priority queue

    Disallow selling in the hatch phase
    Do not validate max_contribution against max_raise

    * Fix priority queue ordering on ties

    also clippy fixes

    * Couple more clippy fixes

commit 6d4b430
Author: Jake Hartnell <no@no-reply.no>
Date:   Tue Mar 26 14:35:44 2024 +0100

    Post rebase fixups

commit 6ab116d
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Mon Jan 8 16:52:52 2024 -0800

    Clean up small TODO

commit 371d724
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Mon Jan 8 15:36:58 2024 -0800

    Remove unused deps

commit 7e923ef
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Tue Jan 2 22:51:51 2024 -0800

    Bump nightly version in CI

commit a0eb619
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Tue Jan 2 20:44:12 2024 -0800

    Fix clippy errors and test errors

commit 301b45a
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Fri Dec 29 14:07:42 2023 -0800

    Basic Integration Tests

commit 389484f
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Sat Dec 23 15:19:18 2023 -0800

    Fix wasm build

commit 4d4d70e
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Sat Dec 23 14:45:14 2023 -0800

    dao-abc-factory contract

    Creates new cw-abc DAOs.

commit 02e26e0
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Sat Dec 23 13:13:06 2023 -0800

    Remove token-bindings dep

commit 00b80d9
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Sat Dec 23 13:09:40 2023 -0800

    Fix cargo file after rebase

commit 9d069eb
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Tue Dec 12 14:46:50 2023 -0800

    Remove unused old tests

commit 84811db
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Tue Dec 12 14:41:41 2023 -0800

    Remove TokenFactoryMsg and TokenFactoryQuery, no token-bindings dep

commit 33927a1
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Tue Dec 12 14:30:03 2023 -0800

    More queries, update schema

commit 71832ce
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Wed Dec 6 13:01:57 2023 -0800

    Rename variables to make them more consistent and understandable

commit 0db6203
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Wed Dec 6 12:49:34 2023 -0800

    Add more information to the readme

commit 5be336a
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Tue Dec 5 17:16:41 2023 -0800

    Update schema

commit 9c8768e
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Tue Dec 5 17:09:04 2023 -0800

    Fix exit fees

commit 4080c01
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Tue Dec 5 16:15:38 2023 -0800

    Bug fixes, implement fees

commit c882469
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Mon Dec 4 18:33:27 2023 -0800

    to_binary -> to_json_binary

commit be5cc1e
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Mon Dec 4 17:47:32 2023 -0800

    Next pass at adding info to readme

commit f3b1216
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Mon Nov 20 14:54:14 2023 +0100

    Attempt at update curve tests

commit 60d7f61
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Mon Nov 20 14:25:21 2023 +0100

    More tests!

commit 69cd33b
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Mon Nov 20 14:02:37 2023 +0100

    Fix some tests

commit 8ef65d8
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Fri Nov 17 17:35:11 2023 +0100

    Update schema

commit 638b102
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Fri Nov 17 16:59:19 2023 +0100

    Rename methods, cleanup unused variables

commit 9e70057
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Fri Nov 17 16:54:59 2023 +0100

    Close curve, update curve, set max supply methods

commit 30dd7a5
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Fri Nov 17 14:36:50 2023 +0100

    Clean up, add notes for future work

commit 9f39048
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Thu Nov 16 17:11:11 2023 +0100

    Max Supply

commit ea21f4f
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Thu Nov 16 16:47:40 2023 +0100

    Contribution limits

commit 5fc2de8
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Thu Nov 16 15:04:37 2023 +0100

    Refactor update phase config, fix metadata, clean up

commit ecdfb9d
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Sun Nov 12 22:19:51 2023 +0100

    Happy path test, make notes

commit 4930042
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Thu Nov 9 15:56:33 2023 +0100

    Clean up, clippy, workspace deps, notes

commit 8985177
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Mon Nov 6 15:57:42 2023 +0100

    Note

commit b5c173b
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Mon Nov 6 15:57:29 2023 +0100

    Attempt to fix burn

commit 6f80580
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Thu Nov 2 18:12:32 2023 +0100

    More cleanup for clippy

commit b7247f4
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Mon Oct 30 20:39:43 2023 +0100

    Rebase cleanup, fix up tests

commit fc19b74
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Fri Sep 1 13:38:46 2023 -0700

    Fixups, burning tokens still doesn't work

commit 50eff27
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Thu Aug 31 09:21:13 2023 -0700

    Minting tokens works!

commit 93f16f6
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Wed Aug 30 18:40:08 2023 -0700

    Fix tests, need to investigate why this broke

commit 7d6b600
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Wed Aug 30 17:39:24 2023 -0700

    Get instantiation working with test-tube

commit 2f6bba4
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Wed Aug 30 17:09:25 2023 -0700

    Get test-tube tests running

commit fc5d5d6
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Wed Aug 30 16:23:14 2023 -0700

    Clean up and notes

commit a72ad95
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Wed Aug 30 16:22:59 2023 -0700

    Update schema

commit 988cf5d
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Wed Aug 30 16:05:01 2023 -0700

    Refactor

commit f05541b
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Wed Aug 30 15:31:27 2023 -0700

    Remove old attempt at fixing cw-multi-test

commit df6ebad
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Wed Aug 30 15:30:44 2023 -0700

    Refactor cw-abc contract to work with cw-tokenfactory-issuer

commit 98b0203
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Wed Aug 30 14:46:07 2023 -0700

    Start prepping for refactor and tests

commit 3b4965a
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Thu Aug 10 21:54:37 2023 +0200

    Attempt to get tests working

commit 84244ed
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Sun Jul 9 18:24:19 2023 +0200

    Remove boot / cw-orch, get cw-multi-test working with custom messages

commit 6097ea4
Author: Dat-Andre <114091333+Dat-Andre@users.noreply.github.com>
Date:   Mon May 8 22:17:13 2023 +0100

    697 (DA0-DA0#702)

    * update cw-orch dependency

    * add getrandom dependency to .toml

    ---------

    Co-authored-by: Jake Hartnell <Jake.Hartnell@gmail.com>

commit 0f390c3
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Tue May 2 13:21:49 2023 -0700

    Comments clean up

commit 52c6a98
Author: adairrr <32375605+adairrr@users.noreply.github.com>
Date:   Wed Apr 26 00:30:21 2023 +0300

    cw-abc: Updated hatch phase mechanics, donations, queries (DA0-DA0#699)

    * Separate hatcher allowlist

    * Donation feature

    * Initial sell exit tax

    * Hatchers to amount

    * Hatch phase exit tax

    * TokenMsg methods

    * Format

    * Hatchers query

    * Fix bug where float was not taken into account in supply

    * Buy and sell refactoring

    * Update hatch phase config

    * Update phase config enum

    * Add adairrr to authors

    * Initial boot integration with custom msgs

    * Initial testing infrastructure

    * Abstract-OS to AbstractSDK

commit aceb8ba
Author: adairrr <32375605+adairrr@users.noreply.github.com>
Date:   Sun Apr 23 04:52:07 2023 +0300

    Initial phase integration to cw-abc (DA0-DA0#698)

    * CwAbcResult

    * Hatch phase configuration and init msg refactor

    * Initial instantiate test

    * Implement separate phrases and phrase configs

    * Remove vesting phase and update funding pool

    * Separate commands and queries

    * Update init msg with string configs

    * Phase config query

    * MinMax and config query

    * Add some todos

    * cw-ownable integration

commit 088143c
Author: Jake Hartnell <jake.hartnell@gmail.com>
Date:   Wed Apr 19 18:55:01 2023 -0700

    Initial commit
  • Loading branch information
ismellike committed Sep 18, 2024
1 parent 4c8a0cf commit 6670654
Show file tree
Hide file tree
Showing 83 changed files with 8,575 additions and 6,178 deletions.
6,084 changes: 0 additions & 6,084 deletions Cargo.lock

This file was deleted.

25 changes: 18 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ cosm-tome = "0.2"
cosmos-sdk-proto = "0.19"
cosmwasm-schema = { version = "1.5.4" }
cosmwasm-std = { version = "1.5.4", features = ["ibc3", "cosmwasm_1_1"] }
cw-address-like = "1.0.4"
cw-controllers = "1.1"
cw-orch-osmosis-test-tube = "0.3"
cw-multi-test = { version = "0.20.1", features = ["cosmwasm_1_1"] }
cw-storage-plus = { version = "1.1" }
cw-utils = "1.0"
Expand All @@ -55,15 +57,19 @@ cw4-group = "1.1"
cw721 = "0.18"
cw721-base = "0.18"
env_logger = "0.10"
getrandom = "0.2"
integer-sqrt = "0.1.5"
integer-cbrt = "0.1.2"
once_cell = "1.18"
omniflix-std = "0.1.8"
osmosis-std = "0.20.1"
osmosis-std = "0.25.0"
osmosis-std-derive = "0.20.1"
osmosis-test-tube = "20.1.1"
osmosis-test-tube = "25.0.0"
proc-macro2 = "1.0"
prost = { version = "=0.12.3", features = ["prost-derive"] }
prost-types = { version = "=0.12.3", default-features = false }
prost-derive = "=0.12.3"
prost = { version = "0.12.3", features = ["prost-derive"] }
prost-types = { version = "0.12.3", default-features = false }
prost-derive = "0.12.3"
rust_decimal = "1.14.3"
quote = "1.0"
rand = "0.8"
schemars = "0.8"
Expand All @@ -76,19 +82,24 @@ sg-multi-test = "3.1.0"
sg-std = "3.1.0"
sg721 = "3.1.0"
sg721-base = "3.1.0"
speculoos = "0.11.0"
syn = { version = "1.0", features = ["derive"] }
test-context = "0.1"
thiserror = { version = "1.0" }
wynd-utils = "0.4"
cw-orch = "0.24.1"
tokio = "=1.38.1"
tokio = "1.40.0"

# One commit ahead of version 0.3.0. Allows initialization with an
# optional owner.
cw-ownable = "0.5"


dao-callback-messages = { path = "./contracts/test/dao-callback-messages", version = "2.5.0" }
btsg-ft-factory = { path = "./contracts/external/btsg-ft-factory", version = "2.5.0" }
cw-abc = { path = "./contracts/external/cw-abc", version = "2.5.0" }
cw-admin-factory = { path = "./contracts/external/cw-admin-factory", version = "2.5.0" }
cw-curves = { path = "./packages/cw-curves", version = "2.5.0" }
cw-denom = { path = "./packages/cw-denom", version = "2.5.0" }
cw-fund-distributor = { path = "./contracts/distribution/cw-fund-distributor", version = "2.5.0" }
cw-hooks = { path = "./packages/cw-hooks", version = "2.5.0" }
Expand All @@ -103,7 +114,7 @@ cw-wormhole = { path = "./packages/cw-wormhole", version = "2.5.0" }
cw20-stake = { path = "./contracts/staking/cw20-stake", version = "2.5.0" }
cw721-controllers = { path = "./packages/cw721-controllers", version = "2.5.0" }
cw721-roles = { path = "./contracts/external/cw721-roles", version = "2.5.0" }
dao-callback-messages = { path = "./contracts/test/dao-callback-messages", version = "2.5.0" }
dao-abc-factory = { path = "./contracts/external/dao-abc-factory", version = "2.5.0" }
dao-cw721-extensions = { path = "./packages/dao-cw721-extensions", version = "2.5.0" }
dao-dao-core = { path = "./contracts/dao-dao-core", version = "2.5.0" }
dao-dao-macros = { path = "./packages/dao-dao-macros", version = "2.5.0" }
Expand Down
2 changes: 1 addition & 1 deletion contracts/dao-dao-core/schema/dao-dao-core.json
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,7 @@
"additionalProperties": false
},
{
"description": "Lists all of the items associted with the contract. For example, given the items `{ \"group\": \"foo\", \"subdao\": \"bar\"}` this query would return `[(\"group\", \"foo\"), (\"subdao\", \"bar\")]`.",
"description": "Lists all of the items associated with the contract. For example, given the items `{ \"group\": \"foo\", \"subdao\": \"bar\"}` this query would return `[(\"group\", \"foo\"), (\"subdao\", \"bar\")]`.",
"type": "object",
"required": [
"list_items"
Expand Down
6 changes: 6 additions & 0 deletions contracts/external/cw-abc/.cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib"
integration-test = "test --test integration"
schema = "run --example schema"
62 changes: 62 additions & 0 deletions contracts/external/cw-abc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[package]
name = "cw-abc"
authors = [
"Ethan Frey <ethanfrey@users.noreply.github.com>",
"Jake Hartnell",
"Adair <adairrr@users.noreply.github.com>",
"Gabe <ismellike@users.noreply.github.com>",
]
description = "Implements an Augmented Bonding Curve"
# Inherits license from previous work
license = "Apache-2.0"
edition = { workspace = true }
repository = { workspace = true }
version = { workspace = true }

[lib]
crate-type = ["cdylib", "rlib"]
doctest = false

[features]
backtraces = ["cosmwasm-std/backtraces"]
# use library feature to disable all instantiate/execute/query exports
library = []
# use test tube feature to enable test-tube integration tests, for example
# cargo test --features "test-tube"
test-tube = []
# when writing tests you may wish to enable test-tube as a default feature
# default = ["test-tube"]

[dependencies]
cw-utils = { workspace = true }
cw2 = { workspace = true }
cw-storage-plus = { workspace = true }
cosmwasm-std = { workspace = true }
cosmwasm-schema = { workspace = true }
cw-address-like = { workspace = true }
cw-ownable = { workspace = true }
cw-paginate-storage = { workspace = true }
cw-tokenfactory-issuer = { workspace = true, features = [
"library",
"osmosis_tokenfactory",
] }
dao-interface = { workspace = true }
getrandom = { workspace = true, features = ["js"] }
thiserror = { workspace = true }
cw-curves = { workspace = true }
cw-orch = { workspace = true }

[dev-dependencies]
speculoos = { workspace = true }
anyhow = { workspace = true }
cw-multi-test = { workspace = true }
dao-testing = { workspace = true, features = ["test-tube"] }
serde = { workspace = true }
serde_json = { workspace = true }
dao-voting-token-staked = { workspace = true }
dao-proposal-single = { workspace = true }
dao-voting = { workspace = true }
dao-cw-orch = { path = "../../../packages/cw-orch" }
cw-abc = { workspace = true }
cw-orch-osmosis-test-tube = { workspace = true }
dao-proposal-sudo = { workspace = true }
15 changes: 15 additions & 0 deletions contracts/external/cw-abc/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CW20-Bonding: Bonding Curve to release CW20 token
Copyright 2020-21 Ethan Frey <ethanfrey@users.noreply.github.com>
Copyright 2021-22 Confio GmbH

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
150 changes: 150 additions & 0 deletions contracts/external/cw-abc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# cw-abc

Implements an [Augmented Bonding Curve](https://medium.com/commonsstack/deep-dive-augmented-bonding-curves-b5ca4fad4436).

Forked from and heavily inspired by the work on [cw20-bonding](https://github.com/cosmwasm/cw-tokens/tree/main/contracts/cw20-bonding). This contract uses native and token factory tokens instead.

NOTE: this contract is NOT AUDITED and experimental. NOT RECOMMENDED FOR PRODUCTION USE. Use at your own risk.

## What are Augmented Bonding Curves?
Before we get to the *Augmented* part, we must first describe bonding curves themselves.

### Token Bonding Curves

"A token bonding curve (TBC) is a mathematical curve that defines a relationship between price and token supply." ~[Aavegotchi Wiki](https://wiki.aavegotchi.com/en/curve)

Each bonding curve has a pricing function, also known as the price curve (or `curve_fn` in our implementation). The `curve_fn` is used to determine the price of the asset.

With bonding curves, we will always know what the price of an asset will be based on supply! More on benefits later.

This contract implements two methods:
- `Buy {}` is called with sending along some reserve currency (such as $USDC, or whatever the bonding curve is backed by). The reserve currency is stored by the bonding curve contract, and new tokens are minted and sent to the user.
- `Sell {}` is called along with sending some supply currency (the token minted by the bonding curve). The supply tokens are burned, and reserve currency is returned.

It is possible to use this contact as a basic bonding curve, without any of the augmented features.

#### Math

Given a price curve `f(x)` = price of the `x`th token, we want to figure out how to buy into and sell from the bonding curve. In fact we can look at the total supply issued. let `F(x)` be the integral of `f(x)`. We have issued `x` tokens for `F(x)` sent to the contract. Or, in reverse, if we send `x` tokens to the contract, it will mint `F^-1(x)` tokens.

From this we can create some formulas. Assume we currently have issued `S` tokens in exchange for `N = F(S)` input tokens. If someone sends us `x` tokens, how much will we issue?

`F^-1(N+x) - F^-1(N)` = `F^-1(N+x) - S`

And if we sell `x` tokens, how much we will get out:

`F(S) - F(S-x)` = `N - F(S-x)`

Just one calculation each side. To be safe, make sure to round down and always check against `F(S)` when using `F^-1(S)` to estimate how much should be issued. This will also safely give us how many tokens to return.

There is built in support for safely [raising i128 to an integer power](https://doc.rust-lang.org/std/primitive.i128.html#method.checked_pow). There is also a crate to [provide nth-root of for all integers](https://docs.rs/num-integer/0.1.43/num_integer/trait.Roots.html). With these two, we can handle most math except for logs/exponents.

Compare this to [writing it all in solidity](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/7b7ff729b82ea73ea168e495d9c94cb901ae95ce/contracts/math/Power.sol)

Examples:

Price Constant: `f(x) = k` and `F(x) = kx` and `F^-1(x) = x/k`

Price Linear: `f(x) = kx` and `F(x) = kx^2/2` and `F^-1(x) = (2x/k)^(0.5)`

Price Square Root: `f(x) = x^0.5` and `F(x) = x^1.5/1.5` and `F^-1(x) = (1.5*x)^(2/3)`

[You can read more about bonding curve math here](https://yos.io/2018/11/10/bonding-curves/).

#### Benefits

There are a number of benefits to bonding curves:
- There is enough liquidity to back the entire supply without having to list tokens on DEXs
- Easier to wind down projects (there is no going to zero)
- Transparent pricing: looking at the curve will tell you a lot about what kind of project it is.

### Augmented Bonding Curves

Augmented Bonding Curves are nothing new, some articles that inspired this implementation:
- https://medium.com/commonsstack/deep-dive-augmented-bonding-curves-b5ca4fad4436
- https://tokeneconomy.co/token-bonding-curves-in-practice-3eb904720cb8

At a high level, augmented bonding curves extend bonding curves with new functionality:
- Entry and exit fees
- Different phases representing the life cycles of projects

## Features

Example Instantiation message:

``` json
{
"fees_recipient": "address that receives fees",
"token_issuer_code_id": 0,
"supply": {
"subdenom": "utokenname",
"metadata": {
"name": "tokenname",
"description": "Token description.",
"symbol": "TOKEN",
"display": "Token",
},
"decimals": 6,
"max_supply": "100000000000000"
},
"reserve": {
"denom": "ujuno",
"decimals": 6,
},
"curve_type": {
"linear": {
"slope": "2",
"scale": 1
}
},
"phase_config": {
"hatch": {
"contribution_limits": {
"min": "10000000",
"max": "100000000000"
},
"initial_raise": {
"min": "10000000",
"max": "100000000000"
},
"entry_fee": "0.25"
},
"open": {
"exit_fee": "0.01",
"entry_fee": "0.01"
},
"closed": {}
},
"hatcher_allowlist": [
{
"addr": "dao_address",
"config": {
"config_type": { "dao": { "priority": 1 } },
"contribution_limits_override": {
"min": "100000000",
"max": "99999999999999"
}
}
},
{
"addr": "address",
"config": {
"config_type": { "address": {} }
}
}
],
}
```

- `fees_recipient`: the address that will receive fees (usually a DAO).
- `token_issuer_code_id`: the CosmWasm code ID for a `cw-tokenfactory_issuer` contract.
- `supply`: info about the token that will be minted by the curve. This is the token that is created by the bonding curve.
- `reserve`: this is the token that is used to mint the supply token.
- `curve_type`: information about the pricing curve.
- `phase_config`: configuration for the different phase of the augmented bonding curve.
- `hatcher_allowlist`: the list of address allowed to participate in a hatch.

## Future Work
- [ ] Optionally vest tokens during the hatch phase
- [ ] Implement an expanded set of pricing curves to choose from

11 changes: 11 additions & 0 deletions contracts/external/cw-abc/examples/schema.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use cosmwasm_schema::write_api;

use cw_abc::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};

fn main() {
write_api! {
instantiate: InstantiateMsg,
query: QueryMsg,
execute: ExecuteMsg,
}
}
Loading

0 comments on commit 6670654

Please sign in to comment.