Skip to content

Commit aacf4c0

Browse files
[autofix.ci] apply automated fixes
1 parent c0a12a1 commit aacf4c0

File tree

3 files changed

+27
-26
lines changed

3 files changed

+27
-26
lines changed

MIGRATING.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ major releases of `cosmwasm`. Note that you can also view the
148148
+CosmosMsg::Any(AnyMsg { type_url, value })
149149
```
150150

151-
- Replace all direct construction of `StdError` with the use of the corresponding
152-
constructor:
151+
- Replace all direct construction of `StdError` with the use of the
152+
corresponding constructor:
153153

154154
```diff
155155
-StdError::GenericErr { msg }
@@ -570,9 +570,9 @@ arbitrary ones.
570570
annotations. See the [0.13 -> 0.14 entry](#013---014) where `#[entry_point]`
571571
was introduced.
572572

573-
- If your chain provides a custom query, add the custom query type as a
574-
generic argument to `cosmwasm_std::Deps`, `DepsMut`, `OwnedDeps` and
575-
`QuerierWrapper`. Otherwise, it defaults to `Empty`. E.g.
573+
- If your chain provides a custom query, add the custom query type as a generic
574+
argument to `cosmwasm_std::Deps`, `DepsMut`, `OwnedDeps` and `QuerierWrapper`.
575+
Otherwise, it defaults to `Empty`. E.g.
576576

577577
```diff
578578
#[entry_point]
@@ -1313,13 +1313,14 @@ arbitrary ones.
13131313
which a compact binary representation is desired. For JSON state this does not
13141314
save much data (e.g. the bech32 address
13151315
cosmos1pfq05em6sfkls66ut4m2257p7qwlk448h8mysz takes 45 bytes as direct ASCII
1316-
and 28 bytes when its canonical representation is base64 encoded). For fixed-length database keys `CanonicalAddr` remains handy though.
1316+
and 28 bytes when its canonical representation is base64 encoded). For
1317+
fixed-length database keys `CanonicalAddr` remains handy though.
13171318

13181319
- Replace `StakingMsg::Withdraw` with `DistributionMsg::SetWithdrawAddress` and
13191320
`DistributionMsg::WithdrawDelegatorReward`. `StakingMsg::Withdraw` was a
13201321
shorthand for the two distribution messages. However, it was unintuitive
1321-
because it did not set the address for one withdrawal only but for all following
1322-
withdrawals. Since withdrawals are [triggered by different
1322+
because it did not set the address for one withdrawal only but for all
1323+
following withdrawals. Since withdrawals are [triggered by different
13231324
events][distribution docs] such as validators changing their commission rate,
13241325
an address that was set for a one-time withdrawal would be used for future
13251326
withdrawals not considered by the contract author.
@@ -1785,8 +1786,8 @@ Contract code and uni tests:
17851786
- `cosmwasm_storage::get_with_prefix`, `cosmwasm_storage::set_with_prefix`,
17861787
`cosmwasm_storage::RepLog::commit`, `cosmwasm_std::ReadonlyStorage::get`,
17871788
`cosmwasm_std::ReadonlyStorage::range`, `cosmwasm_std::Storage::set` and
1788-
`cosmwasm_std::Storage::remove` now returns the value directly that was wrapped
1789-
in a result before.
1789+
`cosmwasm_std::Storage::remove` now returns the value directly that was
1790+
wrapped in a result before.
17901791
- Error creator functions are now in type itself, e.g.
17911792
`StdError::invalid_base64` instead of `invalid_base64`. The free functions are
17921793
deprecated and will be removed before 1.0.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ repo.
129129

130130
We also recommend you review our [documentation site](https://book.cosmwasm.com)
131131
which contains a few tutorials to guide you in building your first contracts.
132-
You can find past recordings of hackathon/conference workshops and
133-
presentations on our [YouTube channel](https://www.youtube.com/@CosmWasm), or
132+
You can find past recordings of hackathon/conference workshops and presentations
133+
on our [YouTube channel](https://www.youtube.com/@CosmWasm), or
134134
[join our Discord server](https://chat.cosmwasm.com) to ask for help.
135135

136136
## Minimum Supported Rust Version (MSRV)

SEMANTICS.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ executed in `x/wasm` _with the permissions of the contract_ (meaning
169169
`info.sender` will be the contract not the original caller). If they return
170170
success, they will emit a new event with the custom attributes, the `data` field
171171
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.
174174

175175
Note that the messages are executed
176176
[_depth-first_](https://en.wikipedia.org/wiki/Depth-first_search). This means if
@@ -192,12 +192,12 @@ graph TD;
192192
```
193193

194194
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
201201
[our docs on the Actor Model](https://book.cosmwasm.com/actor-model.html).
202202

203203
### Submessages
@@ -264,12 +264,12 @@ intercepted by the calling contract (for `ReplyOn::Always` and
264264
transaction_
265265

266266
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.
273273

274274
Obviously - on the successful processing of sub-message, if the reply is not
275275
called (in particular `ReplyOn::Error`), the whole transaction is assumed to

0 commit comments

Comments
 (0)