You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/price-feeds/schedule-price-updates/using-gelato.mdx
+18-25Lines changed: 18 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -7,22 +7,21 @@ update the on-chain price after either a fixed time interval or if the price has
7
7
8
8
[Gelato](https://www.gelato.network/) is web3’s decentralized backend empowering developers to create augmented smart contracts that are automated,
9
9
gasless and off-chain aware on all major EVM-compatible blockchains. Gelato offers Web3 Functions (W3F) that connect your
10
-
smart contracts to off-chain data and computation by running decentralized cloud functions
10
+
smart contracts to off-chain data and computation by running decentralized cloud functions.
11
11
12
12
### Gelato W3F Pyth Task
13
13
14
14
The Gelato W3F Pyth Task is a Gelato task that updates Pyth price feeds on a schedule.
15
15
The task is deployed to IPFS and can be used by anyone to schedule price updates for any Pyth price feed.
16
-
The task is configured via a yaml file that is hosted on GitHub gist which contains various parameters such as the price
17
-
feeds to update, the update frequency, price deviation threshold. Once the task is deployed, these configuration
18
-
parameters can be updated by editing the GitHub gist and without needing to redeploy the task.
16
+
The task is configured via file called `config.yaml` which contains various parameters such as the price
17
+
feeds to update, the update frequency, price deviation threshold.
19
18
20
19
## Steps
21
20
22
21
#### 1. Join Gelato Web3 Functions whitelist
23
22
24
-
Web3 Functions are currently in private beta. In order to use them, you must be added to the whitelist. Apply to the
25
-
whitelist by reaching out to the Gelato team [here](https://form.typeform.com/to/RrEiARiI).
23
+
Web3 functions like Solidity functions and automated transactions can be used directly. However, to use TypeScript-based Web3 Functions, you must be added to the whitelist.
24
+
To apply, please reach out to the Gelato team for access [here](https://discord.com/invite/ApbA39BKyJ).
26
25
27
26
#### 2. Configure your task
28
27
@@ -40,32 +39,27 @@ already been deployed. The task will automatically pick up these configuration c
40
39
41
40
Use the link below to auto-populate the task parameters with the Pyth web3 function code:
The pyth web3 function code is deployed to IPFS, so you can use it via the cid/link above.
46
45
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)
47
46
48
47
Choose network, and then in the "Task secrets" section, set `GIST_ID` to the gistId of the gist you created in step 2.
**Note that the beta currently only supports triggering the task every minute. Once other time intervals are available,
52
-
you will need to ensure that your current subscription plan with Gelato supports the desired number of monthly runs.
53
-
See [Subscription Plans](https://beta.app.gelato.network/subscriptions)**.
50
+
**Note that the free tier have certain limits, Checkout all subscription plans and choose the one that best fits your needs [here](https://app.gelato.network/1balance/subscriptions/functions?networkGroup=mainnets&type=monthly)**.
54
51
55
52
#### 4. Fund the task
56
53
57
-
There are two sets of fees that must be paid before the task can execute successfully
54
+
There are two sets of fees that must be paid before the task can execute successfully :
58
55
59
56
**Gelato Fees**
60
57
61
-
Gelato's fees are paid through [1Balance](https://docs.gelato.network/developer-services/1balance). Once you are
62
-
whitelisted, visit the [1Balance app](https://beta.app.gelato.network/balance) and deposit USDC on Polygon to top up
58
+
Gelato's fees are paid through [1Balance](https://docs.gelato.network/web3-services/1balance). Once you are
59
+
whitelisted, visit the 1Balance section on [Gelato app](https://app.gelato.network/1balance) and deposit USDC on Polygon to top up
63
60
your Gelato balance which will be used to pay the Gelato fees on all supported chains. These include computational costs
64
-
and transaction gas fees. Testnet executions are subsidized by Gelato and free. Make sure to create your 1Balance account
65
-
using the same wallet address that you used to create the Gelato task.
Once your task has been successfully created, you can check the task execution details in the Gelato app.
96
-
[Example Pyth Web3 Function on Mumbai](https://beta.app.gelato.network/task/0x2c64539daaeb86addd6f556b68251a2fdf0df5c09ec07b8a30a2fbf76f4fe907?chainId=80001)
88
+
Once your task has been successfully created, you can check the task execution details on the Task dashboard in the Gelato app.
@@ -126,4 +119,4 @@ rate-limited by GitHub. To verify that your most recent task execution used the
126
119
If you want to customize the behavior of the web3 function beyond what is supported by updating the config.yaml, you can
127
120
clone this [repo](https://github.com/pyth-network/w3f-pyth-poc-v2) and deploy your own version of the web3 function.
128
121
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
129
-
[Gelato Web3 Function Documentation](https://docs.gelato.network/developer-services/web3-functions) for more details.
122
+
[Gelato Web3 Function Documentation](https://docs.gelato.network/web3-services/web3-functions) for more details.
0 commit comments