forked from DA0-DA0/dao-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more payable flags + distribution contracts to external
- Loading branch information
Showing
20 changed files
with
116 additions
and
41 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
[package] | ||
name = "dao-rewards-distributor" | ||
authors = ["Ben2x4 <[email protected]>", "ekez <[email protected]>", "Jake Hartnell <[email protected]>", "bekauz <[email protected]>"] | ||
authors = [ | ||
"Ben2x4 <[email protected]>", | ||
"ekez <[email protected]>", | ||
"Jake Hartnell <[email protected]>", | ||
"bekauz <[email protected]>", | ||
] | ||
description = "Distributes rewards based on DAO membership." | ||
edition = { workspace = true } | ||
license = { workspace = true } | ||
|
@@ -21,7 +26,7 @@ cosmwasm-schema = { workspace = true } | |
cw2 = { workspace = true } | ||
cw4 = { workspace = true } | ||
cw20 = { workspace = true } | ||
cw20-base = { workspace = true, features = ["library"] } | ||
cw20-base = { workspace = true, features = ["library"] } | ||
cw-controllers = { workspace = true } | ||
cw-ownable = { workspace = true } | ||
cw-storage-plus = { workspace = true } | ||
|
@@ -30,6 +35,7 @@ dao-hooks = { workspace = true } | |
dao-interface = { workspace = true } | ||
dao-voting = { workspace = true } | ||
thiserror = { workspace = true } | ||
cw-orch.workspace = true | ||
|
||
[dev-dependencies] | ||
cw-multi-test = { workspace = true } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use cw_orch::{interface, prelude::*}; | ||
|
||
use cw_fund_distributor::contract::{execute, instantiate, query}; | ||
use cw_fund_distributor::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; | ||
|
||
#[interface(InstantiateMsg, ExecuteMsg, QueryMsg, Empty)] | ||
pub struct CwFundDistributor; | ||
|
||
impl<Chain> Uploadable for CwFundDistributor<Chain> { | ||
/// Return the path to the wasm file corresponding to the contract | ||
fn wasm(_chain: &ChainInfoOwned) -> WasmPath { | ||
artifacts_dir_from_workspace!() | ||
.find_wasm_path("cw_fund_distributor") | ||
.unwrap() | ||
} | ||
/// Returns a CosmWasm contract wrapper | ||
fn wrapper() -> Box<dyn MockContract<Empty>> { | ||
Box::new(ContractWrapper::new_with_empty(execute, instantiate, query)) | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
packages/cw-orch/src/distribution/dao_rewards_distributor.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use cw_orch::{interface, prelude::*}; | ||
|
||
use dao_rewards_distributor::contract::{execute, instantiate, query}; | ||
use dao_rewards_distributor::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; | ||
|
||
#[interface(InstantiateMsg, ExecuteMsg, QueryMsg, Empty)] | ||
pub struct DaoRewardsDistributor; | ||
|
||
impl<Chain> Uploadable for DaoRewardsDistributor<Chain> { | ||
/// Return the path to the wasm file corresponding to the contract | ||
fn wasm(_chain: &ChainInfoOwned) -> WasmPath { | ||
artifacts_dir_from_workspace!() | ||
.find_wasm_path("dao_rewards_distributor") | ||
.unwrap() | ||
} | ||
/// Returns a CosmWasm contract wrapper | ||
fn wrapper() -> Box<dyn MockContract<Empty>> { | ||
Box::new(ContractWrapper::new_with_empty(execute, instantiate, query)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mod cw_fund_distributor; | ||
mod dao_rewards_distributor; | ||
|
||
pub use cw_fund_distributor::CwFundDistributor; | ||
pub use dao_rewards_distributor::DaoRewardsDistributor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters