modulepackage
0.0.0-20240424112144-637d22ce59ea
Repository: https://github.com/opal-project-dev/oracle.git
Documentation: pkg.go.dev
# README
Opal Deployment Guide
The Opal deployment is not that combersome as the Platypus project, however still requires some elbow grease.
1. Deploy the mock chainlink oracle (do not use in prod)
- Generate the Ethereum key pair (you can use Metamask for that) for the oracle wallet.
- Deploy the smart contract through Remix (just copy-paste the code). Save the address.
- Transfer the ownership of the smart contract to the oracle wallet.
- Build the oracle service via Docker.
- Update the config here. Change the
internal_address
to the address of the smart contract and provide thewallet
keys.
The oracle service fetches Bitcoin prices from Coingecko and pushes them to the oracle smart contract. The opal project then uses this feed to calculate the interest rates.
Don't forget to fund the oracle wallet.
2. Deploy the smart contracts
Here are the steps to deploy the smart contracts:
- Locate the smart contracts package here.
- Run
npm install
. - Update the
hardhat.config.js
with the new piccadilly RPC URL. - Create
.env
file referencing the.env.example
. - Update the config file here.
CHAINLINK_AUTUSD_PROXY
is the mock oracle from the previous step.GENERAL_SAFE
andOPL_SAFE
are the addresses that initially receive the OPL tokens.OPL_SAFE
won't be able to transfer the tokens for 1 year. TheDEPLOYER
is the address of the deployer. - To deploy the contracts run
npx hardhat run mainnetDeployment/mainnetDeployment.js --network piccadilly
. Save the addresses.
3. Deploy the front end
You will need to update the configs for the dev-frontend
and lib-ethers
packages.
- Locate the front end package here.
- Update all the necessary addresses and network chainid as in the example.
- Build the front end via
yarn build
.
Disclaimer
GLHF!