Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
hard-nett authored and Jake Hartnell committed Aug 14, 2024
1 parent bf0b668 commit 3b14168
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 74 deletions.
37 changes: 1 addition & 36 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions packages/cw-orch/src/external/btsg_ft_factory.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use cw_orch::{interface, prelude::*};

use cw_payroll_factory::contract::{execute, instantiate, query, reply};
use cw_payroll_factory::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};
use btsg_ft_factory::contract::{execute, instantiate, query, reply};
use btsg_ft_factory::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};

#[interface(InstantiateMsg, ExecuteMsg, QueryMsg, Empty)]
pub struct DaoExternalFantokenFactory;
Expand Down
2 changes: 1 addition & 1 deletion scripts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ cw-tokenfactory-issuer = { git = "https://github.com/hard-nett/dao-contracts",
cw-vesting = { git = "https://github.com/hard-nett/dao-contracts", branch = "feat/external-cw-orch" }
cw721-roles = { git = "https://github.com/hard-nett/dao-contracts", branch = "feat/external-cw-orch" }
dao-migrator = { git = "https://github.com/hard-nett/dao-contracts", branch = "feat/external-cw-orch" }
btsg-ft-factory = { git = "https://github.com/hard-nett/dao-contracts", rev = "1b1849e1aa41d8cb6a2b6b05db6dae032719b9bb" }
btsg-ft-factory = { git = "https://github.com/hard-nett/dao-contracts", branch = "feat/external-cw-orch" }
69 changes: 34 additions & 35 deletions scripts/src/tests/deploy/external.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::external::*;
use btsg_ft_factory::msg::InstantiateMsg;
use cw_orch::prelude::*;
use cw_tokenfactory_issuer::msg::InstantiateMsg as TokenfactoryIssuerInit;

Expand Down Expand Up @@ -252,38 +253,36 @@ impl<Chain: CwEnv> cw_orch::contract::Deploy<Chain> for DaoMigrationSuite<Chain>
}

// bitsong fantoken factory
impl<Chain: CwEnv> cw_orch::contract::Deploy<Chain> for FantokenFactorySuite<Chain> {
// We don't have a custom error type
type Error = CwOrchError;
type DeployData = Addr;

fn store_on(chain: Chain) -> Result<Self, Self::Error> {
let factory = FantokenFactorySuite::new(chain.clone());
factory.upload()?;
Ok(factory)
}

fn deployed_state_file_path() -> Option<String> {
None
}

fn get_contracts_mut(&mut self) -> Vec<Box<&mut dyn ContractInstance<Chain>>> {
vec![Box::new(&mut self.factory)]
}

fn load_from(chain: Chain) -> Result<Self, Self::Error> {
let factory = Self::new(chain.clone());
Ok(factory)
}

fn deploy_on(chain: Chain, _data: Self::DeployData) -> Result<Self, Self::Error> {
// ########### Upload ##############
let suite: FantokenFactorySuite<Chain> =
FantokenFactorySuite::store_on(chain.clone()).unwrap();
// ########### Instantiate ##############
suite
.factory
.instantiate(&btsg_ft_factory::msg::InstantiateMsg {}, None, None);
Ok(suite)
}
}
// impl<Chain: CwEnv> cw_orch::contract::Deploy<Chain> for FantokenFactorySuite<Chain> {
// // We don't have a custom error type
// type Error = CwOrchError;
// type DeployData = Addr;

// fn store_on(chain: Chain) -> Result<Self, Self::Error> {
// let factory = FantokenFactorySuite::new(chain.clone());
// factory.upload()?;
// Ok(factory)
// }

// fn deployed_state_file_path() -> Option<String> {
// None
// }

// fn get_contracts_mut(&mut self) -> Vec<Box<&mut dyn ContractInstance<Chain>>> {
// vec![Box::new(&mut self.factory)]
// }

// fn load_from(chain: Chain) -> Result<Self, Self::Error> {
// let factory = Self::new(chain.clone());
// Ok(factory)
// }

// fn deploy_on(chain: Chain, _data: Self::DeployData) -> Result<Self, Self::Error> {
// // ########### Upload ##############
// let suite: FantokenFactorySuite<Chain> =
// FantokenFactorySuite::store_on(chain.clone()).unwrap();
// // ########### Instantiate ##############
// suite.factory.instantiate(&InstantiateMsg {}, None, None);
// Ok(suite)
// }
// }

0 comments on commit 3b14168

Please sign in to comment.