# Deploying Contracts

```bash
cd Oracle-Contract
```

* Set the env Variables

```bash
cp .env.example .env
```

* Add `RPC_URL` for your chain and `PRIVATE_KEY` of the wallet containing funds to deploy the contracts.

If you are running OpStack Rollup , refer [here](https://stack.optimism.io/docs/build/getting-started/#use-your-rollup)

* Deploy the contracts

```bash
npx hardhat run scripts/deploy.js --network custom
```

It will log the Contract Addresses , Copy and Save it somewhere

Example message could be :

```bash
Deploying the Price Oracle V1 ...
Price Oracle V1 deployed at 0xfc6bf8AFB880c6159E7ec617BdEaFA077F4e72E3
Deploying the VRF Oracle V2 ...
VRF Oracle V2 deployed at 0x19285929B6B47386298082e6BC7e9B0a184BE0fB
Deploying the Optimistic Oracle V2 ...
Optimistic Oracle V2 deployed at 0x42F5d36Cb22f7ABB5b98eBe022AEe15F2621a20e
Deploying the Optimistic Oracle V3 ...
Optimistic Oracle V2 deployed at 0x3A6e2395Ca765Ea4443a7929316232B5E5390111
Deploying the API Oracle ...
API Oracle deployed at 0x37ba116Aa1aEdd1bCbFE4866F916FCA7B1272907
```


---

# 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://datum.gitbook.io/datum/oracle-node/deploying-contracts.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.
