An Oracle Network for sourcing and verifying data from restricted APIs on Move oriented blockchains.
The first Oracle supported is an Oracle for X (Twitter) data.
- Rooch Network
- Aptos
- Sui
See Rooch Network Doc for more information on local development, and testing instructions.
Contracts:
- Testnet:
0x9ce8eaf2166e9a6d4e8f1d27626297a0cf5ba1eaeb31137e08cc8f7773fb83f8
- Pre-mainnet:
0x9ce8eaf2166e9a6d4e8f1d27626297a0cf5ba1eaeb31137e08cc8f7773fb83f8
Oracles:
- X (Twitter):
0x694cbe655b126e9e6a997e86aaab39e538abf30a8c78669ce23a98740b47b65d
See Aptos Doc for more information on local development, and testing instructions.
Contracts:
- Testnet:
0xa2b7160c0dc70548e8105121b075df9ea3b98c0c82294207ca38cb1165b94f59
Oracles:
- X (Twitter):
0x6b516ae2eb4aac47ffadd502cf19ce842020f515f1abea3e154cfc053ab3ab9a
Before running the script, ensure you have the following prerequisites installed:
- Node.js: Alongside npm, yarn, or pnpm package managers.
npm install
# or
yarn install
# or
pnpm install
If you're not already running PostgreSQL locally, you can use Docker to set it up quickly. Follow these steps:
Ensure your .env
file contains the following PostgreSQL credentials:
POSTGRES_USER=your_username
POSTGRES_PASSWORD=your_password
POSTGRES_DB=your_database
Replace your_username
, your_password
, and your_database
with your desired PostgreSQL username, password, and database name.
Use Docker Compose to start a PostgreSQL container. Create a docker-compose.yml
file with the following content:
version: '3.1'
services:
db:
image: postgres
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5432:5432"
Run the following command to start the PostgreSQL container in detached mode:
docker-compose up -d
This will start a PostgreSQL instance accessible on port 5432 of your localhost, using the credentials specified in your .env
file.
This will update your database schema according to your models.
pnpm prisma:generate
pnpm prisma:deploy
Copy the example environment file to create your own .env
file:
cp .env.example .env
To support Rooch Network, export the Rooch Private Key:
rooch account export --address <Rooch Address>
To connect to the local Rooch node, set ROOCH_CHAIN_ID
to "localnet"
.
Otherwise, connect to testNet by setting ROOCH_CHAIN_ID
to "testnet"
, or to TestNet by setting ROOCH_CHAIN_ID
to "testnet"
.
Ensure that ROOCH_ORACLE_ADDRESS
is set to the address of the deployed module, e.g., "0x85859e45551846d9ab8651bb0b6f6e1740c9d758cfda05cfc39d49e2a604d783"
.
To support Aptos Network, set APTOS_PRIVATE_KEY
to your Aptos Wallet Private Key.
Start the development server for your application. This step might vary depending on your project setup; the command below assumes a typical setup.
npm run dev
# or
yarn dev
# or
pnpm dev