Skip to main content
After uploading a Wasm binary, you create contract instances from its codeId. Each instance gets its own address, storage, and optional admin. A single code ID can be instantiated many times with different configuration.

Basic Instantiation

The third argument is the JSON init message whose shape is defined by the contract. The fourth argument is a human-readable label stored on-chain.

Instantiation Options

Pass an options object as the last argument to set an admin, attach funds, or add a memo:
Setting an admin is required if you ever want to migrate the contract to new code. If you omit the admin, the contract becomes permanently non-upgradeable.

Predictable Addresses with Instantiate2

instantiate2 creates a contract with a deterministic address derived from the code checksum, creator address, and a salt. This is useful when other contracts or off-chain systems need to know the address before it exists.
The salt must be between 1 and 64 bytes. Use a unique salt for each instantiation to avoid address collisions.

Instantiation Result

Next Steps

Executing Contracts

Send execute messages to change contract state.

Contract Administration

Migrate contracts and manage admin privileges.