-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
324 additions
and
566 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
cc02664dc02c571fd0e4bb02061b737571a510a6a4ac01f8cc783545bec6fff4 counter_contract.wasm | ||
9f8d3bc6ea5c58c31dbed31588df591447ffd2410b3c4d1587e2adb8a29c0931 counter_contract.wasm | ||
4bb1891434224d710cb1f9eea1da1a2a0aa3c4a133d699d58e26e72daf51b63b counter_cousin_contract.wasm | ||
a266c5ab0ffdf78b3aee593d07d3c822fa3c2745bc7bc8210e49860439d65a73 cw_orch_compatibility_test.wasm | ||
0dc79fb31e732310554a07881cfe8a193c068d2f93539356817e5aaf551650dd mock_contract.wasm | ||
08d65b781d7357a6777c836229d971b6c87a5fdfc7cba9806ed508f917859f08 mock_contract_u64.wasm | ||
322d2535c672abb0338f23689d703a468d6bdebe9ce975a842e9a8d5e95bf770 mock_contract.wasm | ||
cdc883c20f370bd68494912e28053f0bef666e8f96c889ba8412b50f4a2cd1ed mock_contract_u64.wasm |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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,14 +1,22 @@ | ||
use schemars::JsonSchema; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use cosmwasm_std::Addr; | ||
use crate::ContractError; | ||
use cosmwasm_std::{Addr, Deps, MessageInfo}; | ||
use cw_storage_plus::Item; | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] | ||
pub struct State { | ||
pub count: i32, | ||
pub owner: Addr, | ||
pub cousin: Option<Addr>, | ||
} | ||
|
||
pub const STATE: Item<State> = Item::new("state"); | ||
|
||
pub fn assert_owner(deps: Deps, info: &MessageInfo) -> Result<(), ContractError> { | ||
let state = STATE.load(deps.storage)?; | ||
if info.sender != state.owner { | ||
return Err(ContractError::Unauthorized {}); | ||
} | ||
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
Oops, something went wrong.