> For the complete documentation index, see [llms.txt](https://datum.gitbook.io/datum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://datum.gitbook.io/datum/oracle-node/deploying-contracts.md).

# 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
```
