# Deployment to Luntra Infrastructure

### **Environment Setup**

Create `.env` file:

```sh
# .env
PRIVATE_KEY=your_private_key_here
LUNTRA_RPC_URL=https://luntra.rpc.caldera.xyz/http
```

Load environment variables:

```sh
source .env
```

### Deploy Contract

#### Method 1: Using Private Key

```sh
forge script script/Counter.s.sol:CounterScript \
  --rpc-url https://luntra.rpc.caldera.xyz/http \
  --private-key $PRIVATE_KEY \
  --broadcast
```

#### Method 2: Using Environment Variable

```sh
forge script script/Counter.s.sol:CounterScript \
  --rpc-url $LUNTRA_RPC_URL \
  --private-key $PRIVATE_KEY \
  --broadcast \
  --verify
```

#### Method 3: Using Named Network

```sh
forge script script/Counter.s.sol:CounterScript \
  --rpc-url luntra \
  --private-key $PRIVATE_KEY \
  --broadcast
```

### Interactive Deployment

```sh
# Deploy with confirmation prompts
forge script script/Counter.s.sol:CounterScript \
  --rpc-url luntra \
  --private-key $PRIVATE_KEY \
  --broadcast \
  --slow
```


---

# 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://luntra.gitbook.io/luntra-infrastructure/smart-contract-guide-using-foundry/deployment-to-luntra-infrastructure.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.
