Reproduce a predictable CosmWasm instance address

A deterministic instantiation depends on exact byte inputs. A salt displayed as a friendly string can differ from the salt bytes actually sent on chain.

Build the candidate using the chain query

Set CHECKSUM to the hex code checksum, CREATOR to the actual instantiator and GRPC to a compatible wasmd TLS gRPC endpoint with reflection. This example predicts the variant that excludes initialization arguments.

grpcurl -d "{\"codeHash\":\"$CHECKSUM\",\"creatorAddress\":\"$CREATOR\",\"salt\":\"0102\"}" "$GRPC" cosmwasm.wasm.v1.Query/BuildAddress

The salt string 0102 represents two bytes. The UTF-8 text 0102 would instead be four bytes with hex representation 30313032 and yield a different address. Compare the address returned by BuildAddress with the expected instance.

Match the instantiation mode

If the operation includes initialization-message bytes in address derivation, supply the matching initArgs bytes through protobuf JSON base64. A matching prediction does not establish that an instance exists or that instantiation will pass permission and contract checks. github.com wasmd Query API