Skip to content

Commit 4893b7a

Browse files
committed
first commit def call doc
1 parent aaddbd0 commit 4893b7a

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

docs/learn/asc/deferred-calls.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
id: deferred-calls
3+
sidebar_label: Deferred calls
4+
---
5+
6+
# Deferred Calls
7+
8+
9+
TODO
10+
11+
12+
Massa is the first blockchain to implement Deferred Calls in smart contracts ? 🚀
13+
14+
This unique feature lets developers schedule actions in the future, enabling advanced automation and seamless interactions between DApps.
15+
16+
Deferred Calls, unlocking powerful capabilities for smart contracts to execute advanced, time-sensitive actions autonomously.

docs/learn/asc/vs.mdx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
id: versus
3+
sidebar_label: Async msg vs Deferred Calls
4+
---
5+
6+
# Asynchronous Messages vs Deferred Calls
7+
8+
9+
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.
10+
11+
## Async Msg
12+
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.
13+
14+
15+
## Deferred Calls
16+
17+
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.
18+
19+
20+
## Comparison
21+
22+
The following table highlights the main differences between the two methods:
23+
24+
| **Feature** | **Async Msg** | **Deferred Calls** |
25+
| --- | --- | --- |
26+
| **Execution Guarantee** | No | Yes (if reservation fees are paid) |
27+
| **Use Cases** | Running an autonomous AI, evolving NFTs | Trading bot, Detecting and liquidating under-collateralized positions, advancing game state, Transfert liquidity |
28+
| **Benefits** | Enables asynchronous communication between smart contracts | Guarantees the execution of scheduled calls |

sidebars.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,14 @@ const sidebars = {
177177
type: "doc",
178178
id: "learn/asc/massa-asc",
179179
},
180+
{
181+
type: "doc",
182+
id: "learn/asc/deferred-calls",
183+
},
184+
{
185+
type: "doc",
186+
id: "learn/asc/versus",
187+
},
180188
{
181189
type: "doc",
182190
id: "learn/asc/use-cases",

0 commit comments

Comments
 (0)