Skip to content

Commit 71b1f5e

Browse files
committed
Deprecate ContractInfoResponse::new
1 parent 54dc68c commit 71b1f5e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/std/src/query/wasm.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ impl ContractInfoResponse {
5050
/// As a contract developer you should not need this constructor since
5151
/// query responses are constructed for you via deserialization.
5252
#[doc(hidden)]
53+
#[deprecated(
54+
note = "Use ContractInfoResponse::default() and mutate the fields you want to set."
55+
)]
5356
pub fn new(code_id: u64, creator: impl Into<String>) -> Self {
54-
Self {
55-
code_id,
56-
creator: creator.into(),
57-
admin: None,
58-
pinned: false,
59-
ibc_port: None,
60-
}
57+
let mut out = ContractInfoResponse::default();
58+
out.code_id = code_id;
59+
out.creator = creator.into();
60+
out
6161
}
6262
}

0 commit comments

Comments
 (0)