Guide to help people understand how to use the @doot-oracles/client
npm package with their smart contract.
-
Clone the repository
git clone https://github.com/Doot-Foundation/doot_example.git
-
Move into the directory and install the packages. This includes the
@doot-oracles/client
package by default.cd doot_example/
npm install
-
Visit https://doot.foundation/dashboard and after logging in click on your API key to copy it to the clipboard. In your cloned project you will see a
.env.example
, using the same contents create a new.env
file and paste the API key afterDOOT_API_KEY=
. The final result should be a new .env file with your API key. -
Build the project
npm run build
-
Run the example
node build/src/interact.js
You will be presented with the current exchange rates between $MINA
and $ETH
.