Skip to content
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
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ This transaction demonstrates how to chain multiple DeFi operations atomically,
[zap]: ./breakthislinkfornow
[zapper]: ./breakthislinkfornow
[`/cadence/transactions/increment_fi_restake.cdc`]: https://github.com/onflow/flow-actions-scaffold/blob/main/cadence/transactions/increment_fi_restake.cdc
[scheduled transactions]: ./scheduled-callbacks-introduction.md
[scheduled transactions]: ./scheduled-transactions-introduction.md
[Export]: https://docs.wallet.flow.com/tutorial/extension-private-key-and-seed-phrase-guide
[Cadence]: https://cadence-lang.org/docs
[staking app]: https://app.increment.fi/staking
Expand Down
10 changes: 5 additions & 5 deletions docs/blockchain-development-tutorials/flow-actions/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: Flow Actions
description: A series of tutorials on building decentralized finance applications using the Flow Actions framework and scheduled callbacks.
description: A series of tutorials on building decentralized finance applications using the Flow Actions framework and scheduled transactions.
sidebar_position: 3
keywords:
- flow actions
- cadence interfaces
- cadence actions
- Flow Actions
- defi workflows
- scheduled callbacks
- scheduled transactions
- time-based execution
- blockchain automation
- flow blockchain
Expand All @@ -19,7 +19,7 @@ keywords:

# Flow Actions Tutorials

This series covers how to build decentralized finance applications using the Flow Actions framework and scheduled callbacks, enabling developers to create composable, automated DeFi workflows.
This series covers how to build decentralized finance applications using the Flow Actions framework and scheduled transactions, enabling developers to create composable, automated DeFi workflows.

:::warning

Expand All @@ -34,12 +34,12 @@ These tutorials will be updated, but you may need to refactor your code if the i
- **[Introduction to Flow Actions]** - Learn about Flow Actions, a suite of standardized Cadence interfaces that enable developers to compose complex DeFi workflows using small, reusable components.
- **[Connectors]** - Understand how connectors bridge standardized Flow Actions interfaces with different DeFi protocols.
- **[Basic Combinations]** - Learn how to combine Flow Actions to create new workflows.
- **[Scheduled Callbacks Introduction]** - Learn how to implement scheduled callbacks for time-based smart contract execution on Flow.
- **[Scheduled Transactions Introduction]** - Learn how to implement scheduled transactions for time-based smart contract execution on Flow.

<!-- Relative links, will not render on page -->

[FLIP 339]: https://github.com/onflow/flips/pull/339/files
[Introduction to Flow Actions]: ./intro-to-flow-actions.md
[Connectors]: ./connectors.md
[Scheduled Callbacks Introduction]: ./scheduled-callbacks-introduction.md
[Scheduled transactions Introduction]: ./scheduled-transactions-introduction.md
[Basic Combinations]: ./basic-combinations.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Introduction to Scheduled Callbacks
description: Learn how to implement scheduled callbacks for time-based smart contract execution on Flow
title: Introduction to Scheduled Transactions
description: Learn how to implement scheduled transactions for time-based smart contract execution on Flow
sidebar_position: 5
keywords:
- scheduled callbacks
- scheduled transactions
- flow callback scheduler
- time-based execution
- blockchain automation
Expand All @@ -15,11 +15,11 @@ keywords:
- defi automation
---

# Introduction to Scheduled Callbacks
# Introduction to Scheduled Transactions

:::warning

Scheduled callbacks are a new feature that is under development and is a part of [FLIP 330]. Currently, they only work in the emulator. The specific implementation may change as a part of the development process.
Scheduled transactions are a new feature that is under development and is a part of [FLIP 330]. Currently, they only work in the emulator. The specific implementation may change as a part of the development process.

These tutorials will be updated, but you may need to refactor your code if the implementation changes.

