From 7ab021fd9251e515031a2495f036b48cb873db18 Mon Sep 17 00:00:00 2001 From: Arnaud Mimart <33665250+amimart@users.noreply.github.com> Date: Thu, 16 Mar 2023 13:14:30 +0100 Subject: [PATCH] feat(gov): add query retrieving program location --- contracts/cw-law-stone/src/msg.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/contracts/cw-law-stone/src/msg.rs b/contracts/cw-law-stone/src/msg.rs index ee5d559e..763e2df1 100644 --- a/contracts/cw-law-stone/src/msg.rs +++ b/contracts/cw-law-stone/src/msg.rs @@ -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, }