-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
little osmosis test tube fixes and examples/Readme
- Loading branch information
Showing
10 changed files
with
47 additions
and
10 deletions.
There are no files selected for viewing
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,25 @@ | ||
use cosmwasm_std::coins; | ||
use counter_contract::{ | ||
contract::CounterContract, | ||
msg::{ExecuteMsg, GetCountResponse, InstantiateMsg, QueryMsg}, | ||
}; | ||
use cw_orch::prelude::OsmosisTestTube; | ||
use cw_orch::prelude::{CwOrchExecute, CwOrchInstantiate, CwOrchQuery, CwOrchUpload}; | ||
|
||
pub fn main() { | ||
let chain = OsmosisTestTube::new(coins(1_000_000_000_000, "uosmo")); | ||
|
||
let contract_counter = CounterContract::new("mock:contract_counter", chain); | ||
|
||
let upload_res = contract_counter.upload(); | ||
assert!(upload_res.is_ok()); | ||
|
||
let init_res = contract_counter.instantiate(&InstantiateMsg { count: 0 }, None, None); | ||
assert!(init_res.is_ok()); | ||
|
||
let exec_res = contract_counter.execute(&ExecuteMsg::Increment {}, None); | ||
assert!(exec_res.is_ok()); | ||
|
||
let query_res = contract_counter.query::<GetCountResponse>(&QueryMsg::GetCount {}); | ||
assert!(query_res.is_ok()); | ||
} |
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
2 changes: 1 addition & 1 deletion
2
cw-orch/src/test_tube/mod.rs → cw-orch/src/osmosis_test_tube/mod.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
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