2️⃣Typescript Function

What are Typescript Functions?

Typescript Functions are decentralized cloud functions. They enable developers to execute on-chain transactions based on arbitrary off-chain data (APIs / subgraphs, etc) & computation. These functions are written in Typescript, stored on IPFS and run by Gelato.

Typescript Functions enable automation in conjunction with the various trigger types outlined on our Trigger Types page.

Essential Role of Typescript Functions

  • Seamless Integration with Off-Chain Data: They provide an elegant solution for incorporating real-time data from the outside world, enabling smart contracts to respond to external events and changes.

  • Enhanced Computation Capabilities: Typescript Functions allow for complex calculations that would be too gas-intensive to perform on-chain, facilitating more sophisticated decision-making processes in your DApps.

  • Customizable Logic Execution: Developers can bring the full power of Typescript to create flexible advanced logic to deliver their application use cases.

Next steps

Head over to our quick start guide and get hands on with writing typescript functions:

Writing Typescript Functions

When you use an on-chain event to trigger your Typescript function you can tap into the full context of this event - learn more here:

Event Trigger

Last updated