Skip to content

Commit 2a1c698

Browse files
committed
Add comment on discourages non-empty msg values
1 parent 8e2bff5 commit 2a1c698

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/std/src/addresses.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,10 @@ pub fn instantiate2_address(
337337
creator: &CanonicalAddr,
338338
salt: &[u8],
339339
) -> Result<CanonicalAddr, Instantiate2AddressError> {
340-
instantiate2_address_impl(checksum, creator, salt, b"")
340+
// Non-empty msg values are discouraged.
341+
// See https://medium.com/cosmwasm/dev-note-3-limitations-of-instantiate2-and-how-to-deal-with-them-a3f946874230.
342+
let msg = b"";
343+
instantiate2_address_impl(checksum, creator, salt, msg)
341344
}
342345

343346
/// The instantiate2 address derivation implementation. This API is used for

0 commit comments

Comments
 (0)