Setup Local Development Environment

In this section, we setup a local development that offers a local blockchain with Sight Oracle stack deployed

Create Local Sight Deployment

Get Sight example repository

Sight example repository comes with Contract example and the script to automatically setup local environment.

git clone https://github.com/sight-ai/sight-oracle-contract-example-hardhat

Once the repository is completed, create the .env file then install the dependencies.

cd sight-oracle-contract-example-hardhat

cp -f .env.example .env

npm install

Now, use npm run command to setup local Sight environment

npm run sight:stop ;npm run sight:start

The process shall run for a few minutes, depending on your network condition.

Once the command finishes, following components are setup:

  • An evm Blockchain with RPC: http://localhost:18545

  • Oracle Service

  • A fhevm integrated Blockchain as backend

  • A mysql database

Congratulations, now you have Sight Oracle development environment successfully setup. You can find Sight Oracle address from .env file like this:

ORACLE_CONTRACT_ADDRESS=0x0081e1fbCAa636A1960C4C5D37330C1EB3Dab0c9

Please leave this terminal open, we will continue other operations in another terminal.

Last updated