diff --git a/packages/std/src/query/wasm.rs b/packages/std/src/query/wasm.rs index 6bd52dde91..153b35f51c 100644 --- a/packages/std/src/query/wasm.rs +++ b/packages/std/src/query/wasm.rs @@ -50,13 +50,13 @@ impl ContractInfoResponse { /// As a contract developer you should not need this constructor since /// query responses are constructed for you via deserialization. #[doc(hidden)] + #[deprecated( + note = "Use ContractInfoResponse::default() and mutate the fields you want to set." + )] pub fn new(code_id: u64, creator: impl Into) -> Self { - Self { - code_id, - creator: creator.into(), - admin: None, - pinned: false, - ibc_port: None, - } + let mut out = ContractInfoResponse::default(); + out.code_id = code_id; + out.creator = creator.into(); + out } }