Skip to content

Commit

Permalink
fix package dependency collision and clean up stuff (#897)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso authored Nov 8, 2024
1 parent f816da4 commit a48363e
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 70 deletions.
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ cw-wormhole = { path = "./packages/cw-wormhole", version = "2.6.0" }
cw20-stake = { path = "./contracts/staking/cw20-stake", version = "2.6.0" }
cw20-stake-external-rewards = { path = "./contracts/staking/cw20-stake-external-rewards", version = "2.6.0" }
cw20-stake-reward-distributor = { path = "./contracts/staking/cw20-stake-reward-distributor", version = "2.6.0" }
cw721-controllers = { path = "./packages/cw721-controllers", version = "2.6.0" }
cw721-roles = { path = "./contracts/external/cw721-roles", version = "2.6.0" }
dao-cw721-extensions = { path = "./packages/dao-cw721-extensions", version = "2.6.0" }
dao-dao-core = { path = "./contracts/dao-dao-core", version = "2.6.0" }
Expand Down Expand Up @@ -131,6 +130,7 @@ dao-voting-cw721-roles = { path = "./contracts/voting/dao-voting-cw721-roles", v
dao-voting-cw721-staked = { path = "./contracts/voting/dao-voting-cw721-staked", version = "2.6.0" }
dao-voting-onft-staked = { path = "./contracts/voting/dao-voting-onft-staked", version = "2.6.0" }
dao-voting-token-staked = { path = "./contracts/voting/dao-voting-token-staked", version = "2.6.0" }
nft-controllers = { path = "./packages/nft-controllers", version = "2.6.0" }

# v1 dependencies. used for state migrations.
cw-core-v1 = { package = "cw-core", version = "0.1.0" }
Expand Down
37 changes: 0 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

[![DAO DAO DAO](https://img.shields.io/badge/DAO%20DAO%20DAO-gray?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxP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gCedd2W3%2BxsFo1xY7caVVCX3ViyxJNTgI4U%2FFa9Rr9AIE%2Bnmz8lbSwLmBfaUQxTjeRTxEw9dP3TVUsN428M40qxs9SH2W2voxVEwn7H26fJqXQe7P50A%2Fp3QbV%2BkJu876ho1a93wirvbBFi9qXc1zFUWc8B5Q6tAi4S6hodQUcEwru4S1oE1dxYnZrUFcttaDRyfAg2xTud8E7B3gMIv%2FJrxGgle0p%2Bmm3ixdoEPtHk7q3GJFH93F3L9ANcP8proIswqjRRVveX%2BRV0GHp7in1lNyobYkX%2BR4qJLbj2HVealT1qBPiRbHFIM83VReWxx3w3D5pXwKIwm%2BWfzB2WvpLdogzPc6l8z5FNBrF4%2FkuxTsHvGt1FH4FETTIOdhxLeU5H%2FmDA2OaKG%2FWvz36UDyuGo04LhGBKYPEJ4xYvPLwBwqGmYsZWhhJjODMKIflADNi%2FyiSRYb44fddn8ljDfBcZMd7wp0%2B1SHJSbvswE%2FzmCNKyHPsAxf%2FdHhoOlxoGJPTYQchlVArgblnBlPy86Hx%2BbwMDbUxNYs21VbcsRX2mJmOAl794tKPhrr%2F9nM2stsL4sGwfOkTlhJAHbAIePWrK9loLrakEoN0SV49zky3kELmODwBiAC3oZB38L%2B50jiTN2JYMe4JDnP%2FUL9M65mer65q1ItqBlrxrLZImBVQ74PGzm9SQCrFrONv71wG1dsQA%2BDmx6oVa4eSqaymLuJ%2Fvn79Nx1KfnO6eRn3yZ7numaARGDsWv%2FsNCoWjYHJu7SEkvdSZJJYdHR%2BZH1yKqG9sdisrcQ%2FB4DdwwTKovbigfCkhiIpv9y6dv3X37JcutQCfzCUGgtR%2FgO61zuwRnnviwAAAABJRU5ErkJggg%3D%3D)](https://daodao.zone/dao/juno10h0hc64jv006rr8qy0zhlu4jsxct8qwa0vtaleayh0ujz0zynf2s2r7v8q)


This is a collection of smart contracts for building composable, modular, and upgradable DAOs.

For a detailed look at how these contracts work, see [our wiki](https://github.com/DA0-DA0/dao-contracts/wiki/DAO-DAO-Contracts-Design).
Expand All @@ -38,42 +37,6 @@ If you believe you have found a problem, please [let us know](SECURITY.md).

DAO DAO has been audited by [Oak Security](https://www.oaksecurity.io/) on multiple occasions. You can find all the audit reports [here](https://github.com/oak-security/audit-reports/tree/master/DAO%20DAO).

`v2.3.0` is the most recent DAO DAO release; only new feautres related to tokenfactory and improved NFT DAOs have been [audited](https://github.com/oak-security/audit-reports/blob/master/DAO%20DAO/2023-10-16%20Audit%20Report%20-%20DAO%20DAO%20Updates%20v1.0.pdf). Our most recently [full audited](https://github.com/oak-security/audit-reports/blob/master/DAO%20DAO/2023-02-06%20Audit%20Report%20-%20DAO%20DAO%202%20v1.0.pdf) release is `v2.0.0`. Vesting and payroll were added and [audited](https://github.com/oak-security/audit-reports/blob/master/DAO%20DAO/2023-03-22%20Audit%20Report%20-%20DAO%20DAO%20Vesting%20and%20Payroll%20Factory%20v1.0.pdf) in `v2.1.0`.

Audited contracts include:
- [cw-payroll-factory](https://crates.io/crates/cw-payroll-factory)
- [cw-tokenfactory-issuer](https://crates.io/crates/cw-tokenfactory-issuer)
- [cw-token-swap](https://crates.io/crates/cw-token-swap)
- [cw-vesting](https://crates.io/crates/cw-vesting)
- [dao-dao-core](https://crates.io/crates/dao-dao-core)
- [dao-pre-propose-approval-single](https://crates.io/crates/dao-pre-propose-approval-single)
- [dao-pre-propose-approver](https://crates.io/crates/dao-pre-propose-approver)
- [dao-pre-propose-multiple](https://crates.io/crates/dao-pre-propose-multiple)
- [dao-pre-propose-single](https://crates.io/crates/dao-pre-propose-single)
- [dao-proposal-condorcet](https://crates.io/crates/dao-proposal-condorcet)
- [dao-proposal-multiple](https://crates.io/crates/dao-proposal-multiple)
- [dao-proposal-single](https://crates.io/crates/dao-proposal-single)
- [cw20-stake](https://crates.io/crates/cw20-stake)
- [cw20-stake-external-rewards](https://crates.io/crates/cw20-stake-external-rewards)
- [cw20-stake-reward-distributor](https://crates.io/crates/cw20-stake-reward-distributor)
- [dao-voting-cw4](https://crates.io/crates/dao-voting-cw4)
- [dao-voting-cw20-staked](https://crates.io/crates/dao-voting-cw20-staked)
- [dao-voting-cw721-staked](https://crates.io/crates/dao-voting-cw721-staked)
- [dao-voting-token-staked](https://crates.io/crates/dao-voting-token-staked)

Audited packages include:
- [cw721-controllers](https://crates.io/crates/cw721-controllers)
- [cw-denom](https://crates.io/crates/cw-denom)
- [cw-hooks](https://crates.io/crates/cw-hooks)
- [cw-paginate-storage](https://crates.io/crates/cw-paginate-storage)
- [cw-stake-tracker](https://crates.io/crates/cw-stake-tracker)
- [cw-wormhole](https://crates.io/crates/cw-wormhole)
- [dao-dao-macros](https://crates.io/crates/dao-dao-macros)
- [dao-hooks](https://crates.io/crates/dao-hooks)
- [dao-interface](https://crates.io/crates/dao-interface)
- [dao-pre-propose-based](https://crates.io/crates/dao-pre-propose-based)
- [dao-voting](https://crates.io/crates/dao-voting)

## Why?

Our institutions grew rapidly after 1970, but as time passed their priorities shifted from growth, to protectionism. We're fighting this. We believe The Internet is where the organizations of tomorrow will be built.
Expand Down
2 changes: 1 addition & 1 deletion contracts/voting/dao-voting-cw721-staked/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ cw-controllers = { workspace = true }
cw-hooks = { workspace = true }
cw721 = { workspace = true }
cw721-base = { workspace = true, features = ["library"] }
cw721-controllers = { workspace = true }
cw721-controllers-v250 = { workspace = true }
cw-utils = { workspace = true }
cw2 = { workspace = true }
dao-dao-macros = { workspace = true }
dao-hooks = { workspace = true }
dao-interface = { workspace = true }
dao-voting = { workspace = true }
nft-controllers = { workspace = true }
thiserror = { workspace = true }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion contracts/voting/dao-voting-cw721-staked/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub enum ContractError {
UnstakingDurationError(#[from] dao_voting::duration::UnstakingDurationError),

#[error(transparent)]
NftClaimError(#[from] cw721_controllers::NftClaimError),
NftClaimError(#[from] nft_controllers::NftClaimError),

#[error("Can not stake that which has already been staked")]
AlreadyStaked {},
Expand Down
2 changes: 1 addition & 1 deletion contracts/voting/dao-voting-cw721-staked/src/state.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use cosmwasm_schema::cw_serde;
use cosmwasm_std::{Addr, Binary, Empty, StdError, StdResult, Storage, Uint128};
use cw721_controllers::NftClaims;
use cw_hooks::Hooks;
use cw_storage_plus::{Item, Map, SnapshotItem, SnapshotMap, Strategy};
use cw_utils::Duration;
use dao_voting::threshold::ActiveThreshold;
use nft_controllers::NftClaims;

use crate::ContractError;

Expand Down
2 changes: 1 addition & 1 deletion contracts/voting/dao-voting-onft-staked/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ cosmwasm-schema = { workspace = true }
cw-storage-plus = { workspace = true }
cw-controllers = { workspace = true }
cw-hooks = { workspace = true }
cw721-controllers = { workspace = true }
cw721-controllers-v250 = { workspace = true }
cw-utils = { workspace = true }
cw2 = { workspace = true }
Expand All @@ -41,6 +40,7 @@ dao-hooks = { workspace = true }
dao-interface = { workspace = true }
dao-voting = { workspace = true }
omniflix-std = { workspace = true }
nft-controllers = { workspace = true }
serde = { workspace = true }
thiserror = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion contracts/voting/dao-voting-onft-staked/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub enum ContractError {
UnstakingDurationError(#[from] dao_voting::duration::UnstakingDurationError),

#[error(transparent)]
NftClaimError(#[from] cw721_controllers::NftClaimError),
NftClaimError(#[from] nft_controllers::NftClaimError),

#[error("Nothing to claim")]
NothingToClaim {},
Expand Down
2 changes: 1 addition & 1 deletion contracts/voting/dao-voting-onft-staked/src/state.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use cosmwasm_schema::cw_serde;
use cosmwasm_std::{Addr, Empty, StdError, StdResult, Storage, Uint128};
use cw721_controllers::NftClaims;
use cw_hooks::Hooks;
use cw_storage_plus::{Item, Map, SnapshotItem, SnapshotMap, Strategy};
use cw_utils::Duration;
use dao_voting::threshold::ActiveThreshold;
use nft_controllers::NftClaims;

use crate::ContractError;

Expand Down
6 changes: 0 additions & 6 deletions packages/cw721-controllers/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cw721-controllers"
authors = ["CypherApe [email protected]"]
description = "A package for managing cw721 claims."
name = "nft-controllers"
authors = ["CypherApe [email protected]", "Noah <[email protected]>"]
description = "A package for managing NFT claims."
edition = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
Expand Down
8 changes: 8 additions & 0 deletions packages/nft-controllers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# NFT Controllers

This is an implementation of cw-plus'
[cw-controllers](https://github.com/CosmWasm/cw-plus/tree/72afcde846b907fac5c0394ce86ed5a59ce47524/packages/controllers)
package for NFTs. It manages claims for our NFT staking contracts:

- [dao-voting-cw721-staked](../../contracts/voting/dao-voting-cw721-staked)
- [dao-voting-onft-staked](../../contracts/voting/dao-voting-onft-staked)
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ cd packages/cw-paginate-storage
cargo publish
cd "$START_DIR"

cd packages/cw721-controllers
cd packages/nft-controllers
cargo publish
cd "$START_DIR"

Expand Down Expand Up @@ -93,7 +93,7 @@ cd "$START_DIR"
sleep 120

cd contracts/test/dao-voting-cw20-balance
cargo publish
cargo hack publish --no-dev-deps --allow-dirty
cd "$START_DIR"

cd contracts/test/dao-proposal-hook-counter
Expand Down

0 comments on commit a48363e

Please sign in to comment.