Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 1.43 KB

README.md

File metadata and controls

49 lines (34 loc) · 1.43 KB

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