From 17e31d1b7f6620c4846adf5ff6c8ac17519b703c Mon Sep 17 00:00:00 2001 From: Benjamin DENEUX Date: Fri, 24 Mar 2023 08:27:22 +0100 Subject: [PATCH] feat(law): impl from on ObjectResponse --- contracts/cw-law-stone/src/msg.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/contracts/cw-law-stone/src/msg.rs b/contracts/cw-law-stone/src/msg.rs index 763e2df1..969745fe 100644 --- a/contracts/cw-law-stone/src/msg.rs +++ b/contracts/cw-law-stone/src/msg.rs @@ -1,3 +1,4 @@ +use crate::state::Object; use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::Binary; #[allow(unused_imports)] @@ -50,3 +51,12 @@ pub struct ProgramResponse { /// The `cw-storage` contract address on which the law program is stored. pub storage_address: String, } + +impl From for ProgramResponse { + fn from(o: Object) -> Self { + ProgramResponse { + object_id: o.object_id, + storage_address: o.storage_address, + } + } +}