Skip to content

Updated gelato docs #662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified images/guides/gelato/dedicated-msg-sender.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/guides/gelato/storage-pyth-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/guides/gelato/task-creation-gist-id.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/guides/gelato/task-execution.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions pages/price-feeds/schedule-price-updates/using-gelato.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,18 @@ The Gelato task reads a yaml configuration file from a GitHub gist.
Create a GitHub gist by logging into GitHub and navigating to [here](https://gist.github.com/). Add a file called `config.yaml`.
Copy the [example gist](https://gist.github.com/swimricky/18b2a5ad9c1a605f1cf5c19ac1d2f1d9) and edit the parameters for
the environment you're deploying to and configure your price feeds and update thresholds. See
[directory](https://github.com/pyth-network/w3f-pyth-poc-v2/tree/master/web3-functions/pyth-oracle-w3f-priceIds) for
[directory](https://github.com/pyth-network/pyth-gelato-price-pusher) for
some example configuration files. These parameters can be updated at any time by editing the gist even if the task has
already been deployed. The task will automatically pick up these configuration changes and use them for subsequent executions.

#### 3. Create the task

Use the link below to auto-populate the task parameters with the Pyth web3 function code:

https://app.gelato.network/new-task?cid=QmTFQHpiThqkVKvuW2KU8cETNBdyXHB9uP34woL6Vc5w6g
https://app.gelato.network/new-task?cid=QmbNPFa3ixUpphUzKJwq3F9bjC9w63FBYQ4iV3s2LpiftN

The pyth web3 function code is deployed to IPFS, so you can use it via the cid/link above.
You can find a copy of the web3 function code [here](https://github.com/pyth-network/w3f-pyth-poc-v2/tree/master/web3-functions/pyth-oracle-w3f-priceIds)

You can find a copy of the web3 function code [here](https://github.com/pyth-network/pyth-gelato-price-pusher/tree/main/web3-functions/pyth-oracle-w3f-priceIds)
Choose network, and then in the "Task secrets" section, set `GIST_ID` to the gistId of the gist you created in step 2.
![](../../../images/guides/gelato/task-creation-gist-id.png)

Expand Down Expand Up @@ -117,6 +116,6 @@ rate-limited by GitHub. To verify that your most recent task execution used the
## Notes

If you want to customize the behavior of the web3 function beyond what is supported by updating the config.yaml, you can
clone this [repo](https://github.com/pyth-network/w3f-pyth-poc-v2) and deploy your own version of the web3 function.
You can then use the cid of your deployed web3 function to create a new task. See [README.md](https://github.com/pyth-network/w3f-pyth-poc-v2/tree/master/web3-functions/pyth-oracle-w3f-priceIds/README.md) and
clone this [repo](https://github.com/pyth-network/pyth-gelato-price-pusher) and deploy your own version of the web3 function.
You can then use the cid of your deployed web3 function to create a new task. See [README.md](https://github.com/pyth-network/pyth-gelato-price-pusher/blob/main/README.md) and
[Gelato Web3 Function Documentation](https://docs.gelato.network/web3-services/web3-functions) for more details.
Loading