Expand All @@ -31,18 +31,18 @@ As a result, most blockchain computers, including EVM and Solana, are not [Turin

While this limitation prevents infinite loops, it makes it so that you can't do anything 100% onchain if you need it to happen at a later time or after a trigger. As a result, developers must often build products that involve a fair amount of traditional infrastructure and requires users to give those developers a great amount of trust that their backend will execute the promised task.

Flow fixes this problem with **scheduled callbacks**. Scheduled Callbacks let smart contracts execute code at (or after) a chosen time without an external transaction. You schedule work now; the network executes it later. This enables recurring jobs, deferred actions, and autonomous workflows.
Flow fixes this problem with **scheduled transactions**. Scheduled transactions let smart contracts execute code at (or after) a chosen time without an external transaction. You schedule work now; the network executes it later. This enables recurring jobs, deferred actions, and autonomous workflows.

## Learning Objectives

After completing this tutorial, you will be able to:

- Understand the concept of scheduled callbacks and how they solve blockchain limitations
- Explain the key components of the FlowCallbackScheduler system
- Understand the concept of scheduled transactions and how they solve blockchain limitations
- Explain the key components of the FlowTransactionScheduler system
- Implement a basic scheduled callback using the provided scaffold
- Analyze the structure and flow of scheduled callback transactions
- Create custom scheduled callback contracts and handlers
- Evaluate the benefits and use cases of scheduled callbacks in DeFi applications
- Evaluate the benefits and use cases of scheduled transactions in DeFi applications

# Prerequisites

Expand All @@ -52,7 +52,7 @@ This tutorial assumes you have a modest knowledge of [Cadence]. If you don't, yo

## Getting Started

Begin by creating a new repo using the [Scheduled Callbacks Scaffold] as a template.
Begin by creating a new repo using the [Scheduled Transactions Scaffold] as a template.

This repository has a robust quickstart in the readme. Complete that first. It doesn't seem like much at first. The counter was at `0`, you ran a transaction, now it's at `1`. What's the big deal?

Expand Down Expand Up @@ -96,11 +96,11 @@ flow scripts execute cadence/scripts/GetCounter.cdc --network emulator
The result in your terminal should be similar to:

```zsh
briandoyle@Mac scheduled-callbacks-scaffold % flow scripts execute cadence/scripts/GetCounter.cdc --network emulator
briandoyle@Mac scheduledtransactions-scaffold % flow scripts execute cadence/scripts/GetCounter.cdc --network emulator

Result: 2

briandoyle@Mac scheduled-callbacks-scaffold % flow transactions send cadence/transactions/ScheduleIncrementIn.cdc \
briandoyle@Mac scheduledtransactions-scaffold % flow transactions send cadence/transactions/ScheduleIncrementIn.cdc \
--network emulator --signer emulator-account \
--args-json '[
{"type":"UFix64","value":"10.0"},
Expand All @@ -120,17 +120,17 @@ Authorizers [f8d6e0586b0a20c7]

# Output omitted for brevity

briandoyle@Mac scheduled-callbacks-scaffold % flow scripts execute cadence/scripts/GetCounter.cdc --network emulator
briandoyle@Mac scheduledtransactions-scaffold % flow scripts execute cadence/scripts/GetCounter.cdc --network emulator

Result: 2


briandoyle@Mac scheduled-callbacks-scaffold % flow scripts execute cadence/scripts/GetCounter.cdc --network emulator
briandoyle@Mac scheduledtransactions-scaffold % flow scripts execute cadence/scripts/GetCounter.cdc --network emulator

Result: 2


briandoyle@Mac scheduled-callbacks-scaffold % flow scripts execute cadence/scripts/GetCounter.cdc --network emulator
briandoyle@Mac scheduledtransactions-scaffold % flow scripts execute cadence/scripts/GetCounter.cdc --network emulator

Result: 3
```
Expand Down Expand Up @@ -591,24 +591,24 @@ The last case `return`s the function, so it doesn't set a new scheduled callback

## Conclusion

In this tutorial, you learned about scheduled callbacks, a powerful feature that enables smart contracts to execute code at future times without external transactions. You explored how scheduled callbacks solve the fundamental limitation of blockchain computers being unable to run unbounded loops or execute time-delayed operations.
In this tutorial, you learned about scheduled transactions, a powerful feature that enables smart contracts to execute code at future times without external transactions. You explored how scheduled transactions solve the fundamental limitation of blockchain computers being unable to run unbounded loops or execute time-delayed operations.

Now that you have completed this tutorial, you should be able to:

- Understand the concept of scheduled callbacks and how they solve blockchain limitations
- Understand the concept of scheduled transactions and how they solve blockchain limitations
- Explain the key components of the FlowCallbackScheduler system
- Implement a basic scheduled callback using the provided scaffold
- Analyze the structure and flow of scheduled callback transactions
- Create custom scheduled callback contracts and handlers
- Evaluate the benefits and use cases of scheduled callbacks in DeFi applications
- Evaluate the benefits and use cases of scheduled transactions in DeFi applications

Scheduled callbacks open up new possibilities for DeFi applications, enabling recurring jobs, deferred actions, and autonomous workflows that were previously impossible on blockchain. This feature represents a significant step forward in making blockchain more practical for real-world applications that require time-based execution.
Scheduled transactions open up new possibilities for DeFi applications, enabling recurring jobs, deferred actions, and autonomous workflows that were previously impossible on blockchain. This feature represents a significant step forward in making blockchain more practical for real-world applications that require time-based execution.

<!-- Reference-style links, will not render on page. -->

[FLIP 330]: https://github.com/onflow/flips/pull/331/files
[Turing Complete]: https://en.wikipedia.org/wiki/Turing_completeness
[Scheduled Callbacks Scaffold]: https://github.com/onflow/scheduledcallbacks-scaffold
[Scheduled Transactions Scaffold]: https://github.com/onflow/scheduledtransactions-scaffold
[Cadence]: https://cadence-lang.org/docs
[resource]: https://cadence-lang.org/docs/language/resources
[entitlement]: https://cadence-lang.org/docs/language/access-control#entitlements
Expand Down
2 changes: 1 addition & 1 deletion docs/blockchain-development-tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Flow will continue to provide quality walkthroughs and tutorials to provide deve
[Flow Actions Transactions]: ./flow-actions/flow-actions-transaction.md
[Connectors]: ./flow-actions/connectors.md
[Basic Combinations]: ./flow-actions/basic-combinations.md
[Scheduled Callbacks Introduction]: ./flow-actions/scheduled-callbacks-introduction.md
[Scheduled Transactions Introduction]: ./flow-actions/scheduled-transactions-introduction.md
[Cadence Development]: ./cadence/index.md
[Mobile Development]: ./cadence/mobile/index.md
[iOS Quickstart]: ./cadence/mobile/ios-quickstart.md
Expand Down
Loading
Loading