Skip to content

Commit

Permalink
Add new contracts to publishing script. (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHartnell committed Jul 22, 2024
1 parent 71dd109 commit be861a8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
10 changes: 7 additions & 3 deletions contracts/distribution/cw-fund-distributor/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# cw-fund-distributor

This contract is meant to facilitate fund distribution
This contract is meant to facilitate fund distribution
proportional to the amount of voting power members have
at a given block height.

Possible use cases may involve:

- Dissolving a DAO and distributing its treasury to members prior to shutting down
- Distributing funds among DAO members
- Funding subDAOs

> **WARNING:** THIS CONTRACT IS NOT AUDITED AND IS _EXPERIMENTAL_. USE AT YOUR
> OWN RISK.
## Funding Period

Contract is instantiated with a `funding_period` - a time duration that should suffice
Contract is instantiated with a `funding_period` - a time duration that should suffice
to move the funds to be distributed into the distributor contract.

Funding the contract can only happen during this period.
Expand All @@ -32,6 +36,6 @@ it is possible to redistribute the unclaimed funds.
Only the `cw_admin` can call the method.

The redistribution method finds all the claims that have been performed
and subtracts the amounts from the initially funded balance. The respective
and subtracts the amounts from the initially funded balance. The respective
allocation ratios for each DAO member remain the same; any previous claims
are cleared.
29 changes: 23 additions & 6 deletions scripts/publish.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ cd packages/dao-dao-macros
cargo hack publish --no-dev-deps --allow-dirty
cd "$START_DIR"

sleep 120

cd packages/dao-voting
cargo publish
cd "$START_DIR"
Expand All @@ -77,11 +79,15 @@ cd "$START_DIR"

sleep 120

cd packages/cw-tokenfactory-types
cargo publish
cd "$START_DIR"

cd packages/dao-pre-propose-base
cargo publish
cd "$START_DIR"

Test contracts
# Test contracts
cd contracts/test/dao-proposal-sudo
cargo publish
cd "$START_DIR"
Expand Down Expand Up @@ -187,25 +193,36 @@ cd contracts/voting/dao-voting-token-staked
cargo hack publish --no-dev-deps --allow-dirty
cd "$START_DIR"

cd contracts/dao-dao-core
cd contracts/voting/dao-voting-onft-staked
cargo hack publish --no-dev-deps --allow-dirty
cd "$START_DIR"

cd contracts/external/cw-admin-factory
cd contracts/dao-dao-core
cargo hack publish --no-dev-deps --allow-dirty
cd "$START_DIR"

sleep 120

# TODO re-enable when ready
# cd contracts/external/cw-fund-distributor
cd contracts/external/cw-admin-factory
cargo hack publish --no-dev-deps --allow-dirty
cd "$START_DIR"

# TODO: uncomment once cleaned up and audited
# cd contracts/distribution/cw-fund-distributor
# cargo hack publish --no-dev-deps --allow-dirty
# cd "$START_DIR"

cd contracts/external/dao-migrator
cd contracts/distribution/dao-rewards-distributor
cargo hack publish --no-dev-deps --allow-dirty
cd "$START_DIR"

cd contracts/external/btsg-ft-factory
cargo hack publish --no-dev-deps --allow-dirty
cd "$START_DIR"

cd contracts/external/dao-migrator
cargo hack publish --no-dev-deps --allow-dirty
cd "$START_DIR"

cd packages/dao-testing
cargo publish
Expand Down

0 comments on commit be861a8

Please sign in to comment.