Skip to content
Back to Blog
Developers

Guide to Getting Started with Gelato Web3 Functions

Read Time: 3 mins
Guide to Getting Started with Gelato Web3 Functions

This article is part of Rootstock’s series “Building DeFi on Bitcoin” exploring different solutions and integrations on the Rootstock blockchain that enable scaling Bitcoin, bringing DeFi capabilities to the world’s first blockchain.

Gelato, the famous rollup-as-a-service platform, has recently announced its integration with Rootstock. Through Gelato middleware services, Rootstock devs can now easily automate workflows & offer gasless transactions in their dApps.

In this article, we explore a step-by-step guide to getting started with Gelato’s web3 functions.

Getting started with Gelato web3 functions

Step 1: Whitelist your address

Reach out to the Gelato team on Discord to get your address whitelisted.

Step 2: Deploy smart contracts

Deploy the smart contracts you want to automate.

Step 3: Create a function

Visit Gelato Function Creation to start setting up your function.

Choosing a Trigger

Trigger Types

  • Time Interval: Executes tasks at regular intervals, such as every 10 minutes.
  • Cron Expressions: Schedules tasks for specific times, e.g., “every Tuesday at 3 PM”.
  • On-Chain Event: Triggers tasks based on specific blockchain events.
  • Every Block: Executes tasks with each new blockchain block.

Select What to Trigger

  1. Typrscript Functions: Allows developers to execute on-chain transactions based on onchain conditions and off-chain data (APIs, subgraphs, etc.) and computations.
  2. Solidity Functions: Allows developers to execute on-chain transactions based on on-chain conditions
  3. Transactions:

Typescript Functions

Check the Quickstart Guide and Video Tutorial on how to write, test, deploy & run Typescript functions

Creating Typescript Function Task

  • Enter Typescript IPFS CID: After creating your Typescript function, enter the IPFS CID returned.
  • If your Typescript function needs secret variables or API keys, securely enter them in the Task Secrets section. For every secret:
    • Key: Define each secret’s name (e.g., “API_KEY”).
    • Value: Enter the associated secret value.
  • Select the Network: Choose “rootstock” as the network for deployment.

Finalize Task Creation

Enter the task name in the Task properties and click Create Task to finalize.

Solidity Functions

Check the Quickstart Guide and Video Tutorial on how to write, test, deploy & run Typescript functions

Creating Solidity Function Task

  • Select the Network: Choose “rootstock” as the network for deployment.
  • Enter the Ethereum Address: Enter the Ethereum address of your deployed Solidity contract.
  • Select Checker Function: From the Checker Function dropdown, choose the specific function you want as a condition checker.
  • Specify Target Contract: Enter the contract where the automated function call will be sent.

Transactions

Check the Quickstart Guide and Video Tutorial on how to write, test, deploy & run Transactions.

  • No Custom Code Required: For initiating transaction tasks, there’s no need for you to write code. Simply set your desired trigger and move forward.

Final Step

  • Create Task: Finally, click the “Create Task” button. It’s that simple!

About Gelato

Gelato is a web3 cloud platform enabling developers to create advanced smart contracts that are automated, gas-efficient, and capable of operating off-chain. Top web3 projects depend on Gelato to facilitate the execution of millions of transactions throughout DeFi, NFT, and gaming ecosystems. So if you’ve ever used AAVE, Sushiswap, Abracadabra, MakerDAO, and Beefy Finance then you’ve unknowingly interacted with Gelato’s tech.

Website | X | Discord | Telegram

Building on Bitcoin?

If you’re getting started with building on Bitcoin with Rootstock, you’ll find these guides helpful:

 

Enjoying the content for developers? Head to the Rootstock dev portal for comprehensive guides.

Recommended articles

Moving BTC with the PowPeg App: User Guide

Moving BTC with the PowPeg App: User Guide

In the previous article, we explored how the PowPeg works, and what to expect when using it to move your Bitcoin in and out of Rootstock.  Here, we continue to explore how the PowPeg App works from a user perspective in a step-by-step guide including: Connecting your wallet Having sufficient funds of BTC Performing a […]

Users
Rootstock Attestation Service (RAS) Is Now Live on Rootstock Explorer v3

Rootstock Attestation Service (RAS) Is Now Live on Rootstock Explorer v3

The Rootstock Attestation Service (RAS) is officially live on Rootstock Explorer v3. This new release is empowering developers and enterprises to build verifiable, tamper-proof, and decentralized trust layers on the Bitcoin’s most secure DeFi layer. Developers can now easily create, anchor, and verify attestations directly through the Explorer interface, streamlining the way on-chain and off-chain […]

Developers
PowPeg v3.0 Is Live: The Smartest & Most Secure Way to Bitcoin Bridging

PowPeg v3.0 Is Live: The Smartest & Most Secure Way to Bitcoin Bridging

The Best Way to Bridge BTC to Rootstock Just Got Even Better! The latest upgrade to PowPeg, Bitcoin’s most secure and trust-minimized bridge, delivers serious improvements in user experience, institutional access, and wallet compatibility. Seamless wallet support via Reown + WalletConnect Mobile-friendly QR code bridging Advanced control with UTXO selection One-tap bridging with the new […]

Developers