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/tutorial/platform/02-concepts-overview.md
+13-15Lines changed: 13 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -324,11 +324,11 @@ For instance:
324
324
}
325
325
```
326
326
See [the hello world's](./04-hello-world.md#send-a-transaction-to-your-contract)_Send a transaction to your contract_ to pass funds along with a contract call,
327
-
and [the practical exercise's](./16-fund-handling.html)_Proper Fund Handling_ to see it implemented in your own smart contract.
327
+
and [the practical exercise's](./16-fund-handling.md)_Proper Fund Handling_ to see it implemented in your own smart contract.
328
328
329
329
* When a smart contract sends a message to another one, and this other contract fails, the originating smart contract
330
330
does not by default need to roll back any state changes. Instead, the CosmWasm module provides this guarantee of atomicity,
331
-
unless instructed otherwise. See [the practical exercise's](./14-contract-reply.html)_First Contract Reply Integration_ for an example of the default behavior.
331
+
unless instructed otherwise. See [the practical exercise's](./14-contract-reply.md)_First Contract Reply Integration_ for an example of the default behavior.
332
332
333
333
* Additionally, when a smart contract sends a message to another and expects a reply,
334
334
the payload returned (CosmWasm v2 only) is the same as the one that was sent initially, guaranteed by the CosmWasm module.
@@ -594,7 +594,7 @@ However, throwing tokens _over the fence_ to the smart contract is the lesser-us
594
594
You should preferably use the [`funds`](https://github.com/CosmWasm/wasmd/blob/v0.53.0/x/wasm/types/tx.pb.go#L350) feature of `MsgExecute`.
595
595
As mentioned in the messages section above, the CosmWasm module will do the requested fund transfer prior to the execution,
596
596
so that the smart contract has guarantees that the adequate token transfer has been done to its benefit.
597
-
See [this hands-on exercise](./16-fund-handling.html) for an example.
597
+
See [this hands-on exercise](./16-fund-handling.md) for an example.
598
598
599
599
On the other hand, for IBC token transfers, it is possible for a smart contract to subscribe to IBC callbacks such that it can be notified
600
600
as soon as it receives tokens or when the tokens it has sent cross-chain have been received or have timed out.
@@ -627,21 +627,19 @@ that give access to the on-chain storage in read-only or read/write, depending o
627
627
i.e. [query](https://github.com/b9lab/cw-my-nameservice/blob/first-query-message/src/contract.rs#L48)
628
628
or [execution](https://github.com/b9lab/cw-my-nameservice/blob/first-query-message/src/contract.rs#L24) respectively.
`DepsMut` gives access to mutable (modifiable) state.
646
644
</TabItem>
647
645
</Tabs>
@@ -743,7 +741,7 @@ Note that if there are nested returned messages,
743
741
messages are evaluated [depth-first](https://docs.cosmwasm.com/docs/smart-contracts/contract-semantics/#dispatching-messages)
744
742
as this cleaves to the intent of the caller.
745
743
746
-
Go to [this exercise](./12-cross-contract.html) to see it in action.
744
+
Go to [this exercise](./12-cross-contract.md) to see it in action.
747
745
748
746
### Reply mechanism
749
747
@@ -775,7 +773,7 @@ for the smart contract to [match the reply](https://github.com/b9lab/cw-my-colle
775
773
to the original sub-message, in order to carry on with the execution.
776
774
The sub-message also contains a [binary payload](https://github.com/CosmWasm/cosmwasm/blob/v2.1.0/packages/std/src/results/submessages.rs#L49) (in CosmWasm 2.0)
777
775
that you can use as call context instead of using the storage temporarily, thereby saving gas.
778
-
Go to [this exercise](./14-contract-reply.html) to see it in action.
776
+
Go to [this exercise](./14-contract-reply.md) to see it in action.
779
777
780
778
```rust
781
779
pubfnreply(..., msg:Reply) ->ContractResult {
@@ -907,11 +905,11 @@ Testing your smart contracts, as for all your software projects, should be part
907
905
There are different levels of testing, and you benefit from existing tools at each level.
908
906
909
907
- Rust **unit tests**. They reside in your code, and are tested purely in a Rust way, without even any conversion to WebAssembly.
910
-
See [this exercise](./05-first-contract.html#unit-testing) for an introduction
911
-
and [this one](./06-first-contract-register.html#unit-testing) to experience it in more details.
908
+
See [this exercise](./05-first-contract.md#unit-testing) for an introduction
909
+
and [this one](./06-first-contract-register.md#unit-testing) to experience it in more details.
912
910
-**Mocked-app tests**, happening all in Rust with the use of the cw-multi-test library to test your contract's
913
-
interactions with a mocked CosmWasm module. See [this exercise](./08-first-contract-test.html)
914
-
for an introduction and [this one](./12-cross-contract.html#mocked-app-tests) to experience it in more details.
911
+
interactions with a mocked CosmWasm module. See [this exercise](./08-first-contract-test.md)
912
+
for an introduction and [this one](./12-cross-contract.md#mocked-app-tests) to experience it in more details.
915
913
- Message mocked tests. You create mocks of your SDK modules, against which your smart contracts communicate.
Copy file name to clipboardExpand all lines: docs/tutorial/platform/04-hello-world.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1477,7 +1477,7 @@ Although you see the word `funds` as a field of the message, it does not mean th
1477
1477
4. The module then [crafts the info](https://github.com/CosmWasm/wasmd/blob/v0.52.0/x/wasm/keeper/keeper.go#L408), which includes the implied fact that the funds were collected.
1478
1478
5. The info is [passed to the Wasm VM](https://github.com/CosmWasm/wasmd/blob/v0.52.0/x/wasm/keeper/keeper.go#L413).
1479
1479
6. This jumps to the smart contract, which [receives an info object](https://github.com/b9lab/cw-my-nameservice/blob/add-first-library/src/contract.rs#L28) that contains the [`funds`](https://github.com/CosmWasm/cosmwasm/blob/v2.1.4/packages/std/src/types.rs#L105) detail.
1480
-
7. The contract could validate that it was paid enough for the minting. In fact, if you go to [this part](./16-fund-handling.html) of the long-running exercise, you see [it checking](https://github.com/b9lab/cw-my-collection-manager/blob/main/src/contract.rs#L107-L146) exeactly that in the list of funds that have been collected.
1480
+
7. The contract could validate that it was paid enough for the minting. In fact, if you go to [this part](./16-fund-handling.md) of the long-running exercise, you see [it checking](https://github.com/b9lab/cw-my-collection-manager/blob/main/src/contract.rs#L107-L146) exactly that in the list of funds that have been collected.
0 commit comments