> ## Documentation Index
> Fetch the complete documentation index at: https://developers.stellar.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload and Deploy Contract

> Upload your contract's WASM bytecode and deploy the contract to the network.

There are several ways to upload and deploy contracts to the Stellar network. If you are familiar with the CLI workflow, you can easily upload and deploy contracts using two different commands on the [Stellar CLI](https://developers.stellar.org/docs/tools/cli). If you prefer to do it all in a web interface, the ["Upload and Deploy Contract"](https://lab.stellar.org/smart-contracts/deploy-contract) page on Stellar Lab provides a convenient way to upload and deploy contracts to the network.

![Lab: Contract Explorer](https://mintcdn.com/stellardevelopmentfoundation/hmWBKBicbGG4DTu6/assets/lab/lab-upload-deploy-page.png?fit=max\&auto=format\&n=hmWBKBicbGG4DTu6\&q=85\&s=bbdd8842b3f1b3dfc4421da844648fba)

The deployment process consists of two distinct phases:

1. **Upload phase**: Uploading `WASM` bytecode to the network
2. **Deploy phase**: Deploying a contract instance from the successfully uploaded bytecode

> [!TIP]
>
> Each upload and deploy phase requires creating a transaction and signing the transaction.

## Upload Phase

The "Upload phase" accepts `.wasm` files through drag-and-drop or file browser selection. During this phase, the Lab checks whether the uploaded `.wasm` file already exists on the network. If it's not on the network, it creates an upload transaction that you need to sign using any of the following methods: secret key, hardware wallet, extension wallet, or signature.

![Lab: Upload and Deploy Contract - uploading contract](https://mintcdn.com/stellardevelopmentfoundation/hmWBKBicbGG4DTu6/assets/lab/lab-upload-contract.gif?s=58309676a13dbd779fa8c91a4962fb46)

If the requested `WASM` bytecode is already uploaded on the network, the Lab skips the "Upload contract" section and opens the "Deploy contract" section by default. You will see a message: "This contract `WASM` has already been uploaded. Wasm hash: \*\*\*\*"

![Lab: Upload and Deploy Contract - skipping uploading contract](https://mintcdn.com/stellardevelopmentfoundation/1iVxlvEjme-PeN5h/assets/lab/lab-already-uploaded.gif?s=6f06054f12936edea815252a22da1fc1)

## Deploy Phase

During the "Deploy phase", the Lab checks whether the `WASM` contract metadata has a constructor and what arguments it requires. Once all the required fields are filled, it creates a deployment transaction. After the transaction is signed and successfully submitted, you can check your contract on blockchain explorers like [Stellar.Expert](https://stellar.expert/explorer) or [Stellar Lab's contract explorer](https://lab.stellar.org/smart-contracts/contract-explorer) right away.

![Lab: Upload and Deploy Contract - deploying contract](https://mintcdn.com/stellardevelopmentfoundation/hmWBKBicbGG4DTu6/assets/lab/lab-deploy-contract.gif?s=7f795b3763c196dd827b55ca849198d9)
