# Deploy with Remix

### **1. Prerequisites**

Before you begin, ensure you have:

* A web browser (Chrome, Firefox, or Edge recommended)
* MetaMask wallet extension installed
* LazAI testnet tokens (get from faucet)

### **2. Setup MetaMask for LazAI Testnet**

#### **Add LazAI Network to MetaMask**

1. Open MetaMask extension
2. Click on the network dropdown (usually shows "Ethereum Mainnet")
3. Click "Add Network"&#x20;
4. Enter the following details:

{% content-ref url="/pages/Ot9WMpIPhxBampdkrneM" %}
[Broken mention](broken://pages/Ot9WMpIPhxBampdkrneM)
{% endcontent-ref %}

### Contract Addresses

1. Click "Save" to add the network
2. Switch to LazAI Testnet in MetaMask

#### **Get Testnet Tokens**

Visit the LazAI faucet to get Testnet Tokens for deployment and transaction fees.

### **3. Access Remix IDE**

1. Open your web browser
2. Go to <https://remix.ethereum.org>
3. Remix IDE will load automatically - no installation required

### **4. Create Your Smart Contract**

#### **Create a New File**

1. In the File Explorer (left panel), click the "+" icon next to "contracts"
2. Name your file `Counter.sol`
3. Add the following code:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Counter { 
uint256 private count;   
function increment() public {        
count += 1;    
}     
function decrement() public {        
count -= 1;    
}     
function getCount() public view returns (uint256) {        
return count;    
}
}
```

### **5. Compile Your Contract**

#### **Select Compiler Version**

1. Click on the "Solidity Compiler" tab (second icon in left panel)
2. Select compiler version `0.8.0` or higher
3. Ensure "Auto compile" is checked (optional but recommended)

#### **Compile**

1. Click "Compile Counter.sol" button
2. Check for any compilation errors in the console
3. Green checkmark indicates successful compilation

### **6. Deploy Your Contract**

#### **Setup Deployment Environment**

1. Click on "Deploy & Run Transactions" tab (third icon in left panel)
2. In the "Environment" dropdown, select "Injected Provider - MetaMask"
3. MetaMask will prompt you to connect - click "Connect"
4. Ensure you're connected to LazAI Testnet in MetaMask

#### **Deploy Contract**

1. Under "Contract" dropdown, select "Counter"
2. Click "Deploy" button
3. MetaMask will open asking you to confirm the transaction
4. Review gas fees and click "Confirm"
5. Wait for transaction confirmation


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lazai.network/quickstart/deploy-your-first-smart-contract/deploy-with-remix.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
