You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/book/src/blockchain-development/calling_contracts.md
+7-1
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@ warning
141
141
29 ||
142
142
30 || // Storage update _after_ external call
143
143
31 || storage.balances.insert(sender, 0);
144
-
||__________________________________________- Storage modification after external contract interaction infunctionor method "withdraw". Consider making all storage writes before calling another contract
144
+
||__________________________________________- Storage write after external contract interaction infunctionor method "withdraw". Consider making all storage writes before calling another contract
145
145
32 | }
146
146
33 | }
147
147
|
@@ -150,6 +150,12 @@ ____
150
150
151
151
In case there is a storage read after an interaction, the CEI analyzer will issue a similar warning.
152
152
153
+
In addition to storage reads and writes after an interaction, the CEI analyzer reports analogous warnings about:
154
+
155
+
- balance tree updates, i.e. balance tree reads with subsequent writes, which may be produced by the `tr` and `tro` asm instructions or library functions using them under the hood;
156
+
- balance trees reads with `bal` instruction;
157
+
- changes to the output messages that can be produced by the `__smo` intrinsic functionor the `smo` asm instruction.
158
+
153
159
## Differences from the EVM
154
160
155
161
While the Fuel contract calling paradigm is similar to the EVM's (using an ABI, forwarding gas and data), it differs in _two_ key ways:
StorageWriteAfterInteraction{block_name} => write!(f,"Storage modification after external contract interaction in function or method \"{block_name}\". \
226
-
Consider making all storage writes before calling another contract"),
227
-
StorageReadAfterInteraction{block_name} => write!(f,"Storage read after external contract interaction in function or method \"{block_name}\". \
228
-
Consider making all storage reads before calling another contract"),
# check: $()Storage modification after external contract interaction in function or method "deposit". Consider making all storage writes before calling another contract
3
+
# check: $()Storage write after external contract interaction in function or method "deposit". Consider making all storage writes before calling another contract
# check: $()Storage modification after external contract interaction in function or method "deposit". Consider making all storage writes before calling another contract
3
+
# check: $()Storage write after external contract interaction in function or method "deposit". Consider making all storage writes before calling another contract
# check: $()Balance tree read after external contract interaction in function or method "deposit". Consider making all balance tree reads before calling another contract
# check: $()Output message sent after external contract interaction in function or method "deposit". Consider sending all output messages before calling another contract
# check: $()Balance tree update after external contract interaction in function or method "deposit". Consider making all balance tree updates before calling another contract
0 commit comments