Skip to content

Commit

Permalink
feat(gov): add query retrieving program location
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart committed Mar 16, 2023
1 parent 2d9805f commit 7ab021f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions contracts/cw-law-stone/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,20 @@ pub enum QueryMsg {
/// If not broken, ask the logic module the provided query with the law program loaded.
#[returns(AskResponse)]
Ask { query: String },

/// # Program
/// If not broken, returns the law program location information.
#[returns(ProgramResponse)]
Program,
}

/// # ProgramResponse
/// ProgramResponse carry elements to locate the program in a `cw-storage` contract.
#[cw_serde]
pub struct ProgramResponse {
/// The program object id in the `cw-storage` contract.
pub object_id: String,

/// The `cw-storage` contract address on which the law program is stored.
pub storage_address: String,
}

0 comments on commit 7ab021f

Please sign in to comment.