@@ -169,8 +169,8 @@ executed in `x/wasm` _with the permissions of the contract_ (meaning
169
169
` info.sender ` will be the contract not the original caller). If they return
170
170
success, they will emit a new event with the custom attributes, the ` data ` field
171
171
will be ignored, and any messages they return will also be processed. If they
172
- return an error, the parent call will return an error, thus rolling back the state
173
- of the whole transaction.
172
+ return an error, the parent call will return an error, thus rolling back the
173
+ state of the whole transaction.
174
174
175
175
Note that the messages are executed
176
176
[ _ depth-first_ ] ( https://en.wikipedia.org/wiki/Depth-first_search ) . This means if
@@ -192,12 +192,12 @@ graph TD;
192
192
```
193
193
194
194
This may be hard to understand at first. "Why can't I just call another
195
- contract?", you may ask. However, we do this to prevent one of the most widespread
196
- and hardest to detect security holes in Ethereum contracts - reentrancy. We do
197
- this by following the actor model, which doesn't nest function calls, but
198
- returns messages that will be executed later. This means all state that is
199
- carried over between one call and the next happens in storage and not in memory.
200
- For more information on this design, I recommend you read
195
+ contract?", you may ask. However, we do this to prevent one of the most
196
+ widespread and hardest to detect security holes in Ethereum contracts -
197
+ reentrancy. We do this by following the actor model, which doesn't nest function
198
+ calls, but returns messages that will be executed later. This means all state
199
+ that is carried over between one call and the next happens in storage and not in
200
+ memory. For more information on this design, I recommend you read
201
201
[ our docs on the Actor Model] ( https://book.cosmwasm.com/actor-model.html ) .
202
202
203
203
### Submessages
@@ -264,12 +264,12 @@ intercepted by the calling contract (for `ReplyOn::Always` and
264
264
transaction_
265
265
266
266
Note, that error doesn't abort the whole transaction _ if and only if_ the
267
- ` reply ` is called - so in the case of ` ReplyOn::Always ` and ` ReplyOn::Error ` . If the
268
- submessage is called with ` ReplyOn::Success ` (or ` ReplyOn::Never ` , which makes
269
- it effectively a normal message), the error in subsequent call would result in
270
- failing the whole transaction and not committing the changes for it. The rule here is as
271
- follows: if for any reason you want your message handling to succeed on
272
- submessage failure, you always have to reply on failure.
267
+ ` reply ` is called - so in the case of ` ReplyOn::Always ` and ` ReplyOn::Error ` . If
268
+ the submessage is called with ` ReplyOn::Success ` (or ` ReplyOn::Never ` , which
269
+ makes it effectively a normal message), the error in subsequent call would
270
+ result in failing the whole transaction and not committing the changes for it.
271
+ The rule here is as follows: if for any reason you want your message handling to
272
+ succeed on submessage failure, you always have to reply on failure.
273
273
274
274
Obviously - on the successful processing of sub-message, if the reply is not
275
275
called (in particular ` ReplyOn::Error ` ), the whole transaction is assumed to
0 commit comments