-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples/rofl-oracle/oracle: Cleanup
- move deploy script to task - remove sapphire-hardhat as it's not needed - simplify commands and docs
- Loading branch information
Showing
9 changed files
with
198 additions
and
4,498 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,41 @@ | ||
# Simple ROFL Oracle Contract | ||
|
||
See the ROFL tutorial for some examples on how to use this project. | ||
For the ROFL Oracle smart contract delpoyment you will need the following | ||
information: | ||
|
||
- the ROFL app ID (rofl1...) | ||
- the deployer's private key | ||
- the network you're deploying to (sapphire-testnet, sapphire-localnet, | ||
sapphire) | ||
|
||
First install dependencies and compile the smart contract: | ||
|
||
```shell | ||
npm install | ||
npx hardhat compile | ||
``` | ||
|
||
Then, prepare your hex-encoded private key for paying the deployment gas fee | ||
and store it as an environment variable: | ||
|
||
```shell | ||
export PRIVATE_KEY=0x... | ||
``` | ||
|
||
Finally, deploy the contract, provide the ROFL App ID and the network: | ||
|
||
```shell | ||
npx hardhat deploy rofl1... --network sapphire-localnet | ||
``` | ||
|
||
Once your Oracle ROFL is running, it will submit the observations to the smart | ||
contract deployed above. You can fetch the data stored on-chain by running: | ||
|
||
```shell | ||
npx hardhat oracle-query 0xbdEd0D2bf404bdcBa897a74E6657f1f12e5C6fb6 --network sapphire-localnet | ||
``` | ||
|
||
For more information check out the [ROFL tutorial]. | ||
|
||
[ROFL tutorial]: https://github.com/oasisprotocol/oasis-sdk/blob/main/docs/rofl/app.md | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.