Skip to content

Red Stone PoC that updates the price when deviation is greater than 20%

Notifications You must be signed in to change notification settings

gelatodigital/w3f-redstone-poc-v2

Repository files navigation

Gelato Web3 functions <<-->> RedStone PoC

Summary

Oracle that using RedStone and Gelato Web3 functions to:

  • Push on-chain price if the price difference between stored and live price is gerater than 20%

Demo

Deploy your smart contract and web3 function

yarn run deploy 

How to run

  1. Install project dependencies:
yarn install
  1. Create a .env file with your private config:
cp .env.example .env

You will need to input your PROVIDER_URLS, your RPC.

  1. Test the web3 function
npx w3f test web3-functions/redstone/index.ts --logs --chain-id=80001
  1. Deploy the web3 function on IPFS
npx w3f deploy web3-functions/redstone/index.ts

✓ Web3Function deployed to ipfs. ✓ CID: QmbZTooFHkFY1Td1SFd1Mfp8RTzuUN3QKbw1csioBFEcFx

  1. Create the task following the link provided when deploying the web3 to IPFS in our case:

Go to https://app.gelato.network and input cid=QmbZTooFHkFY1Td1SFd1Mfp8RTzuUN3QKbw1csioBFEcFx

About

Red Stone PoC that updates the price when deviation is greater than 20%

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published