Search
As an example use-case, we will build a price oracle for the $Atom token in order to store ATOM/USD price on-chain.
# Setup and Config
We will be using Starport (opens new window) to setup our blockchian.
Follow the Starport docs to get your app up and running.
# Import the Oracle Module
Import the Oracle module into app/app.go. You can take a look at https://github.com/relevant-community/oracle/blob/main/app/app.go and search for instances of oraclekeeper and oracletypes.
Note: make sure to add the OracleModule to the paramsKeeper.
# Configure Oracle Parameters
We need to set some parameters for our oracle type.
In config.yaml add:
Note AtomClaim is the claim type we will need to use when submitting our cliams.
The oracle can process any number of claim types - simply add them to the claim_params map