Getting Started: Overview
This multi-part tutorial guides you through building a complete workflow from a blank slate.
What you'll build
You will build a simple but powerful "Onchain Calculator" workflow. By the end of this tutorial, your workflow will:
- Run on a schedule using the Cron Trigger.
- Fetch a random number from a public API using the HTTP Capability.
- Read a value from a smart contract using the EVM Read Capability.
- Combine the two values and write the final result back to the blockchain using the EVM Write Capability.
This tutorial is designed to teach you the core features of the CRE SDK in a logical progression. You can use any of the supported languages, Go or TypeScript using the language selector. By the end, you'll have a solid understanding of the end-to-end development process for building and simulating workflows that interact with both offchain and onchain data sources.
Where to go next?
- Installing the CLI: Download and install the
crecommand-line tool.
Tutorial structure
-
Part 1: Project Setup & Simulation: Initialize a new, blank CRE project and run your first "Hello World!" simulation.
-
Part 2: Fetching Offchain Data: Modify your workflow to fetch data from an external API using the
http.Client. -
Part 3: Reading an Onchain Value: Generate contract bindings and use the
evm.Clientto read a value from the blockchain. -
Part 4: Writing Onchain: Complete the calculator by writing your computed result back to a smart contract on Sepolia.
-
Conclusion: Review what you've learned and find resources to continue your journey.