Skip to content

Commit

Permalink
good btsg cw-orch 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 3b14168 commit 776ebe3
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions scripts/src/tests/deploy/external.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,36 +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(&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 776ebe3

Please sign in to comment.