-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
id: deferred-calls | ||
sidebar_label: Deferred calls | ||
--- | ||
|
||
# Deferred Calls | ||
|
||
|
||
TODO | ||
|
||
|
||
Massa is the first blockchain to implement Deferred Calls in smart contracts ? 🚀 | ||
|
||
This unique feature lets developers schedule actions in the future, enabling advanced automation and seamless interactions between DApps. | ||
|
||
Deferred Calls, unlocking powerful capabilities for smart contracts to execute advanced, time-sensitive actions autonomously. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
id: versus | ||
sidebar_label: Async msg vs Deferred Calls | ||
--- | ||
|
||
# Asynchronous Messages vs Deferred Calls | ||
|
||
|
||
When developing dApps on the Massa blockchain, it's essential to choose the right method interacting in automated ways with the blockchain.This documentation presents the differences between these two approaches and explains when to use each. | ||
|
||
## Async Msg | ||
Async Msg are used to send asynchronous messages to smart contracts. They're ideal for cases where a smart contract needs to perform an action in the future without waiting for a response. However, please note that the execution of Async Msg is not guaranteed. | ||
|
||
|
||
## Deferred Calls | ||
|
||
Deferred Calls are used to schedule calls to smart contracts at a later time. The key difference between Deferred Calls and Async Msg is that Deferred Calls guarantee the execution of the scheduled call, provided that the reservation fees have been paid. This means that the call will be executed at the specified time (Slot), and the blockchain will ensure that the execution is attempted once. If the call fails for any reason, it will not be retried. | ||
|
||
|
||
## Comparison | ||
|
||
The following table highlights the main differences between the two methods: | ||
|
||
| **Feature** | **Async Msg** | **Deferred Calls** | | ||
| --- | --- | --- | | ||
| **Execution Guarantee** | No | Yes (if reservation fees are paid) | | ||
| **Use Cases** | Running an autonomous AI, evolving NFTs | Trading bot, Detecting and liquidating under-collateralized positions, advancing game state, Transfert liquidity | | ||
| **Benefits** | Enables asynchronous communication between smart contracts | Guarantees the execution of scheduled calls | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters